Skip to content

Commit

Permalink
manifest.json with version from package.json (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr authored May 24, 2019
1 parent 7d147b4 commit 72f4c39
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "polkadot{.js} extension",
"version": "0.1.0",
"manifest_version": 2,
"permissions": ["activeTab", "storage"],
"background": {
Expand Down
3 changes: 2 additions & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"extensionizer": "^1.0.1",
"extract-loader": "^3.1.0",
"file-loader": "^3.0.1",
"html-loader": "^0.5.5"
"html-loader": "^0.5.5",
"webpack-extension-manifest-plugin": "^0.4.3"
}
}
17 changes: 14 additions & 3 deletions packages/extension/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
const path = require('path');
const webpack = require('webpack');

const CopyWebpackPlugin = require('copy-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const ManifestPlugin = require('webpack-extension-manifest-plugin');

const pkgJson = require('./package.json');
const manifest = require('./manifest.json');

const packages = [
'extension',
'extension-ui'
];

function createWebpack ({ alias = {}, context }) {
const pkgJson = require(path.join(context, 'package.json'));
const ENV = process.env.NODE_ENV || 'development';
const isProd = ENV === 'production';

Expand Down Expand Up @@ -83,7 +86,15 @@ function createWebpack ({ alias = {}, context }) {
PKG_VERSION: JSON.stringify(pkgJson.version),
}
}),
new CopyWebpackPlugin([{ from: 'public' }])
new CopyPlugin([{ from: 'public' }]),
new ManifestPlugin({
config: {
base: manifest,
extend: {
version: pkgJson.version
}
}
})
].filter((entry) => entry),
watch: !isProd
};
Expand Down
78 changes: 43 additions & 35 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1697,9 +1697,9 @@
integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==

"@octokit/endpoint@^5.1.0":
version "5.1.2"
resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.1.2.tgz#45fd879e33a25ee10fa4cffc4d098ee04135afe6"
integrity sha512-bBGGmcRFq1x0jrB29G/9KjYmO3cdHfk3476B2JOHRvLsNw1Pn3l+ZvbiqtcO9qAS4Ti+zFedLB84ziHZRZclQA==
version "5.1.3"
resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.1.3.tgz#b503e56c74663a601e6e03c8eb6d143f4653d34d"
integrity sha512-ePx9kcUo0agRk0HaXhl+pKMXpBH1O3CAygwWIh7GT5i5kcUr8QowS0GBaZPirr1e0PqaFYr41hQfcUBA1R5AEQ==
dependencies:
deepmerge "3.2.0"
is-plain-object "^3.0.0"
Expand Down Expand Up @@ -1733,9 +1733,9 @@
universal-user-agent "^2.1.0"

"@octokit/rest@^16.16.0":
version "16.26.0"
resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.26.0.tgz#5c12b28763219045e1c9a15182e8dfaed10004e8"
integrity sha512-NBpzre44ZAQWZhlH+zUYTgqI0pHN+c9rNj4d+pCydGEiKTGc1HKmoTghEUyr9GxazDyoAvmpx9nL0I7QS1Olvg==
version "16.27.0"
resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.27.0.tgz#6c2d1cba3efb8866ef2741c64d23b8f257c9dc89"
integrity sha512-UvCxVOCfHzEhOaltSKQBy81kMqQ+hglF3rAR4STut4WWr2tXvVnrIkGxeblO0TvmTt5zuxfgQfgG5kAHUT44RA==
dependencies:
"@octokit/request" "^4.0.1"
"@octokit/request-error" "^1.0.2"
Expand Down Expand Up @@ -2192,9 +2192,9 @@
"@types/jest-diff" "*"

"@types/lodash@^4.14.110":
version "4.14.130"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.130.tgz#04b3a690d5f4fc34579963c99adae067b8c8eb5a"
integrity sha512-H++wk0tbneBsRVfLkgAAd0IIpmpVr2Bj4T0HncoOsQf3/xrJexRYQK2Tqo0Ej3pFslM8GkMgdis9bu6xIb1ycw==
version "4.14.132"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.132.tgz#8ce45ca8745ff2e004fac0de0ab46f61e390ffa0"
integrity sha512-RNUU1rrh85NgUJcjOOr96YXr+RHwInGbaQCZmlitqOaCKXffj8bh+Zxwuq5rjDy5OgzFldDVoqk4pyLEDiwxIw==

"@types/marked@^0.4.0":
version "0.4.2"
Expand Down Expand Up @@ -3141,12 +3141,12 @@ array-unique@^0.3.2:
integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=

