diff --git a/.babelrc b/.babelrc new file mode 100644 index 000000000..cbd3ac60a --- /dev/null +++ b/.babelrc @@ -0,0 +1,8 @@ +{ + "presets": [ + "es2015" + ], + "plugins": [ + "transform-runtime" + ] +} diff --git a/package.json b/package.json index 7c2441b98..5ac7f5547 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 ee7d75e4b..4696203ee 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: '