npm install
npm run watch
npm run build
npm run dev
npm run pack
npm run clean
You just need to run npm run dev
.
npm run build
npm run test
dist文件夹里面的文件为上线文件,其他文件均为开发文件。
- dist/ 输出/上线目录,所有被编译的文件都会输出到此目录
- src/data/ 某些数据
- src/libs/ 插件目录
- src/modules/ 自定义模块目录
- src/store/ vuex目录
- src/styles/ css目录
- src/view/ 页面目录
- src/router vue-router路由文件
- images/ 图片目录
- images/static/ 此文件夹下 图片/目录 不会被压缩、base64处理
- build/ 配置信息
截止到2017-09-21 15:54,package.json模块最新版
如果问题,请联系我
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
location / {
try_files $uri $uri/ /index.html;
}
const http = require('http')
const fs = require('fs')
const httpPort = 80
http.createServer((req, res) => {
fs.readFile('index.htm', 'utf-8', (err, content) => {
if (err) {
console.log('We cannot open \'index.htm\' file.')
}
res.writeHead(200, {
'Content-Type': 'text/html; charset=utf-8'
})
res.end(content)
})
}).listen(httpPort, () => {
console.log('Server listening on: http://localhost:%s', httpPort)
})
rewrite {
regexp .*
to {path} /
}