diff --git a/build b/build index e15d0d2..4f4e0de 100755 --- a/build +++ b/build @@ -33,8 +33,6 @@ def main(): *args, ], **kwargs) - # TODO do I need that back for dev manifest?? - # "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'" maybe_release = {'NODE_ENV': 'production'} if args.release else {} env = { 'TARGET': target, diff --git a/src/manifest.json b/src/manifest.json index f3e20d6..e01685d 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,5 +1,4 @@ { - "short_name": "grasp", "icons": { "128": "unicorn.png" }, diff --git a/webpack.config.js b/webpack.config.js index c3f7b08..37cd30b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -12,7 +12,9 @@ const pkg = require('./package.json'); const baseManifest = require('./src/manifest.json'); const target = env.TARGET; -const pkg_name = env.ANY_HOST ? "grasp (any host)" : "grasp"; +const dev = env.NODE_ENV === "development"; + +const pkg_name = (env.ANY_HOST ? "grasp (any host)" : "grasp") + (dev ? ' [dev]' : ''); // TODO make permissions literate const permissions = [ @@ -56,6 +58,10 @@ const manifestExtra = { commands: commandsExtra, }; +if (dev) { + manifestExtra.content_security_policy = "script-src 'self' 'unsafe-eval'; object-src 'self'"; +} + if (target === 'chrome') { manifestExtra.options_ui = {chrome_style: true}; }