-
Notifications
You must be signed in to change notification settings - Fork 19
Provide self contained npm scripts #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #162 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 7 7
Lines 71 72 +1
Branches 6 6
=====================================
+ Hits 71 72 +1
Continue to review full report at Codecov.
|
|
I would recommend not using the abbreviated flags to make the scripts more intuitive for new users. |
|
@aciccarello the scripts have been updated with their long formats. |
|
@KaneFreeman I guess we should add something about the scripts to the template README files? |
|
I have updated the README files to include mention of the new scripts, while still mentioning the |
src/templates/ts/skeleton/README.md
Outdated
| To run the unit tests against built bundles, first the run a test build with `dojo build --mode unit`. The build test artifacts are written to the `output/tests/unit` directory. | ||
| To run the unit tests against built bundles, run `npm run test:unit`. | ||
|
|
||
| To be re-run the unit tests without needing to re-build the full application each time, first build the app with `--most unit` and the `--watch` option, `dojo build --mode unit --watch`. Then run `dojo test --config local` to run the unit tests as needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be --mode unit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol, yeah. I have updated that.
src/run.ts
Outdated
| dev: 'dojo build --mode dev --watch file --serve', | ||
| build: 'dojo build --mode dist', | ||
| buildDev: `dojo build --mode dev`, | ||
| test: 'npm run test:unit && npm run test:functional', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that npm run test should translate to dojo test that doesn't need a bundle to be built as it does transpilation on the fly.
Perhaps the others:
npm run test:unitshould bedojo build --mode unit && dojo test --unit --config localnpm run test:functionalshould bedojo build --mode functional && dojo test --functional --config localnpm run test:allshould bedojo build --mode unit && dojo build --mode functional && dojo test --all --config local
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agubler The proposed changes have been made.
Added in dev, build and test scripts, along with adding @dojo/cli as a dev dependency, to the package.json templates.
Type: feature
The following has been addressed in the PR:
prettieras per the readme code style guidelinesDescription:
Adds in dev, build and test scripts, along with adding @dojo/cli as a dev dependency, to the package.json templates.
Resolves #154