Skip to content

Commit

Permalink
Revert "Convert repo to use NPM workspaces (#382)" (#386)
Browse files Browse the repository at this point in the history
This reverts commit 7b2c502.
  • Loading branch information
ibolton336 authored Sep 2, 2022
1 parent 7b2c502 commit 90bb399
Show file tree
Hide file tree
Showing 556 changed files with 24,716 additions and 9,084 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,18 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install
working-directory: pkg/client
run: npm install

- name: Client Install
run: npm install -w pkg-client

- name: Client Build
run: npm run build -w pkg-client

- name: Build
working-directory: pkg/client
run: npm run build
- name: Test
run: npm run test -w pkg-client
working-directory: pkg/client
run: npm run test --coverage --watchAll=false
- uses: codecov/codecov-action@v1
with:
flags: unitests
15 changes: 7 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/dist
/**/node_modules
/pkg-client/public/locales/**/translation_old.json
/pkg/**/node_modules
/pkg/client/public/locales/**/translation_old.json
/.pnp
.pnp.js

# testing
/coverage

# production
/pkg-client/dist
/pkg-qa-tests/build
/pkg/client/dist
/pkg/qa-tests/build

# misc
.DS_Store
Expand All @@ -26,8 +25,8 @@ npm-debug.log*
.eslintcache

# cypress
/pkg-cypress/videos
/pkg-cypress/screenshots
/pkg/cypress/videos
/pkg/cypress/screenshots
.nyc_output

# VSCode
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
FROM registry.access.redhat.com/ubi8/nodejs-16 as builder
USER 0
COPY . .
WORKDIR "/opt/app-root/src/"
RUN npm install && npm run build -w pkg-client
WORKDIR "/opt/app-root/src/pkg-server"
WORKDIR "/opt/app-root/src/pkg/client"
RUN npm install && npm run build
WORKDIR "/opt/app-root/src/pkg/server"
RUN npm install

# Runner image
Expand Down Expand Up @@ -33,9 +33,9 @@ LABEL name="konveyor/tackle2-ui" \
io.openshift.min-cpu="100m" \
io.openshift.min-memory="350Mi"

COPY --from=builder /opt/app-root/src/pkg-client/dist /opt/app-root/src/pkg-client/dist
COPY --from=builder /opt/app-root/src/pkg-client/dist/index.html.ejs /opt/app-root/src/pkg-server/views/index.html.ejs
COPY --from=builder /opt/app-root/src/pkg-server /opt/app-root/src/pkg-server
COPY --from=builder /opt/app-root/src/pkg/client/dist /opt/app-root/src/pkg/client/dist
COPY --from=builder /opt/app-root/src/pkg/client/dist/index.html.ejs /opt/app-root/src/pkg/server/views/index.html.ejs
COPY --from=builder /opt/app-root/src/pkg/server /opt/app-root/src/pkg/server
COPY --from=builder /opt/app-root/src/entrypoint.sh /usr/bin/entrypoint.sh

ENV DEBUG=1
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ if [[ $AUTH_REQUIRED != "false" ]]; then
exit 1
fi
fi
cd pkg-server
cd pkg/server
exec node index.js
51 changes: 0 additions & 51 deletions package.json

This file was deleted.

53 changes: 0 additions & 53 deletions pkg-client/config/stylePaths.js

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
42 changes: 42 additions & 0 deletions pkg/client/config/stylePaths.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require("path");
module.exports = {
stylePaths: [
path.resolve(__dirname, "../src"),
path.resolve(__dirname, "../node_modules/patternfly"),
path.resolve(__dirname, "../node_modules/@patternfly/patternfly"),
path.resolve(__dirname, "../node_modules/@patternfly/react-styles/css"),
path.resolve(
__dirname,
"../node_modules/@patternfly/react-core/dist/styles/base.css"
),
path.resolve(
__dirname,
"../node_modules/@patternfly/react-core/dist/esm/@patternfly/patternfly"
),
path.resolve(
__dirname,
"../node_modules/@patternfly/react-core/node_modules/@patternfly/react-styles/css"
),
path.resolve(
__dirname,
"../node_modules/@patternfly/react-table/node_modules/@patternfly/react-styles/css"
),
path.resolve(
__dirname,
"../node_modules/@patternfly/react-inline-edit-extension/node_modules/@patternfly/react-styles/css"
),
path.resolve(
__dirname,
"../node_modules/@redhat-cloud-services/frontend-components-notifications/Portal/portal.css"
),
path.resolve(
__dirname,
"../node_modules/@redhat-cloud-services/frontend-components-notifications/Notification/notification.css"
),
path.resolve(
__dirname,
"../node_modules/@redhat-cloud-services/frontend-components-notifications/index.css"
),
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,22 @@ module.exports = (env) => {
// only process modules with this loader
// if they live under a 'fonts' or 'pficon' directory
include: [
path.resolve(__dirname, "../node_modules/patternfly/dist/fonts"),
path.resolve(
__dirname,
"../../node_modules/patternfly/dist/fonts"
"../node_modules/@patternfly/react-core/dist/styles/assets/fonts"
),
path.resolve(
__dirname,
"../../node_modules/@patternfly/react-core/dist/styles/assets/fonts"
"../node_modules/@patternfly/react-core/dist/styles/assets/pficon"
),
path.resolve(
__dirname,
"../../node_modules/@patternfly/react-core/dist/styles/assets/pficon"
"../node_modules/@patternfly/patternfly/assets/fonts"
),
path.resolve(
__dirname,
"../../node_modules/@patternfly/patternfly/assets/fonts"
),
path.resolve(
__dirname,
"../../node_modules/@patternfly/patternfly/assets/pficon"
"../node_modules/@patternfly/patternfly/assets/pficon"
),
],
use: {
Expand Down Expand Up @@ -123,30 +120,30 @@ module.exports = (env) => {
test: /\.(jpg|jpeg|png|gif)$/i,
include: [
path.resolve(__dirname, "../src"),
path.resolve(__dirname, "../../node_modules/patternfly"),
path.resolve(__dirname, "../node_modules/patternfly"),
path.resolve(
__dirname,
"../../node_modules/@patternfly/patternfly/assets/images"
"../node_modules/@patternfly/patternfly/assets/images"
),
path.resolve(
__dirname,
"../../node_modules/@patternfly/react-styles/css/assets/images"
"../node_modules/@patternfly/react-styles/css/assets/images"
),
path.resolve(
__dirname,
"../../node_modules/@patternfly/react-core/dist/styles/assets/images"
"../node_modules/@patternfly/react-core/dist/styles/assets/images"
),
path.resolve(
__dirname,
"../../node_modules/@patternfly/react-core/node_modules/@patternfly/react-styles/css/assets/images"
"../node_modules/@patternfly/react-core/node_modules/@patternfly/react-styles/css/assets/images"
),
path.resolve(
__dirname,
"../../node_modules/@patternfly/react-table/node_modules/@patternfly/react-styles/css/assets/images"
"../node_modules/@patternfly/react-table/node_modules/@patternfly/react-styles/css/assets/images"
),
path.resolve(
__dirname,
"../../node_modules/@patternfly/react-inline-edit-extension/node_modules/@patternfly/react-styles/css/assets/images"
"../node_modules/@patternfly/react-inline-edit-extension/node_modules/@patternfly/react-styles/css/assets/images"
),
],
use: [
Expand All @@ -162,7 +159,7 @@ module.exports = (env) => {
type: "javascript/auto",
},
{
test: path.resolve(__dirname, "../../node_modules/xmllint/xmllint.js"),
test: path.resolve(__dirname, "../node_modules/xmllint/xmllint.js"),
loader: "exports-loader",
options: {
exports: "xmllint",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 90bb399

Please sign in to comment.