Skip to content

Commit

Permalink
feat(dev server): update to support single shell for dev server #225
Browse files Browse the repository at this point in the history
  • Loading branch information
blackfalcon committed Nov 16, 2021
1 parent df49c1f commit eb73188
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
14 changes: 9 additions & 5 deletions template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,22 @@ Please be sure to review the [contribution guidelines](https://auro.alaskaair.co

### Start development environment

Once the project has been cloned to your local resource and you have installed all the dependencies you will need to open two different shell sessions. One is for the **npm tasks**, the second is to run the **server**.
Once the project has been cloned to your local resource and you have installed all the dependencies you will need to open a shell session to run the **dev server**.

```shell
// shell terminal one
$ npm run dev

// shell terminal two
$ npm run serve
```

Open [localhost:8000](http://localhost:8000/)

If running separate sessions is preferred, please run the following commands in individual terminal shells.

```shell
$ npm run build:watch

$ npm run serve
```

### API generation

The custom element API file is generated in the build and committed back to the repo with a version change. If the API doc has changed without a version change, author's are to run `npm run build:api` to generate the doc and commit to version control.
Expand Down
14 changes: 9 additions & 5 deletions template/README__labs.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,22 @@ Please be sure to review the [contribution guidelines](https://auro.alaskaair.co

### Start development environment

Once the project has been cloned to your local resource and you have installed all the dependencies you will need to open two different shell sessions. One is for the **npm tasks**, the second is to run the **server**.
Once the project has been cloned to your local resource and you have installed all the dependencies you will need to open a shell session to run the **dev server**.

```shell
// shell terminal one
$ npm run dev

// shell terminal two
$ npm run serve
```

Open [localhost:8000](http://localhost:8000/)

If running separate sessions is preferred, please run the following commands in individual terminal shells.

```shell
$ npm run build:watch

$ npm run serve
```

### API generation

The custom element API file is generated in the build and committed back to the repo with a version change. If the API doc has changed without a version change, author's are to run `npm run build:api` to generate the doc and commit to version control.
Expand Down
2 changes: 1 addition & 1 deletion template/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!--
Visit demo/index.html to see live examples of your element running.
This page will automatically redirect you there when run in the browser
with `npm run serve`.
with `npm run dev`.
-->
</body>
</html>
6 changes: 3 additions & 3 deletions template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"================================================================================",
"# To work within the development environment, run the following tasks",
" 1. $ npm run dev",
" 2. $ npm run serve",
" 3. Go to http://localhost:8000",
" 2. Go to http://localhost:8000",
"================================================================================"
],
"name": "[npm]/[namespace]-[name]",
Expand Down Expand Up @@ -53,6 +52,7 @@
"babel-loader": "",
"compression": "",
"concat": "",
"concurrently": "",
"copyfiles": "",
"core-js": "",
"eslint": "",
Expand Down Expand Up @@ -155,7 +155,7 @@
"demo:new:build": "mkdir ./build && mkdir ./build/css && mkdir ./build/demo",
"demo:rm:build": "rm -rf ./build",
"demo:update:index": "node ./scripts/prepForBuild",
"dev": "npm run build:watch",
"dev": "concurrently --kill-others 'npm run build:watch' 'npm run serve'",
"dist:js": "copyfiles -u 1 -V './src/**/*.js' ./dist",
"esLint": "./node_modules/.bin/eslint src/**/*.js",
"linters": "npm-run-all scssLint esLint",
Expand Down

0 comments on commit eb73188

Please sign in to comment.