Skip to content

Commit 26aefc8

Browse files
niieaniEisenbergEffect
authored andcommitted
Webpack skeleton fixes (#708)
* feat(all): use CircleCI for most skeletons * feat(*-webpack): add editorconfig * chore(gitignore): ignore yarn.lock * feat(*-webpack): add recommended plugins for VSCode * fix(webpack): update dependencies, typings and configurations esnext: - use the babel-env-preset instead of es2015 for evergreen targetting - simplify webpack.config file and use babel-require to run it esnext and typescript: - update Webpack and related dependencies to support the latest beta.25 - use the external aurelia-protractor-plugin typescript: - update to ^2.1 - remove babel dependency and 2nd transpile step (async/await supported natively) - fix protractor typings - add typings to blur-image - enable strictNullChecks by default - convert the config file to TypeScript fix #696, #695, #670, #664, #628 * fix(circleCI): fix typo and temporarily disable testing JSPM JSPM waiting on fixes from #709 * fix(typescript-webpack): remove leftover code
1 parent 3e300cf commit 26aefc8

18 files changed

+261
-329
lines changed

.editorconfig

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
# 2 space indentation
12+
[**.*]
13+
indent_style = space
14+
indent_size = 2

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ npm-debug.log*
77
/.awcache
88
/electron.js*
99
/release
10-
/test/coverage
10+
/test/coverage
11+
yarn.lock

.vscode/extensions.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"recommendations": [
3+
"AureliaEffect.aurelia",
4+
"msjsdiag.debugger-for-chrome",
5+
"steoates.autoimport",
6+
"EditorConfig.EditorConfig",
7+
"christian-kohler.path-intellisense",
8+
"behzad88.Aurelia"
9+
]
10+
}

custom_typings/aurelia-protractor.d.ts

-19
This file was deleted.

