Install vue and babel dependency

This commit is contained in:
Yukai Huang 2016-12-24 11:10:18 +08:00
parent d6ae7a36ae
commit a06fad974e
4 changed files with 21 additions and 0 deletions

8
.babelrc Normal file
View file

@ -0,0 +1,8 @@
{
"presets": [
"es2015"
],
"plugins": [
"transform-runtime"
]
}

View file

@ -115,6 +115,7 @@
"velocity-animate": "^1.4.0", "velocity-animate": "^1.4.0",
"visibilityjs": "^1.2.4", "visibilityjs": "^1.2.4",
"viz.js": "^1.4.1", "viz.js": "^1.4.1",
"vue": "^2.1.6",
"winston": "^2.3.0", "winston": "^2.3.0",
"xss": "^0.3.2" "xss": "^0.3.2"
}, },
@ -139,6 +140,12 @@
"url": "https://github.com/hackmdio/hackmd.git" "url": "https://github.com/hackmdio/hackmd.git"
}, },
"devDependencies": { "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", "copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.26.1", "css-loader": "^0.26.1",
"ejs-loader": "^0.3.0", "ejs-loader": "^0.3.0",

View file

@ -28,6 +28,8 @@ var saveAs = require('file-saver').saveAs;
var List = require('list.js'); var List = require('list.js');
var S = require('string'); var S = require('string');
import Vue from 'vue';
var options = { var options = {
valueNames: ['id', 'text', 'timestamp', 'fromNow', 'time', 'tags', 'pinned'], valueNames: ['id', 'text', 'timestamp', 'fromNow', 'time', 'tags', 'pinned'],
item: '<li class="col-xs-12 col-sm-6 col-md-6 col-lg-4">\ item: '<li class="col-xs-12 col-sm-6 col-md-6 col-lg-4">\

View file

@ -372,6 +372,10 @@ module.exports = {
loaders: [{ loaders: [{
test: /\.json$/, test: /\.json$/,
loader: 'json-loader' loader: 'json-loader'
}, {
test: /\.js$/,
loader: 'babel',
exclude: [/node_modules/, /public\/vendor/]
}, { }, {
test: /\.css$/, test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader') loader: ExtractTextPlugin.extract('style-loader', 'css-loader')