array.prototype.find@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.0.4.tgz#556a5c5362c08648323ddaeb9de9d14bc1864c90"
integrity sha1-VWpcU2LAhkgyPdrrnenRS8GGTJA=
version "2.1.0"
resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.1.0.tgz#630f2eaf70a39e608ac3573e45cf8ccd0ede9ad7"
integrity sha512-Wn41+K1yuO5p7wRZDl7890c3xvv5UBrfVXTVIe28rSQb6LS0fZMDrQB6PAcxQFRFy6vJTLDc3A2+3CjQdzVKRg==
dependencies:
define-properties "^1.1.2"
es-abstract "^1.7.0"
define-properties "^1.1.3"
es-abstract "^1.13.0"

array.prototype.flat@^1.2.1:
version "1.2.1"
Expand Down Expand Up @@ -4408,7 +4408,7 @@ core-js@^1.0.0:
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=

core-js@^2.4.0, core-js@^2.6.5:
core-js@^2.4.0, core-js@^2.6.1, core-js@^2.6.5:
version "2.6.8"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.8.tgz#dc3a1e633a04267944e0cb850d3880f340248139"
integrity sha512-RWlREFU74TEkdXzyl1bka66O3kYp8jeTXrvJZDzVVMH8AiHUSOFpL1yfhQJ+wHocAm1m+4971W1PPzfLuCv1vg==
Expand Down Expand Up @@ -4879,7 +4879,7 @@ deep-is@~0.1.3:
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=

deepmerge@3.2.0:
deepmerge@3.2.0, deepmerge@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.2.0.tgz#58ef463a57c08d376547f8869fdc5bcee957f44e"
integrity sha512-6+LuZGU7QCNUnAJyX8cIrlzoEgggTM6B7mm+znKOX4t5ltluT9KLjN6g61ECMS0LTsLW7yDpNoxhix5FZcrIow==
Expand Down Expand Up @@ -5214,9 +5214,9 @@ ee-first@1.1.1:
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=

electron-to-chromium@^1.3.133:
version "1.3.136"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.136.tgz#758a156109077536780cfa8207b1aeaa99843e33"
integrity sha512-xHkYkbEi4kI+2w5v6yBGCQTRXL7N0PWscygTFZu/1bArnPSo2WR9xjdw4m06RR4J5PncrWJcuOVv+MAG2mK5JQ==
version "1.3.137"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.137.tgz#ba7c88024984c038a5c5c434529aabcea7b42944"
integrity sha512-kGi32g42a8vS/WnYE7ELJyejRT7hbr3UeOOu0WeuYuQ29gCpg9Lrf6RdcTQVXSt/v0bjCfnlb/EWOOsiKpTmkw==

elliptic@^6.0.0, elliptic@^6.4.1:
version "6.4.1"
Expand Down Expand Up @@ -5364,7 +5364,7 @@ error-inject@^1.0.0:
resolved "https://registry.yarnpkg.com/error-inject/-/error-inject-1.0.0.tgz#e2b3d91b54aed672f309d950d154850fa11d4f37"
integrity sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc=

es-abstract@^1.10.0, es-abstract@^1.11.0, es-abstract@^1.12.0, es-abstract@^1.5.0, es-abstract@^1.5.1, es-abstract@^1.7.0:
es-abstract@^1.10.0, es-abstract@^1.11.0, es-abstract@^1.12.0, es-abstract@^1.13.0, es-abstract@^1.5.0, es-abstract@^1.5.1:
version "1.13.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9"
integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==
Expand Down Expand Up @@ -8423,9 +8423,9 @@ map-visit@^1.0.0:
object-visit "^1.0.0"

markdown-it-anchor@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-5.0.2.tgz#cdd917a05b7bf92fb736a6dae3385c6d0d0fa552"
integrity sha512-AFM/woBI8QDJMS/9+MmsBMT5/AR+ImfOsunQZTZhzcTmna3rIzAzbOh5E0l6mlFM/i9666BpUtkqQ9bS7WApCg==
version "5.1.0"
resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-5.1.0.tgz#197236c448e09ae839c1edb9dd188fa5ae27c36a"
integrity sha512-wJOmyXzDUxI8iuowEsaQAKMQBButhSw8j64SpgcaL75QZYC/OSZV66Fnr50lfMLYNGtV0rJdw2fmLwXCT6T+bw==

