Skip to content

Commit a1c5f00

Browse files
committed
Merge branch 'release/0.1.0'
2 parents 6623976 + 5ba467d commit a1c5f00

File tree

4 files changed

+25
-19
lines changed

4 files changed

+25
-19
lines changed

.vscode/launch.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
{
22
"version": "0.2.0",
33
"configurations": [
4-
{
5-
"name": "Launch with sourcemaps",
6-
"type": "chrome",
7-
"request": "launch",
8-
"url": "http://localhost/mypage.html",
9-
"webRoot": "${workspaceRoot}/dist",
10-
"sourceMaps": true
11-
},
124
{
135
"name": "Attach with sourcemaps",
146
"type": "chrome",
@@ -17,6 +9,7 @@
179
"port": 9222,
1810
"diagnosticLogging": true,
1911
"webRoot": "${workspaceRoot}/dist"
12+
2013
}
2114
]
2215
}

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,34 @@
1212
```bash
1313
git clone https://github.com/emyann/typescript-webpack-starter.git
1414
cd typescript-webpack-starter
15+
# Install the dependencies
16+
npm install
17+
```
18+
19+
## Run
20+
Run a Webpack dev server
21+
```bash
22+
npm run server
1523
```
1624

17-
## Build
25+
## Build Only
1826
Build a development release
1927
```bash
20-
npm install
2128
npm run build
2229
```
2330

2431
Build a production release
2532
```bash
26-
npm install
2733
npm run build:prod
2834
```
29-
After build phase, those files are generated into the `dist` folder:
35+
After build phase, 3 files are generated into the `dist` folder:
3036
- `app.bundle.js` - contains the core of the application. From the entry point `src/index.ts`
3137
- `vendor.bundle.js` - contains the vendor dependencies
38+
- `index.html` - html page with references to the 2 files above
3239

3340
## TODO
3441

35-
- [-] Add samples (Jquery integration for example..)
36-
- [-] Setup a webpack-dev-server
37-
- [-] Setup VSCode debug to match webpack-dev-server
38-
- [-] Setup a webpack common configuration and use webpack-merge
39-
- [-] Setup for tests
42+
- [ ] Add TODO example
43+
- [ ] Setup VSCode debug to match webpack-dev-server
44+
- [ ] Setup a webpack common configuration and use webpack-merge
45+
- [ ] Setup unit tests

config/webpack/webpack.dev.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const webpack = require('webpack');
22
const path = require('path');
33
const HtmlWebpackPlugin = require('html-webpack-plugin');
4+
const DashboardPlugin = require('webpack-dashboard/plugin');
45

56
var config = {
67
devtool: 'cheap-eval-source-map',
@@ -46,6 +47,7 @@ var config = {
4647
output: {comments: false},
4748
sourceMap: false
4849
}),
50+
new DashboardPlugin()
4951
],
5052
tslint: {
5153
emitErrors: false,

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
{
22
"name": "typescript-webpack-starter",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "A damn simple starter for Typescript and Webpack",
55
"main": "src/index.ts",
66
"scripts": {
77
"rimraf": "rimraf",
88
"webpack": "webpack",
9+
"webpack-dev-server": "webpack-dev-server",
910
"build": "npm run build:dev",
1011
"prebuild:dev": "npm run rimraf -- dist",
1112
"build:dev": "webpack --config config/webpack/webpack.dev.js --progress --profile --color --display-error-details --display-cached",
1213
"prebuild:prod": "npm run rimraf -- dist",
1314
"build:prod": "webpack --config config/webpack/webpack.prod.js --progress --profile --color --display-error-details --display-cached --bail",
15+
"server": "npm run server:dev",
16+
"server:dev": "webpack-dashboard -- webpack-dev-server --config config/webpack/webpack.dev.js --port 3000 --host 0.0.0.0 --hot --inline --progress --profile --watch --content-base dist/",
1417
"test": "echo \"Error: no test specified\" && exit 1",
1518
"postinstall": "typings i"
1619
},
@@ -33,7 +36,9 @@
3336
"tslint-loader": "^2.1.5",
3437
"typescript": "^2.0.0",
3538
"typings": "^1.3.2",
36-
"webpack": "^2.1.0-beta.20"
39+
"webpack": "^2.1.0-beta.20",
40+
"webpack-dashboard": "^0.1.8",
41+
"webpack-dev-server": "^1.15.0"
3742
},
3843
"dependencies": {
3944
"lodash": "^4.14.1"

0 commit comments

Comments
 (0)