index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5-
<title><%- webpackConfig.metadata.title %></title>
5+
<title><%- htmlWebpackPlugin.options.metadata.title %></title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<base href="<%- webpackConfig.metadata.baseUrl %>">
7+
<base href="<%- htmlWebpackPlugin.options.metadata.baseUrl %>">
88
<!-- imported CSS are concatenated and added automatically -->
99
</head>
1010
<body aurelia-app="main">
1111
<div class="splash">
12-
<div class="message"><%- webpackConfig.metadata.title %></div>
12+
<div class="message"><%- htmlWebpackPlugin.options.metadata.title %></div>
1313
<i class="fa fa-spinner fa-spin"></i>
1414
</div>
15-
<% if (webpackConfig.metadata.ENV === 'development') { %>
15+
<% if (htmlWebpackPlugin.options.metadata.ENV === 'development') { %>
1616
<!-- Webpack Dev Server reload -->
1717
<script src="/webpack-dev-server.js"></script>
1818
<% } %>

package.json

+59-71
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,41 @@
22
"name": "aurelia-skeleton-navigation-webpack",
33
"version": "1.0.3",
44
"description": "A starter kit for building a standard navigation-style app with Aurelia and webpack.",
5-
"main": "dist/electron.js",
6-
"productName": "Aurelia Electron",
5+
"main": "dist/main.js",
76
"scripts": {
7+
"pretest": "del test/coverage",
88
"test": "cross-env NODE_ENV=test ./node_modules/karma/bin/karma start test/karma.conf.js",
9+
"test:debug": "npm test -- --single-run=false --debug",
910
"webdriver:update": "cross-env ./node_modules/.bin/webdriver-manager update",
1011
"webdriver:start": "cross-env ./node_modules/.bin/webdriver-manager start",
1112
"pree2e": "npm run webdriver:update -- --standalone",
12-
"e2e": "concurrently --kill-others \"npm run e2e:start-when-ready\" \"cross-env WEBPACK_PORT=19876 npm start\"",
13-
"e2e:start-when-ready": "wait-on --timeout 20000 http-get://localhost:19876/index.html && npm run e2e:start",
13+
"e2e": "concurrently --success first --kill-others \"npm run e2e:start-when-ready\" \"cross-env WEBPACK_PORT=19876 npm start\"",
14+
"e2e:start-when-ready": "wait-on --timeout 120000 http-get://localhost:19876/index.html && npm run e2e:start",
1415
"e2e:start": "cross-env ./node_modules/.bin/protractor test/protractor.conf.js",
1516
"e2e:live": "npm run e2e:start -- --elementExplorer",
16-
"clean": "npm cache clean && rimraf node_modules test/coverage dist",
17-
"clean:dist": "rimraf dist",
17+
"clean": "npm cache clean && del node_modules test/coverage dist",
18+
"clean:dist": "del dist",
1819
"preclean:install": "npm run clean",
19-
"clean:install": "npm set progress=false && npm install",
20+
"clean:install": "npm install",
2021
"preclean:start": "npm run clean",
2122
"clean:start": "npm start",
2223
"watch": "npm run watch:dev",
2324
"watch:dev": "npm run build:dev -- --watch",
2425
"watch:dev:hmr": "npm run watch:dev -- --hot",
2526
"watch:test": "npm run test -- --auto-watch --no-single-run",
2627
"watch:prod": "npm run build:prod -- --watch",
27-
"build": "cross-env NODE_ENV=development npm run build:dev",
28+
"build": "npm run build:dev",
2829
"prebuild:dev": "npm run clean:dist",
2930
"build:dev": "cross-env NODE_ENV=development npm run webpack -- --progress --profile",
3031
"prebuild:prod": "npm run clean:dist",
3132
"build:prod": "cross-env NODE_ENV=production npm run webpack -- --progress --profile",
3233
"start": "npm run server:dev",
3334
"server": "npm run server:dev",
34-
"server:dev": "cross-env NODE_ENV=development node ./node_modules/webpack-dev-server/bin/webpack-dev-server --inline --progress --profile --watch",
35+
"server:dev": "cross-env NODE_ENV=development npm run webpack-dev-server -- --inline --progress --profile --watch",
3536
"server:dev:hmr": "npm run server:dev -- --hot",
3637
"server:prod": "http-server dist --cors",
37-
"webpack": "cross-env ./node_modules/.bin/webpack",
38-
"webpack-dev-server": "cross-env ./node_modules/.bin/webpack-dev-server"
38+
"webpack": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' ./node_modules/.bin/webpack",
39+
"webpack-dev-server": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' ./node_modules/.bin/webpack-dev-server"
3940
},
4041
"repository": {
4142
"type": "git",
@@ -69,79 +70,66 @@
6970
"dependencies": {
7071
"aurelia-bootstrapper-webpack": "^1.0.0",
7172
"aurelia-event-aggregator": "^1.0.0",
72-
"aurelia-fetch-client": "^1.0.0",
73-
"aurelia-framework": "^1.0.0",
73+
"aurelia-fetch-client": "^1.0.1",
74+
"aurelia-framework": "^1.0.7",
7475
"aurelia-history-browser": "^1.0.0",
75-
"aurelia-loader-webpack": "^1.0.0",
76+
"aurelia-loader-webpack": "^1.0.3",
7677
"aurelia-logging-console": "^1.0.0",
7778
"aurelia-pal-browser": "^1.0.0",
78-
"aurelia-polyfills": "^1.0.0",
79-
"aurelia-route-recognizer": "^1.0.0",
80-
"aurelia-router": "^1.0.2",
79+
"aurelia-polyfills": "^1.1.1",
80+
"aurelia-route-recognizer": "^1.1.0",
81+
"aurelia-router": "^1.0.7",
8182
"aurelia-templating-binding": "^1.0.0",
82-
"aurelia-templating-resources": "^1.0.0",
83+
"aurelia-templating-resources": "^1.1.1",
8384
"aurelia-templating-router": "^1.0.0",
84-
"bluebird": "^3.4.1",
85+
"bluebird": "^3.4.6",
8586
"bootstrap": "^3.3.7",
86-
"font-awesome": "^4.6.3",
87+
"font-awesome": "^4.7.0",
8788
"isomorphic-fetch": "^2.2.1",
88-
"jquery": "^3.1.0"
89+
"jquery": "^3.1.1"
8990
},
9091
"devDependencies": {
91-
"@easy-webpack/config-aurelia": "^2.0.1",
92-
"@easy-webpack/config-babel": "^2.0.2",
93-
"@easy-webpack/config-common-chunks-simple": "^2.0.1",
94-
"@easy-webpack/config-copy-files": "^1.0.0",
95-
"@easy-webpack/config-css": "^2.3.2",
96-
"@easy-webpack/config-env-development": "^2.1.1",
97-
"@easy-webpack/config-env-production": "^2.1.0",
98-
"@easy-webpack/config-external-source-maps": "^2.0.1",
99-
"@easy-webpack/config-fonts-and-images": "^1.2.1",
100-
"@easy-webpack/config-generate-index-html": "^2.0.1",
101-
"@easy-webpack/config-global-bluebird": "^1.2.0",
102-
"@easy-webpack/config-global-jquery": "^1.2.0",
103-
"@easy-webpack/config-global-regenerator": "^1.2.0",
104-
"@easy-webpack/config-html": "^2.0.2",
105-
"@easy-webpack/config-json": "^2.0.2",
106-
"@easy-webpack/config-source-map-support": "^1.0.0",
107-
"@easy-webpack/config-test-coverage-istanbul": "^2.0.2",
108-
"@easy-webpack/config-typescript": "^2.1.2",
109-
"@easy-webpack/config-uglify": "^2.1.0",
110-
"@easy-webpack/core": "^1.3.2",
111-
"@types/bluebird": "^2.0.29",
112-
"@types/jasmine": "^2.2.30",
113-
"@types/whatwg-fetch": "0.0.27",
114-
"aurelia-tools": "^0.2.4",
115-
"babel-plugin-transform-decorators-legacy": "^1.3.4",
116-
"babel-preset-es2015": "^6.9.0",
117-
"babel-preset-es2015-loose": "^7.0.0",
118-
"babel-preset-es2015-loose-native-modules": "^1.0.0",
119-
"babel-preset-stage-1": "^6.5.0",
120-
"babel-register": "^6.11.6",
121-
"concurrently": "^2.2.0",
122-
"cross-env": "^2.0.0",
92+
"@easy-webpack/config-aurelia": "^2.2.2",
93+
"@easy-webpack/config-common-chunks-simple": "^2.0.3",
94+
"@easy-webpack/config-copy-files": "^1.1.2",
95+
"@easy-webpack/config-css": "^3.1.0",
96+
"@easy-webpack/config-env-development": "^2.1.4",
97+
"@easy-webpack/config-env-production": "^2.2.2",
98+
"@easy-webpack/config-external-source-maps": "^3.1.0",
99+
"@easy-webpack/config-fonts-and-images": "^2.1.0",
100+
"@easy-webpack/config-generate-index-html": "^2.1.1",
101+
"@easy-webpack/config-global-bluebird": "^2.1.0",
102+
"@easy-webpack/config-global-jquery": "^2.1.0",
103+
"@easy-webpack/config-html": "^3.1.0",
104+
"@easy-webpack/config-json": "^3.1.0",
105+
"@easy-webpack/config-source-map-support": "^1.0.2",
106+
"@easy-webpack/config-test-coverage-istanbul": "^3.2.0",
107+
"@easy-webpack/config-typescript": "^4.0.0",
108+
"@easy-webpack/config-uglify": "^2.2.3",
109+
"@easy-webpack/core": "^1.4.5",
110+
"@types/bluebird": "^3.0.35",
111+
"@types/jasmine": "^2.5.37",
112+
"@types/webpack": "^1.12.35",
113+
"@types/whatwg-fetch": "^0.0.32",
114+
"aurelia-protractor-plugin": "^1.0.0",
115+
"concurrently": "^3.1.0",
116+
"cross-env": "^3.1.3",
117+
"del-cli": "^0.2.0",
123118
"http-server": "^0.9.0",
124-
"jasmine-core": "^2.4.1",
125-
"karma": "^1.1.2",
126-
"karma-chrome-launcher": "^1.0.1",
119+
"jasmine-core": "^2.5.2",
120+
"karma": "^1.3.0",
121+
"karma-chrome-launcher": "^2.0.0",
127122
"karma-coverage": "^1.1.1",
128123
"karma-jasmine": "^1.0.2",
129-
"karma-mocha-reporter": "^2.0.4",
130-
"karma-remap-istanbul": "^0.1.1",
124+
"karma-mocha-reporter": "^2.2.0",
125+
"karma-remap-istanbul": "^0.2.1",
131126
"karma-sourcemap-loader": "^0.3.7",
132-
"karma-webpack": "^1.7.0",
133-
"protractor": "^4.0.0",
134-
"rimraf": "^2.5.4",
135-
"ts-node": "^1.2.1",
136-
"typescript": "^2.0.0",
137-
"wait-on": "^1.5.2",
138-
"webpack": "2.1.0-beta.22",
127+
"karma-webpack": "^1.8.0",
128+
"protractor": "^4.0.10",
129+
"ts-node": "^1.7.0",
130+
"typescript": "^2.1",
131+
"wait-on": "^1.5.3",
132+
"webpack": "2.1.0-beta.25",
139133
"webpack-dev-server": ">=2.1.0-beta.0 || ^2.1.0"
140-
},
141-
"babel": {
142-
"presets": [
143-
"es2015",
144-
"stage-1"
145-
]
146134
}
147135
}

0 commit comments

Comments
 (0)