Skip to content

Commit f7d4c50

Browse files
committed
chore: Update dependencies. Update webpack dev config.
- Temp remove tslint config, To be updated
1 parent 731520c commit f7d4c50

File tree

4 files changed

+74
-27
lines changed

4 files changed

+74
-27
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ npm install
2121
## Run
2222
Run a Webpack dev server
2323
```bash
24-
npm run server
24+
npm start
2525
```
2626

2727
## Build Only

config/webpack/webpack.dev.js

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,14 @@ var config = {
1919
}
2020
},
2121
module: {
22-
preLoaders: [
23-
{ test: /\.ts$/, exclude: ["node_modules"], loader: "tslint" }
24-
],
2522
loaders: [
2623
{ test: /\.ts$/, exclude: ["node_modules"], loader: 'ts-loader' },
2724
{ test: /\.html$/, loader: "html" },
2825
{ test: /\.css$/, loaders: ['style', 'css'] }
2926
]
3027
},
3128
resolve: {
32-
extensions: ["", ".ts", ".js"],
29+
extensions: [".ts", ".js"],
3330
modules: [path.resolve('./src'), 'node_modules']
3431
},
3532
plugins: [
@@ -49,10 +46,56 @@ var config = {
4946
}),
5047
new DashboardPlugin()
5148
],
52-
tslint: {
53-
emitErrors: false,
54-
failOnHint: false
55-
},
49+
// tslint: {
50+
// emitErrors: false,
51+
// failOnHint: false
52+
// },
5653
};
5754

58-
module.exports = config;
55+
module.exports = config;
56+
57+
58+
59+
// const path = require('path');
60+
61+
// const webpack = require('webpack');
62+
// const Copy = require('copy-webpack-plugin');
63+
64+
// const nodeEnv = process.env.NODE_ENV || 'development';
65+
// const isProd = nodeEnv === 'production';
66+
67+
// module.exports = {
68+
// devtool: isProd ? 'hidden-source-map' : 'cheap-eval-source-map',
69+
// entry: './lib/index.js',
70+
// output: {
71+
// path: path.join(__dirname, 'app', 'dist'),
72+
// filename: 'bundle.js'
73+
// },
74+
// module: {
75+
// loaders: [
76+
// {
77+
// test: /\.(js|jsx)$/,
78+
// exclude: /node_modules/,
79+
// loader: 'babel-loader'
80+
// },
81+
// {
82+
// test: /\.json/,
83+
// loader: 'json-loader'
84+
// }
85+
// ]
86+
// },
87+
// plugins: [
88+
// new webpack.DefinePlugin({
89+
// 'process.env': { // eslint-disable-line quote-props
90+
// NODE_ENV: JSON.stringify(nodeEnv)
91+
// }
92+
// }),
93+
// new Copy([
94+
// {
95+
// from: './assets',
96+
// to: './assets'
97+
// }
98+
// ])
99+
// ],
100+
// target: 'electron'
101+
// };

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@
77
"rimraf": "rimraf",
88
"webpack": "webpack",
99
"webpack-dev-server": "webpack-dev-server",
10+
"start": "npm run start:dev",
11+
"start: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/",
1012
"build": "npm run build:dev",
1113
"prebuild:dev": "npm run rimraf -- dist",
1214
"build:dev": "webpack --config config/webpack/webpack.dev.js --progress --profile --color --display-error-details --display-cached",
1315
"prebuild:prod": "npm run rimraf -- dist",
1416
"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/",
17-
"test": "echo \"Error: no test specified\" && exit 1",
18-
"postinstall": "typings i"
17+
"test": "echo \"Error: no test specified\" && exit 1"
1918
},
2019
"repository": {
2120
"type": "git",
@@ -24,23 +23,24 @@
2423
"author": "yrenaudin",
2524
"license": "ISC",
2625
"devDependencies": {
27-
"css-loader": "^0.25.0",
26+
"@types/lodash": "^4.14.50",
27+
"css-loader": "^0.26.1",
2828
"ejs-loader": "^0.3.0",
29+
"eslint": "^3.14.0",
2930
"expose-loader": "^0.7.1",
3031
"html-loader": "^0.4.4",
31-
"html-webpack-plugin": "^2.22.0",
32+
"html-webpack-plugin": "^2.26.0",
3233
"rimraf": "^2.5.4",
3334
"style-loader": "^0.13.1",
34-
"ts-loader": "^0.8.2",
35-
"tslint": "^3.15.1",
36-
"tslint-loader": "^2.1.5",
37-
"typescript": "^2.0.0",
38-
"typings": "^1.3.3",
35+
"ts-loader": "^2.0.0",
36+
"tslint": "^4.3.1",
37+
"tslint-loader": "^3.3.0",
38+
"typescript": "^2.1.5",
3939
"webpack": "^2.1.0-beta.22",
40-
"webpack-dashboard": "^0.1.8",
41-
"webpack-dev-server": "^1.15.2"
40+
"webpack-dashboard": "^0.2.1",
41+
"webpack-dev-server": "2.2.0"
4242
},
4343
"dependencies": {
44-
"lodash": "^4.15.0"
44+
"lodash": "^4.17.4"
4545
}
46-
}
46+
}

src/index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
<!DOCTYPE html>
22
<html lang="">
3+
34
<head>
45
<meta charset="utf-8">
56
<meta http-equiv="x-ua-compatible" content="ie=edge">
67
<meta name="viewport" content="width=device-width, initial-scale=1">
78

8-
<title><%= htmlWebpackPlugin.options.title %></title>
9+
<title>
10+
<%= htmlWebpackPlugin.options.title %>
11+
</title>
912

1013
<meta name="description" content="<%= htmlWebpackPlugin.options.title %>">
1114

1215
</head>
1316

1417
<body>
15-
<div> You have successfully started your Typescript application using Webpack</div>
18+
<div> You have successfully started your Typescript application using Webpack. By <a href="https://twitter.com/renaudin_yann">@renaudin_yann</a> </div>
1619
</body>
20+
1721
</html>

0 commit comments

Comments
 (0)