git clone git@github.com:leinue/vue-feeds.git
ไฝฟ็จ8080็ซฏๅฃ๏ผๆณจๆ8080็ซฏๅฃๅซ่ขซๅ ็จ
npm install
npm run dev
or
npm install
webpack
or
npm install
webpack-dev-server
ๅฆๆๅบ็ฐ็ฑปไผผไปฅไธ้่ฏฏ
npm ERR! peerinvalid The package babel-runtime@6.3.19 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer vue-loader@7.5.3 wants babel-runtime@^5.8.0
ๆๅผpackage.jsonๆไปถ๏ผไฟฎๆนbabel-runtime็ๆฌๅทไธบ^5.8.0ๅณๅฏ
vim package.json
/babel-runtime
{
"name": "poimoe_poi",
"version": "0.0.1",
"description": "",
"main": "index.js",
"scripts": {
"dev": "webpack-dev-server --inline --hot --quiet",
"build": "export NODE_ENV=production && webpack --progress --hide-modules"
},
"private": true,
"author": "",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.2.1",
"babel-loader": "^6.2.0",
"babel-plugin-transform-runtime": "^6.1.18",
"babel-preset-es2015": "^6.1.18",
"babel-preset-stage-0": "^6.3.13",
"babel-runtime": "^5.8.0",
"bootstrap": "^3.3.6",
"css-loader": "^0.23.0",
"file-loader": "^0.8.5",
"jsx-loader": "^0.13.2",
"style-loader": "^0.13.0",
"url-loader": "^0.5.7",
"vue": "^1.0.10",
"vue-hot-reload-api": "^1.2.2",
"vue-html-loader": "^1.0.0",
"vue-loader": "^7.1.7",
"vue-resource": "^0.5.1",
"vue-router": "^0.7.7",
"vue-strap": "^1.0.2",
"webpack": "^1.12.9",
"webpack-dev-server": "^1.14.0"
}
}
module.exports = {
entry: './src/index.js',
output: {
path: __dirname,
filename: './dist/build.js'
},
module: {
loaders: [
{ test: /\.vue$/, loader: 'vue' },
{ test: /\.css$/, loader: "style!css" },
{ test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192' },
{ test: /\.js$/, loader: 'jsx-loader?harmony' },
{ test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff" },
{ test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff2" },
{ test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/octet-stream" },
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file" },
{ test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml" }
]
},
babel: {
presets: ['es2015', 'stage-0'],
plugins: ['transform-runtime']
},
resolve: {
//่ชๅจๆฉๅฑๆไปถๅ็ผๅ๏ผๆๅณ็ๆไปฌrequireๆจกๅๅฏไปฅ็็ฅไธๅๅ็ผๅ
extensions: ['', '.js', '.json', '.css'],
//ๆจกๅๅซๅๅฎไน๏ผๆนไพฟๅ็ปญ็ดๆฅๅผ็จๅซๅ๏ผๆ ้กปๅคๅ้ฟ้ฟ็ๅฐๅ
alias: {
'vue-strap': './node_modules/vue-strap/dist/vue-strap.min.js'
}
}
}
if (process.env.NODE_ENV === 'production') {
module.exports.plugins = [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.OccurenceOrderPlugin()
]
} else {
module.exports.devtool = '#source-map'
}
.
โโโ README.md
โโโ index.html
โโโ node_modules
โย ย โโโ babel-core
โย ย โโโ babel-loader
โย ย โโโ babel-plugin-transform-runtime
โย ย โโโ babel-preset-es2015
โย ย โโโ babel-preset-stage-0
โย ย โโโ babel-runtime
โย ย โโโ bootstrap
โย ย โโโ css-loader
โย ย โโโ file-loader
โย ย โโโ jsx-loader
โย ย โโโ style-loader
โย ย โโโ url-loader
โย ย โโโ vue
โย ย โโโ vue-hot-reload-api
โย ย โโโ vue-html-loader
โย ย โโโ vue-loader
โย ย โโโ vue-resource
โย ย โโโ vue-router
โย ย โโโ vue-strap
โย ย โโโ webpack
โย ย โโโ webpack-dev-server
โโโ npm-debug.log
โโโ package.json
โโโ src
โย ย โโโ 404.vue
โย ย โโโ app.vue
โย ย โโโ commons
โย ย โโโ components
โย ย โโโ config.js
โย ย โโโ filters
โย ย โโโ index.js
โย ย โโโ npm-debug.log
โย ย โโโ routes.js
โย ย โโโ services
โโโ webpack.config.js