aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-02-04 17:44:40 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2018-02-04 17:44:40 +0900
commit8ff200755f6b3661c405b14fe1ff6dc5b0f17dbd (patch)
treeb1835294e702c0af0d248f12b289482c35a96ebe
parentc57ba565463063ac69507294bca1f9e0dfccbe98 (diff)
add ambassador extension
-rw-r--r--.gitignore1
-rw-r--r--e2e/ambassador/src/background/index.js0
-rw-r--r--e2e/ambassador/src/content/index.js0
-rw-r--r--e2e/ambassador/webpack.config.js37
-rw-r--r--package.json4
5 files changed, 41 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 2515a99..07d22c4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/node_modules/
/build/
+/e2e/ambassador/build/
*.zip
diff --git a/e2e/ambassador/src/background/index.js b/e2e/ambassador/src/background/index.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e2e/ambassador/src/background/index.js
diff --git a/e2e/ambassador/src/content/index.js b/e2e/ambassador/src/content/index.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e2e/ambassador/src/content/index.js
diff --git a/e2e/ambassador/webpack.config.js b/e2e/ambassador/webpack.config.js
new file mode 100644
index 0000000..2a544bf
--- /dev/null
+++ b/e2e/ambassador/webpack.config.js
@@ -0,0 +1,37 @@
+const path = require('path');
+
+const src = path.resolve(__dirname, 'src');
+const dist = path.resolve(__dirname, 'build');
+
+config = {
+ entry: {
+ content: path.join(src, 'content'),
+ background: path.join(src, 'background')
+ },
+
+ output: {
+ path: dist,
+ filename: '[name].js'
+ },
+
+ module: {
+ loaders: [
+ {
+ test: [ /\.js$/ ],
+ exclude: /node_modules/,
+ loader: 'babel-loader',
+ query: {
+ presets: ['es2015']
+ }
+ }
+ ]
+ },
+
+ resolve: {
+ extensions: [ '.js' ],
+ modules: [path.join(__dirname, 'src'), 'node_modules']
+ }
+};
+
+module.exports = config
+
diff --git a/package.json b/package.json
index 1391496..0a48e3a 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,9 @@
"build": "NODE_ENV=production webpack --progress --display-error-details",
"package": "npm run build && script/package.sh",
"lint": "eslint --ext .jsx,.js src",
- "test": "karma start"
+ "test": "karma start",
+ "ambassador:start": "webpack -w --debug --context --devtool inline-source-map",
+ "ambassador:build": "webpack --context e2e/ambassador"
},
"repository": {
"type": "git",