Skip to content

Commit

Permalink
merge src/xhr/config.js into src/xhr/jquery.js; make built docs withi…
Browse files Browse the repository at this point in the history
…n docs/
  • Loading branch information
Ken Berkeley committed Apr 22, 2017
1 parent e851682 commit c4a5a3e
Show file tree
Hide file tree
Showing 70 changed files with 80 additions and 559 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

> ### Vue2 脚手架已出!戳[这里](https://github.com/kenberkeley/vue2-scaffold)!
[在线 Demo](https://kenberkeley.github.io/vue-demo/dist) | [在线文档](https://kenberkeley.github.io/vue-demo/dist/docs)
[在线 Demo](https://kenberkeley.github.io/vue-demo/dist) | [在线文档](https://kenberkeley.github.io/vue-demo/docs/_book)

![截图](./screenshot.png)
1 change: 0 additions & 1 deletion build/prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var fs = require('fs-extra'),

fs.emptyDirSync(PATHS.DIST); // 清空 build 目录
fs.copySync(PATHS.STATIC, PATHS.DIST.join('static')); // 复制高度静态资源
fs.moveSync(PATHS.DOCS, PATHS.DIST.join('docs')); // 移动文档

webpack(config, function(err, stats) {
// show build info to console
Expand Down
9 changes: 7 additions & 2 deletions build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var webpack = require('webpack'),
ENV = require('./config/ENV'),
PATHS = require('./config/PATHS'),
styleRules = require('./config/style-rules'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
NyanProgressPlugin = require('nyan-progress-webpack-plugin');

module.exports = {
Expand All @@ -11,8 +12,8 @@ module.exports = {
// devtool - source map 配置详见 http://webpack.github.io/docs/configuration.html#devtool
devtools: false,
output: {
path: PATHS.DIST.join('static'),
publicPath: 'static/'
path: PATHS.DIST,
publicPath: ''
},
resolve: {
extensions: ['', '.js', '.vue'],
Expand Down Expand Up @@ -70,6 +71,10 @@ module.exports = {
minChunks: function (module) {
return module.context && module.context.indexOf('node_modules') !== -1;
}
}),
new HtmlWebpackPlugin({
filename: 'index.html',
template: PATHS.SRC.join('index.html')
})
]
};
7 changes: 0 additions & 7 deletions build/webpack.dev.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ var webpack = require('webpack'),
PATHS = require('./config/PATHS'),
PORTS = require('./config/PORTS'),
config = require('./webpack.base.conf'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
ExtractTextPlugin = require('extract-text-webpack-plugin'),
BrowserSyncPlugin = require('browser-sync-webpack-plugin');

Expand All @@ -16,16 +15,10 @@ config.entry.app = [
config.entry.app
];

config.output.publicPath = '';

config.plugins.push(
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new ExtractTextPlugin('[name].css'),
new HtmlWebpackPlugin({
filename: 'index.html',
template: PATHS.SRC.join('index.html')
}),
new BrowserSyncPlugin({
host: 'localhost',
port: PORTS.BROWSER_SYNC,
Expand Down
8 changes: 1 addition & 7 deletions build/webpack.prod.conf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var webpack = require('webpack'),
PATHS = require('./config/PATHS'),
config = require('./webpack.base.conf'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
ExtractTextPlugin = require('extract-text-webpack-plugin'),
OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');

Expand All @@ -25,12 +24,7 @@ config.plugins.push(
new ExtractTextPlugin('css/[name].[contenthash:6].css', {
allChunks : true // 若要按需加载 CSS 则请注释掉该行
}),
new OptimizeCssAssetsPlugin(), // 优化 CSS(去重/压缩)
new HtmlWebpackPlugin({
filename: '../index.html',
template: PATHS.SRC.join('index.html'),
chunksSortMode: 'none'
})
new OptimizeCssAssetsPlugin() // 优化 CSS(去重/压缩)
);

module.exports = config;
File renamed without changes.
1 change: 0 additions & 1 deletion dist/docs/search_index.json

This file was deleted.

29 changes: 0 additions & 29 deletions dist/docs/zh-cn/development/Ajax-interface.md

This file was deleted.

159 changes: 0 additions & 159 deletions dist/docs/zh-cn/development/Best-practice.md

This file was deleted.

28 changes: 0 additions & 28 deletions dist/docs/zh-cn/development/CORS-and-Proxy.md

This file was deleted.

78 changes: 0 additions & 78 deletions dist/docs/zh-cn/development/Configuration.md

This file was deleted.

Loading

0 comments on commit c4a5a3e

Please sign in to comment.