summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.babelrc8
-rw-r--r--package.json7
-rw-r--r--public/js/cover.js2
-rw-r--r--webpackBaseConfig.js4
4 files changed, 21 insertions, 0 deletions
diff --git a/.babelrc b/.babelrc
new file mode 100644
index 00000000..cbd3ac60
--- /dev/null
+++ b/.babelrc
@@ -0,0 +1,8 @@
+{
+ "presets": [
+ "es2015"
+ ],
+ "plugins": [
+ "transform-runtime"
+ ]
+}
diff --git a/package.json b/package.json
index 7c2441b9..5ac7f554 100644
--- a/package.json
+++ b/package.json
@@ -115,6 +115,7 @@
"velocity-animate": "^1.4.0",
"visibilityjs": "^1.2.4",
"viz.js": "^1.4.1",
+ "vue": "^2.1.6",
"winston": "^2.3.0",
"xss": "^0.3.2"
},
@@ -139,6 +140,12 @@
"url": "https://github.com/hackmdio/hackmd.git"
},
"devDependencies": {
+ "babel-cli": "^6.18.0",
+ "babel-core": "^6.21.0",
+ "babel-loader": "^6.2.10",
+ "babel-plugin-transform-runtime": "^6.15.0",
+ "babel-preset-es2015": "^6.18.0",
+ "babel-runtime": "^6.20.0",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.26.1",
"ejs-loader": "^0.3.0",
diff --git a/public/js/cover.js b/public/js/cover.js
index ee7d75e4..4696203e 100644
--- a/public/js/cover.js
+++ b/public/js/cover.js
@@ -28,6 +28,8 @@ var saveAs = require('file-saver').saveAs;
var List = require('list.js');
var S = require('string');
+import Vue from 'vue';
+
var options = {
valueNames: ['id', 'text', 'timestamp', 'fromNow', 'time', 'tags', 'pinned'],
item: '<li class="col-xs-12 col-sm-6 col-md-6 col-lg-4">\
diff --git a/webpackBaseConfig.js b/webpackBaseConfig.js
index 400db14b..5c715cc2 100644
--- a/webpackBaseConfig.js
+++ b/webpackBaseConfig.js
@@ -373,6 +373,10 @@ module.exports = {
test: /\.json$/,
loader: 'json-loader'
}, {
+ test: /\.js$/,
+ loader: 'babel',
+ exclude: [/node_modules/, /public\/vendor/]
+ }, {
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
}, {