Skip to content

Commit 3a9101e

Browse files
authored
Merge pull request #302 from ember-learn/jw-rfc-831-npm-test
Mention npm scripts, per RFC-831
2 parents 27b453d + 780699f commit 3a9101e

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

guides/advanced-use/debugging.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- alex disable just -->
2-
For most Ember applications, Ember CLI "just works". Run `ember server` in your Terminal and you get
3-
a LiveReload development server at `http://localhost:4200`. Run `ember build`, and you get a `dist/`
2+
For most Ember applications, Ember CLI "just works". Run `ember server` or `npm start` in your Terminal and you get
3+
a LiveReload development server at `http://localhost:4200`. Run `ember build --environment=production` or `npm run build`, and you get a `dist/`
44
directory with compiled assets ready to be deployed to your production server.
55

66
But things don't always go smoothly and CLI commands can fail inexplicably with error messages that
@@ -67,7 +67,7 @@ For example, if your app installs [`ember-power-select`][3], and you want to tes
6767
You can verify this did the intended thing by checking that `node_modules/ember-power-select` is now
6868
a symlink pointing to the cloned repo.
6969

70-
Now, in your app, if you run `ember server`, it should use the linked repo and any code changes in
70+
Now, in your app, if you run `npm start` or `ember server`, it should use the linked repo and any code changes in
7171
your local clone of `ember-power-select` should get picked up by the app.
7272

7373
## Broccoli Debug

guides/basic-use/cli-commands.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ To stop an Ember server, press `control-c`.
8080
If the local server will not start due to missing dependencies, use
8181
`npm install` or `yarn install` to get going again.
8282

83+
Often, developers may run `npm start` instead of `ember serve`, since
84+
there may be some application-specific environment variables or flags specified
85+
in the `start` command of the project's `package.json`.
86+
8387
### Example use
8488

8589
By default, apps are served at port `4200`, but if you need to change it for some reason, you could visit your app at `http://localhost:3200` by using this command:
@@ -199,6 +203,13 @@ you can run only the first test with `ember test --filter="test one"`.
199203

200204
See `ember test --help` for more options!
201205

206+
### Running all tests including linters
207+
208+
`ember test` runs only the tests in the `tests` folder, so if you want to
209+
run additional tests such as linters too, try `npm test` instead. It will run
210+
all tests specified in your project's `package.json` script for the `test`
211+
command.
212+
202213
### Learn more
203214
- [The Ember.js Guides about Testing](https://guides.emberjs.com/release/testing/)
204215
- [The Ember Super Rentals Tutorial](https://guides.emberjs.com/release/tutorial/ember-cli/) which shows step-by-step how to write tests and understand the results

guides/basic-use/deploying.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ As a result, you may not need to understand or configure build steps, but it's s
1515

1616
Behind the scenes, deploying an app has two steps: building the app for production and pushing the result to a web server for hosting.
1717

18-
There are three main options for deploying your app: using the `ember build` command, installing `ember-cli-deploy`, or using pre-made build packs.
18+
There are three main options for deploying your app: using the `ember build --environment=production` command, installing `ember-cli-deploy`, or using pre-made build packs.
1919

2020
### `ember build` and upload
2121

@@ -29,6 +29,9 @@ ember build --environment production
2929

3030
The results of the `build` command are placed in the `dist` directory within your project.
3131

32+
Often, developers may run `npm run build` instead, since
33+
there may be some application-specific environment variables or flags specified
34+
in the `build` command of the project's `package.json`.
3235

3336
### Ember CLI Deploy
3437

guides/writing-addons/intro-tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ There are several options to see the addon in action. We could use `npm link`, `
6262
2. In the Ember app's `package.json`, add a `devDependencies` entry for your addon, like `"addon-name": "*"`. The `*` means that it will include all version numbers of our addon.
6363
3. Run `pnpm install`, `yarn install`, or `npm install` in the app. (If you are using the app for the first time, you can use `npm install --prefer-offline` or `npm install --offline` instead. These alternative commands can speed up installation, because `npm install` checks the online npm registry for your addon instead of your local storage.)
6464
4. Add a reference to your addon's component somewhere in an app template, like `<ComponentName @buttonLabel="Register" />`
65-
5. Run a local server with `ember serve` and visit [http://localhost:4200](http://localhost:4200)
65+
5. Run a local server with `npm start` or `ember serve`, and visit [http://localhost:4200](http://localhost:4200)
6666

6767
We should now see our addon in action!
6868

0 commit comments

Comments
 (0)