markdown-it-chain@^1.3.0:
version "1.3.0"
Expand Down Expand Up @@ -9045,9 +9045,9 @@ node-pre-gyp@^0.12.0:
tar "^4"

node-releases@^1.1.19:
version "1.1.20"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.20.tgz#f77f9f9a4fcb22e74ba88fe15732a3a8b037146d"
integrity sha512-YnC3NemTLgzOkQTmR4+0yl/7pIsXZcfWXoquNp0Dql03GQ+CYURhnjUDFsSJxpX/Q9nw8lAjLFdnACQoKs6h5w==
version "1.1.21"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.21.tgz#46c86f9adaceae4d63c75d3c2f2e6eee618e55f3"
integrity sha512-TwnURTCjc8a+ElJUjmDqU6+12jhli1Q61xOQmdZ7ECZVBZuQpN/1UnembiIHDM1wCcfLvh5wrWXUF5H6ufX64Q==
dependencies:
semver "^5.3.0"

Expand Down Expand Up @@ -10559,9 +10559,9 @@ react-dom@^16.8.6:
scheduler "^0.13.6"

react-hot-loader@^4.8.7:
version "4.8.7"
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.8.7.tgz#8bcec3105d4e0e3cba52aa59800568fc9fb3322d"
integrity sha512-ctWAu8iwp37qd4w1qhjN6neDA1e5bSmAUY46L2l5SeK+i8AfzX+7lrpaLW4TJVaiBv5MlqIzA1ClNnvlvsy5Lg==
version "4.8.8"
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.8.8.tgz#71e3c7ba301556aa24c52cef2f6ed0af82395eea"
integrity sha512-58bgeS7So8V93MhhnKogbraor8xdrTncil+b6IoIXkTIr3blJNAE7bU4tn/iJvy2J7rjxQmKFRaxKrWdKUZpqg==
dependencies:
fast-levenshtein "^2.0.6"
global "^4.3.0"
Expand Down Expand Up @@ -11231,9 +11231,9 @@ selfsigned@^1.10.4:
integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==

semver@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.0.0.tgz#05e359ee571e5ad7ed641a6eec1e547ba52dea65"
integrity sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==
version "6.1.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.0.tgz#e95dc415d45ecf03f2f9f83b264a6b11f49c0cca"
integrity sha512-kCqEOOHoBcFs/2Ccuk4Xarm/KiWRSLEX9CAZF8xkJ6ZPlIoTZ8V5f7J16vYLJqDbR7KrxTJpR2lqjIEm2Qx9cQ==

semver@~5.3.0:
version "5.3.0"
Expand Down Expand Up @@ -12906,6 +12906,14 @@ webpack-dev-server@^3.1.14:
webpack-log "^2.0.0"
yargs "12.0.5"

webpack-extension-manifest-plugin@^0.4.3:
version "0.4.3"
resolved "https://registry.yarnpkg.com/webpack-extension-manifest-plugin/-/webpack-extension-manifest-plugin-0.4.3.tgz#53a926aabdd5f350c3b4546c34ee17a5d747af83"
integrity sha512-94tiXiazs7+xmforcatBhzm4id1BDLMBJQTriAuSpLe7ZL7pbqRN6lSXBDrV3NG9C4cwr9zgGp9hZ8sWOB9cLQ==
dependencies:
core-js "^2.6.1"
deepmerge "^3.0.0"

webpack-log@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f"
Expand Down Expand Up @@ -12954,9 +12962,9 @@ webpack-sources@^1.1.0, webpack-sources@^1.3.0:
source-map "~0.6.1"

webpack@^4.30.0, webpack@^4.8.1:
version "4.32.1"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.32.1.tgz#afe0cc7dd2b196e5a58f8d1d385311cfbb5d68c0"
integrity sha512-R0S2tfWP2tZ8ZC2dwgnUVfa9LPvhGWJXjqfgIQ6jply+9ncBbt8IZ9p83uVeqsZ/s8zKA3XyepciWNHnSxxnHg==
version "4.32.2"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.32.2.tgz#3639375364a617e84b914ddb2c770aed511e5bc8"
integrity sha512-F+H2Aa1TprTQrpodRAWUMJn7A8MgDx82yQiNvYMaj3d1nv3HetKU0oqEulL9huj8enirKi8KvEXQ3QtuHF89Zg==
dependencies:
"@webassemblyjs/ast" "1.8.5"
"@webassemblyjs/helper-module-context" "1.8.5"
Expand Down

0 comments on commit 72f4c39

Please sign in to comment.