This repository has been archived by the owner on May 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[package][grunt][nj] add JS hot reloading
- Loading branch information
1 parent
21b17db
commit a730ed4
Showing
8 changed files
with
92 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
SystemJS.config({ | ||
baseURL: "assets/scripts", | ||
paths: { | ||
"npm:": "jspm_packages/npm/", | ||
"kotsu/": "source/scripts/" | ||
baseURL: "/source/scripts", | ||
browserConfig: { | ||
"paths": { | ||
"npm:": "/jspm_packages/npm/", | ||
"github:": "/jspm_packages/github/", | ||
"kotsu/": "" | ||
} | ||
}, | ||
nodeConfig: { | ||
"paths": { | ||
"npm:": "jspm_packages/npm", | ||
"github:": "jspm_packages/github", | ||
"kotsu/": "source/scripts/" | ||
} | ||
}, | ||
devConfig: { | ||
"map": { | ||
"plugin-babel": "npm:[email protected]", | ||
"systemjs-hot-reloader": "npm:[email protected]", | ||
"systemjs-plugin-json": "npm:[email protected]" | ||
} | ||
}, | ||
meta: { | ||
"*.json": { | ||
"loader": "systemjs-plugin-json" | ||
}, | ||
"packages": { | ||
"npm:[email protected]": { | ||
"map": { | ||
"systemjs-hmr": "npm:[email protected]" | ||
} | ||
} | ||
} | ||
}, | ||
transpiler: "plugin-babel", | ||
|
@@ -23,9 +36,15 @@ SystemJS.config({ | |
"meta": { | ||
"*.js": { | ||
"loader": "plugin-babel" | ||
}, | ||
"*.json": { | ||
"loader": "systemjs-plugin-json" | ||
} | ||
} | ||
} | ||
}, | ||
map: { | ||
"@hot": "@empty" | ||
} | ||
}); | ||
|
||
|
@@ -35,7 +54,25 @@ SystemJS.config({ | |
"npm:*.json" | ||
], | ||
map: { | ||
"jquery": "npm:[email protected]" | ||
"babel-polyfill": "npm:[email protected]", | ||
"fs": "npm:[email protected]", | ||
"jquery": "npm:[email protected]", | ||
"path": "npm:[email protected]", | ||
"process": "npm:[email protected]" | ||
}, | ||
packages: {} | ||
packages: { | ||
"npm:[email protected]": { | ||
"map": { | ||
"babel-runtime": "npm:[email protected]", | ||
"core-js": "npm:[email protected]", | ||
"regenerator-runtime": "npm:[email protected]" | ||
} | ||
}, | ||
"npm:[email protected]": { | ||
"map": { | ||
"core-js": "npm:[email protected]", | ||
"regenerator-runtime": "npm:[email protected]" | ||
} | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,11 +87,13 @@ | |
"babel-jest": "19.0.0", | ||
"babel-polyfill": "6.23.0", | ||
"babel-preset-env": "1.4.0", | ||
"chokidar-socket-emitter": "0.6.0", | ||
"grunt-browser-sync": "2.2.0", | ||
"grunt-contrib-watch": "1.0.0", | ||
"grunt-newer": "1.3.0", | ||
"jest": "19.0.2", | ||
"jest-jspm": "^0.1.2", | ||
"jest-jspm": "0.1.2", | ||
"npm-run-all": "4.0.2", | ||
"snazzy": "6.0.0", | ||
"standard": "10.0.2", | ||
"stylelint": "7.10.0", | ||
|
@@ -105,12 +107,19 @@ | |
"name": "kotsu", | ||
"main": "main.js", | ||
"dependencies": { | ||
"babel-polyfill": "npm:babel-polyfill@^6.23.0", | ||
"jquery": "npm:jquery@^3.2.0" | ||
}, | ||
"devDependencies": { | ||
"plugin-babel": "npm:systemjs-plugin-babel@^0.0.21", | ||
"systemjs-hot-reloader": "npm:systemjs-hot-reloader@^1.1.0", | ||
"systemjs-plugin-json": "npm:systemjs-plugin-json@^0.3.0" | ||
}, | ||
"peerDependencies": { | ||
"fs": "npm:jspm-nodelibs-fs@^0.2.0", | ||
"path": "npm:jspm-nodelibs-path@^0.2.0", | ||
"process": "npm:jspm-nodelibs-process@^0.2.0" | ||
}, | ||
"overrides": { | ||
"npm:[email protected]": { | ||
"format": "amd" | ||
|
@@ -119,6 +128,11 @@ | |
}, | ||
"scripts": { | ||
"postinstall": "jspm config registries.github.auth $GITHUB_API_KEY && jspm install", | ||
"start": "npm-run-all --parallel grunt js:chokidar", | ||
"serve": "npm-run-all --parallel grunt:serve js:chokidar", | ||
"grunt": "grunt", | ||
"grunt:serve": "grunt serve", | ||
"js:chokidar": "cd ./source/scripts && chokidar-socket-emitter", | ||
"lint": "standard | snazzy && stylelint \"**/*.{css,scss,sass}\" \"!{jspm_packages,build,temp}/**\"", | ||
"test": "npm run lint && node tests/utils/jest.js", | ||
"test:watch": "node tests/utils/jest.js --watch", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters