Skip to content

Commit

Permalink
Merge pull request #3 from jmcriffey/pwa
Browse files Browse the repository at this point in the history
Support short_name, readable manifest, move deps
  • Loading branch information
aweary authored Nov 23, 2016
2 parents 1828bed + 7af31e6 commit d9c2b18
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions packages/electrode-archetype-react-app-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"eslint-plugin-filenames": "^0.1.2",
"eslint-plugin-react": "^3.16.1",
"extract-text-webpack-plugin": "^1.0.1",
"favicons-webpack-plugin": "0.0.7",
"file-loader": "^0.8.4",
"fs-extra": "^0.26.5",
"glob": "^7.0.6",
Expand Down Expand Up @@ -70,8 +71,10 @@
"stylus": "^0.54.5",
"stylus-relative-loader": "^3.0.0",
"sw-precache": "^4.0.0",
"sw-precache-webpack-plugin": "^0.6.2",
"sw-toolbox": "^3.2.1",
"url-loader": "^0.5.6",
"web-app-manifest-loader": "^0.1.1",
"webpack": "^1.12.14",
"webpack-dev-server": "^1.14.1",
"webpack-partial": "^1.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ module.exports = function () {
background: "#FFFFFF",
logo: "./images/electrode.png",
title: "Electrode",
short_name: "Electrode",
statsFilename: "../server/iconstats.json"
}, swConfig.manifest);

Expand Down Expand Up @@ -140,6 +141,7 @@ module.exports = function () {
}),
new AddManifestFieldsPlugin({
gcm_sender_id: manifestConfig.gcm_sender_id,
short_name: manifestConfig.short_name,
theme_color: manifestConfig.theme_color
}),
new SWPrecacheWebpackPlugin(cacheConfig),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ AddManifestFieldsPlugin.prototype.apply = function(compiler) {
for (var field in fields) {
manifest[field] = fields[field];
}
var newManifestAsset = JSON.stringify(manifest);
var newManifestAsset = JSON.stringify(manifest, null, 2);
compilation.assets[filename] = {
source: function() {
return newManifestAsset;
Expand All @@ -41,4 +41,4 @@ AddManifestFieldsPlugin.prototype.apply = function(compiler) {
});
}

module.exports = AddManifestFieldsPlugin;
module.exports = AddManifestFieldsPlugin;
5 changes: 1 addition & 4 deletions packages/electrode-archetype-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@
"babel-preset-react": "^6.3.13",
"babel-register": "^6.14.0",
"css-modules-require-hook": "^4.0.2",
"isomorphic-loader": "^1.0.0",
"favicons-webpack-plugin": "0.0.7",
"sw-precache-webpack-plugin": "^0.6.2",
"web-app-manifest-loader": "^0.1.1"
"isomorphic-loader": "^1.0.0"
},
"devDependencies": {
"babel-eslint": "^5.0.0",
Expand Down

0 comments on commit d9c2b18

Please sign in to comment.