Simplify YARN commands

next-interactions
Justin 2 years ago
parent 41ae50c495
commit d3f49bfe7f

@ -22,7 +22,7 @@ before_script:
lint-js: lint-js:
stage: lint stage: lint
script: yarn test:lint:js script: yarn lint:js
only: only:
changes: changes:
- "**/*.js" - "**/*.js"
@ -34,7 +34,7 @@ lint-js:
lint-sass: lint-sass:
stage: lint stage: lint
script: yarn test:lint:sass script: yarn lint:sass
only: only:
changes: changes:
- "**/*.scss" - "**/*.scss"
@ -43,7 +43,7 @@ lint-sass:
jest: jest:
stage: test stage: test
script: yarn test:jest script: yarn test:coverage
only: only:
changes: changes:
- "**/*.js" - "**/*.js"

@ -153,15 +153,15 @@ NODE_ENV=development
- `yarn manage:translations` - Normalizes translation files. Should always be run after editing i18n strings. - `yarn manage:translations` - Normalizes translation files. Should always be run after editing i18n strings.
#### Tests #### Tests
- `yarn test` - Runs all tests. - `yarn test:all` - Runs all tests and linters.
- `yarn test:lint` - Runs all linter tests. - `yarn test` - Runs Jest for frontend unit tests.
- `yarn test:lint:js` - Runs only JavaScript linter. - `yarn lint` - Runs all linters.
- `yarn test:lint:sass` - Runs only SASS linter. - `yarn lint:js` - Runs only JavaScript linter.
- `yarn test:jest` - Frontend unit tests. - `yarn lint:sass` - Runs only SASS linter.
# Contributing # Contributing

@ -18,12 +18,12 @@ NODE_ENV=development
- `yarn manage:translations` - Normalizes translation files. Should always be run after editing i18n strings. - `yarn manage:translations` - Normalizes translation files. Should always be run after editing i18n strings.
## Tests ## Tests
- `yarn test` - Runs all tests. - `yarn test:all` - Runs all tests and linters.
- `yarn test:lint` - Runs all linter tests. - `yarn test` - Runs Jest for frontend unit tests.
- `yarn test:lint:js` - Runs only JavaScript linter. - `yarn lint` - Runs all linters.
- `yarn test:lint:sass` - Runs only SASS linter. - `yarn lint:js` - Runs only JavaScript linter.
- `yarn test:jest` - Frontend unit tests. - `yarn lint:sass` - Runs only SASS linter.

@ -21,11 +21,12 @@
"build": "npx webpack", "build": "npx webpack",
"jsdoc": "npx jsdoc -c jsdoc.conf.js", "jsdoc": "npx jsdoc -c jsdoc.conf.js",
"manage:translations": "node ./webpack/translationRunner.js", "manage:translations": "node ./webpack/translationRunner.js",
"test": "${npm_execpath} run test:lint && ${npm_execpath} run test:jest", "test": "npx jest",
"test:lint": "${npm_execpath} run test:lint:js && ${npm_execpath} run test:lint:sass", "test:coverage": "npx jest --coverage",
"test:lint:js": "npx eslint --ext .js,.jsx,.ts,.tsx . --cache", "test:all": "${npm_execpath} run test:coverage && ${npm_execpath} run lint",
"test:lint:sass": "npx stylelint app/styles/**/*.scss", "lint": "${npm_execpath} run lint:js && ${npm_execpath} run lint:sass",
"test:jest": "npx jest --coverage", "lint:js": "npx eslint --ext .js,.jsx,.ts,.tsx . --cache",
"lint:sass": "npx stylelint app/styles/**/*.scss",
"prepare": "husky install" "prepare": "husky install"
}, },
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",

Loading…
Cancel
Save