Skip to content

Commit

Permalink
Initial changes for replacing yarn with npm
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangeetha-Bheeman committed Nov 3, 2023
1 parent 51bea08 commit a9571d4
Show file tree
Hide file tree
Showing 7 changed files with 21,149 additions and 13,241 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/js_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
${{ runner.os }}-yarn-
- name: Install dependencides
run: >-
yarn install
npm ci --legacy-peer-deps
- name: Run unit tests
run: >-
yarn test:unit
npm run test:unit
cypress:
name: Run Cypress tests
runs-on: ubuntu-latest
Expand All @@ -61,11 +61,11 @@ jobs:
${{ runner.os }}-yarn-
- name: Install dependencides
run: >-
yarn install
npm ci --legacy-peer-deps
- name: Cypress run
uses: cypress-io/github-action@v2
with:
start: yarn serve
start: npm serve
wait-on: http://localhost:8080/
config-file: cypress.json
spec: 'tests/e2e/**/*'
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ release.tar.gz

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
Expand Down
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ release.tar.gz

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
Expand Down
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
Does what it says on the tin.

## Project setup
To install dependencies and to ignore old version dependencies to avoid errors - https://stackoverflow.com/questions/66239691/what-does-npm-install-legacy-peer-deps-do-exactly-when-is-it-recommended-wh

```shell
yarn install
npm install --include-dev --legacy-peer-deps
```

Added @achrinza/node-ipc@10.1.9(which already exists as part of the package dependency tree) to package.json
Expand All @@ -14,22 +15,36 @@ resolutions to fix the version incompatibility issue with node.
### Compiles and hot-reloads for development

```shell
yarn run serve
npm run serve
```

Added --openssl-legacy-provide to NODE_OPTIONS on serve and build scripts in package.json to resolve the error:0308010C:digital envelope routines::unsupported discussed here https://github.com/vuejs/vue-cli/issues/6770. This can be removed later when the issue is resolved.

### Compiles and minifies for production

```shell
yarn run build
npm run build
```

### Lints and fixes files

```shell
yarn lint
yarn prettify
npm run lint
```

To fix the errors
```shell
npm run lint -- --fix
```
For prettier

```shell
npm run pretty
```

To fix the errors
```shell
npx prettier --write .
```

It is also possible to [configure your editor](https://prettier.io/docs/en/editors.html)
Expand All @@ -38,11 +53,11 @@ to run prettier automatically on save
### Run your unit tests

```shell
yarn run test:unit
npm run test:unit
```

### Run your end-to-end tests

```shell
yarn run test:e2e
npm run test:e2e
```
2 changes: 1 addition & 1 deletion compile-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
set -ev

# Building assets
yarn build --dest $2/public --report
npm build --dest $2/public --report

# Storing revision hash
git rev-parse HEAD > $2/REVISION
Expand Down
Loading

0 comments on commit a9571d4

Please sign in to comment.