Skip to content

Commit

Permalink
feat(dev-server): Add webpack-dev-server.
Browse files Browse the repository at this point in the history
  • Loading branch information
emyann committed Aug 28, 2016
1 parent 28df038 commit 7e56319
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ git clone https://github.com/emyann/typescript-webpack-starter.git
cd typescript-webpack-starter
```

## Build
## Run
Run a Webpack dev server
```bash
npm install
npm run server
```

## Build Only
Build a development release
```bash
npm install
Expand All @@ -26,14 +33,14 @@ Build a production release
npm install
npm run build:prod
```
After build phase, those files are generated into the `dist` folder:
After build phase, 3 files are generated into the `dist` folder:
- `app.bundle.js` - contains the core of the application. From the entry point `src/index.ts`
- `vendor.bundle.js` - contains the vendor dependencies
- `index.html` - html page with references to the 2 files above

## TODO

- [-] Add samples (Jquery integration for example..)
- [-] Setup a webpack-dev-server
- [-] Setup VSCode debug to match webpack-dev-server
- [-] Setup a webpack common configuration and use webpack-merge
- [-] Setup for tests
- [_] Add TODO example
- [_] Setup VSCode debug to match webpack-dev-server
- [_] Setup a webpack common configuration and use webpack-merge
- [_] Setup unit tests
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
"scripts": {
"rimraf": "rimraf",
"webpack": "webpack",
"webpack-dev-server": "webpack-dev-server",
"build": "npm run build:dev",
"prebuild:dev": "npm run rimraf -- dist",
"build:dev": "webpack --config config/webpack/webpack.dev.js --progress --profile --color --display-error-details --display-cached",
"prebuild:prod": "npm run rimraf -- dist",
"build:prod": "webpack --config config/webpack/webpack.prod.js --progress --profile --color --display-error-details --display-cached --bail",
"server": "npm run server:dev",
"server:dev": "webpack-dev-server --config config/webpack/webpack.dev.js --port 3000 --host 0.0.0.0 --hot --progress --profile --watch --inline --content-base dist/",
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "typings i"
},
Expand Down

0 comments on commit 7e56319

Please sign in to comment.