Skip to content

Conversation

@KaneFreeman
Copy link
Member

Type: feature

The following has been addressed in the PR:

Description:
Adds in dev, build and test scripts, along with adding @dojo/cli as a dev dependency, to the package.json templates.

Resolves #154

@codecov
Copy link

codecov bot commented Oct 19, 2018

Codecov Report

Merging #162 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #162   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           7      7           
  Lines          71     72    +1     
  Branches        6      6           
=====================================
+ Hits           71     72    +1
Impacted Files Coverage Δ
src/run.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95fad8e...205e004. Read the comment docs.

@aciccarello
Copy link

I would recommend not using the abbreviated flags to make the scripts more intuitive for new users.

@KaneFreeman
Copy link
Member Author

@aciccarello the scripts have been updated with their long formats.

@agubler
Copy link
Member

agubler commented Oct 22, 2018

@KaneFreeman I guess we should add something about the scripts to the template README files?

@KaneFreeman
Copy link
Member Author

I have updated the README files to include mention of the new scripts, while still mentioning the @dojo/cli equivalent. I added a build:dev script in as well since it is explicitly called out in the READMEs.

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.
Copy link
Member

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?

Copy link
Member Author

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',
Copy link
Member

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:unit should be dojo build --mode unit && dojo test --unit --config local
  • npm run test:functional should be dojo build --mode functional && dojo test --functional --config local
  • npm run test:all should be dojo build --mode unit && dojo build --mode functional && dojo test --all --config local

Copy link
Member Author

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.
@KaneFreeman KaneFreeman merged commit 96cf19b into dojo:master Oct 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants