Skip to content

Commit

Permalink
switch to npm from yarn (finos#663)
Browse files Browse the repository at this point in the history
* switch to npm from yarn

* fix cve action

* remove electron

* fix codemirror dependencies
  • Loading branch information
heswell authored Apr 26, 2023
1 parent fef7588 commit 9de6e65
Show file tree
Hide file tree
Showing 14 changed files with 9,022 additions and 3,605 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/build-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "16"
# Enable node module caching only when yarn.lock is available
- name: Cache node modules
- name: Cache dependencies
uses: actions/cache@v2
with:
path: node_modules
key: yarn-deps-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-deps-${{ hashFiles('yarn.lock') }}
- run: cd ./vuu-ui && yarn
- run: cd ./vuu-ui && yarn build
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- run: cd ./vuu-ui && npm install
- run: cd ./vuu-ui && npm run build
10 changes: 5 additions & 5 deletions .github/workflows/cve-scanning-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Node CVE Scanning
on:
push:
paths:
- '**/package.json'
- '.github/workflows/cve-scanning-node.yml'
- 'vuu-ui/allow-list.json'
- "**/package.json"
- ".github/workflows/cve-scanning-node.yml"
- "vuu-ui/allow-list.json"

jobs:
scan-packages:
Expand All @@ -19,7 +19,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --production --frozen-lockfile
- run: npm install --production
working-directory: vuu-ui
- run: npx --yes auditjs ossi --whitelist allow-list.json
working-directory: vuu-ui
working-directory: vuu-ui
8 changes: 4 additions & 4 deletions .github/workflows/legal-report-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Legal report with Node
on:
push:
paths:
- '**/package.json'
- '.github/workflows/legal-report-node.yml'
- "**/package.json"
- ".github/workflows/legal-report-node.yml"

jobs:
scan-packages:
Expand All @@ -18,7 +18,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --production --frozen-lockfile
- run: npm install --production
working-directory: vuu-ui
- run: npx node-license-validator . --allow-licenses MIT ISC 0BSD BSD BSD-3-Clause Apache-2.0
working-directory: vuu-ui
working-directory: vuu-ui
6 changes: 3 additions & 3 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: cd ./vuu-ui && yarn
- run: cd ./vuu-ui && yarn build
- run: cd ./vuu-ui && yarn pub
- run: cd ./vuu-ui && npm install
- run: cd ./vuu-ui && npm run build
- run: cd ./vuu-ui && npm run pub
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
20 changes: 9 additions & 11 deletions .github/workflows/test-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "16"
# Enable node module caching only when yarn.lock is available
- name: Cache node modules
- name: Cache dependencies
uses: actions/cache@v2
with:
path: node_modules
key: yarn-deps-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-deps-${{ hashFiles('yarn.lock') }}
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Install dependencies
run: cd ./vuu-ui && yarn
- run: cd ./vuu-ui && yarn test:vite
run: cd ./vuu-ui && npm install
- run: cd ./vuu-ui && npm run test:vite

# ensure the vuu example and showcase still build
vuu-and-showcase-build:
Expand All @@ -36,8 +34,8 @@ jobs:
with:
node-version: "16"
- name: Install dependencies
run: cd ./vuu-ui && yarn
run: cd ./vuu-ui && npm install
- name: Build showcase
run: cd ./vuu-ui && yarn showcase:build
run: cd ./vuu-ui && npm run showcase:build
- name: Build Vuu app
run: cd ./vuu-ui && yarn build:app
run: cd ./vuu-ui && npm run build:app
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,13 @@ The UI scripts all run from the vuu/vuu-ui directory.
```sh
#from top-level vuu repo (not vuu child directory in repo)
cd vuu-ui
yarn
yarn build
yarn build:app
cd packages/electron
#this should open an electron window pointing at https://localhost:8443/index.html
yarn start
npm install
npm run build
npm run build:app
```

You can now open the demo app in your browser at https://127.0.0.1:8443/index.html

## Configuring IntelliJ

You may prefer to run the backend using the IntelliJ IDE, if so, you will need to follow the Client Installation above to ensure that the project has built correctly.
Expand All @@ -59,15 +58,19 @@ You may prefer to run the backend using the IntelliJ IDE, if so, you will need t
3. Set project SDK version to 11: file -> project structure -> select an SDK -> require version 11
4. Enable 'Use plugin registry': file -> settings -> build, execution, deployment -> Maven
5. Open Maven tab on the right and click install on vuu-parent -> lifecycle -> install
6. In the terminal, navigate to
6. In the terminal, navigate to

```sh
vuu-ui/sample-apps/app-vuu-example
```
7. Run

7. Run

```sh
yarn
yarn build
npm install
npm run build
```

8. In IntelliJ, select 'SimulMain' config and click run
9. If you get a 'certificate-unknown' error, set 'Allow invalid certificates for resources loaded from localhost' to 'Enabled' in your chrome settings

Expand Down
5 changes: 5 additions & 0 deletions vuu-ui/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ node_modules

yarn-error.log*

deployed_apps
dist
generated
public
packages/*/*.js
__tests__
salt
stories
storybook-static
showcase/dist
target
packages/shell/src/feature/Feature.jsx
Loading

0 comments on commit 9de6e65

Please sign in to comment.