Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon Cai committed Dec 1, 2017
1 parent 2a52be7 commit 6ee25ad
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 99 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Tailor for ToursForFun Frontend

## Instructions
Based on webpack@3.6
Based on webpack@3.x

- HTML
- [x] Multi pages support
Expand All @@ -28,7 +28,7 @@ Based on webpack@3.6
- Lint
- [x] ES Lint
- [x] Sty leLint
- [x] HTMLL Lint
- [x] HTML Lint
- [ ] Pre push

- Advanced
Expand Down
8 changes: 0 additions & 8 deletions bin/build-handler.js

This file was deleted.

9 changes: 0 additions & 9 deletions bin/lint-handler.js

This file was deleted.

1 change: 0 additions & 1 deletion config/base/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ module.exports = (config) => {
let name = dir.replace(/\.[^.]+$/ig, "").replace(/\\/g, "/");

config.reg.lastIndex = 0;

if (config.reg.test(name)) {
entries[name] = [`./${dir}`];
}
Expand Down
4 changes: 4 additions & 0 deletions config/base/loaders/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ module.exports = (config) => {
loader: "html-loader",
options: {}
},
/**
* @see https://aui.github.io/art-template/zh-cn/docs/rules.html
*/
artTemplateLoader = {
loader: "art-template-loader",
options: {
extname: "." + inputConfig.html.ext[0],
cache: true,
htmlResourceRoot: Path.join(config.root, inputConfig.path),
root: Path.join(config.root, inputConfig.path),
htmlResourceRules: [
Expand Down
2 changes: 1 addition & 1 deletion config/base/loaders/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @description loaders
* @author Leon.Cai
* @see https://doc.webpack-china.org/loaders/thread-loader
* @see https://doc.webpack-china.org/loaders
*/
const
FileLoader = require("./file.js"),
Expand Down
4 changes: 4 additions & 0 deletions config/base/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ function commonPlugin(config, entry) {
}]),
new DefinePlugin(varsHandler(config.vars)),
new CommonsChunkPlugin({
/**
* @see https://doc.webpack-china.org/plugins/commons-chunk-plugin
* @type {Array}
*/
names: [...Object.keys(entry)], //TODO
chunks: [],
minChunks: 4,
Expand Down
156 changes: 78 additions & 78 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
{
"name": "tf-tailor",
"version": "1.4.5",
"description": "tailor for toursforfun frontend",
"main": "webpack",
"scripts": {},
"repository": "https://github.com/icaife/tailor/",
"keywords": [
"toursforfun",
"frontend",
"webpack",
"tailor",
"multi entry",
"leon"
],
"bin": {
"tailor": "./bin/tailor.js"
},
"author": "leon.cai@toursforfun.com",
"license": "ISC",
"devDependencies": {},
"dependencies": {
"art-template": "^4.12.1",
"art-template-loader": "^1.4.3",
"autoprefixer": "^7.1.1",
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-2": "^6.24.1",
"cache-loader": "^1.0.3",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.4",
"cssnano": "^3.10.0",
"deasync": "^0.1.10",
"debug": "^3.1.0",
"eslint": "^4.7.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.9.0",
"eventsource-polyfill": "^0.9.6",
"extract-text-webpack-plugin": "^3.0.2",
"friendly-errors-webpack-plugin": "^1.6.1",
"fs-extra": "^4.0.0",
"glob": "^7.1.2",
"html-loader": "^0.5.1",
"html-webpack-plugin": "^2.29.0",
"less": "^2.7.2",
"less-loader": "^4.0.4",
"moment": "^2.18.1",
"postcss": "6.0.14",
"postcss-cssnext": "^3.0.2",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.6",
"postcss-sprites": "^4.2.1",
"shelljs": "^0.7.8",
"string-replace-webpack-plugin": "^0.1.3",
"style-ext-html-webpack-plugin": "^3.4.1",
"style-loader": "^0.19.0",
"stylelint": "^8.0.0",
"stylelint-webpack-plugin": "^0.9.0",
"thread-loader": "^1.1.1",
"transform-runtime": "^0.0.0",
"try-require": "^1.2.1",
"url-loader": "^0.6.2",
"vinyl-fs": "^2.4.4",
"vue-loader": "^13.0.5",
"vue-template-compiler": "^2.4.2",
"vue-template-loader": "^0.3.1",
"webpack": "^3.9.1",
"webpack-bundle-analyzer": "^2.8.3",
"webpack-dev-middleware": "^1.11.0",
"webpack-hot-middleware": "^2.18.2",
"webpack-manifest-plugin": "^1.1.0",
"write-file-webpack-plugin": "^4.1.0",
"yargs": "^10.0.3"
}
}
"name": "tf-tailor",
"version": "1.5.0",
"description": "tailor for toursforfun frontend",
"main": "webpack",
"scripts": {},
"repository": "https://github.com/icaife/tailor/",
"keywords": [
"toursforfun",
"frontend",
"webpack",
"tailor",
"multi entry",
"leon"
],
"bin": {
"tailor": "./bin/tailor.js"
},
"author": "leon.cai@toursforfun.com",
"license": "ISC",
"devDependencies": {},
"dependencies": {
"art-template": "^4.12.1",
"art-template-loader": "^1.4.3",
"autoprefixer": "^7.1.1",
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-2": "^6.24.1",
"cache-loader": "^1.0.3",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.4",
"cssnano": "^3.10.0",
"deasync": "^0.1.10",
"debug": "^3.1.0",
"eslint": "^4.7.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.9.0",
"eventsource-polyfill": "^0.9.6",
"extract-text-webpack-plugin": "^3.0.2",
"friendly-errors-webpack-plugin": "^1.6.1",
"fs-extra": "^4.0.0",
"glob": "^7.1.2",
"html-loader": "^0.5.1",
"html-webpack-plugin": "^2.29.0",
"less": "^2.7.2",
"less-loader": "^4.0.4",
"moment": "^2.18.1",
"postcss": "6.0.14",
"postcss-cssnext": "^3.0.2",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.6",
"postcss-sprites": "^4.2.1",
"shelljs": "^0.7.8",
"string-replace-webpack-plugin": "^0.1.3",
"style-ext-html-webpack-plugin": "^3.4.1",
"style-loader": "^0.19.0",
"stylelint": "^8.0.0",
"stylelint-webpack-plugin": "^0.9.0",
"thread-loader": "^1.1.1",
"transform-runtime": "^0.0.0",
"try-require": "^1.2.1",
"url-loader": "^0.6.2",
"vinyl-fs": "^2.4.4",
"vue-loader": "^13.0.5",
"vue-template-compiler": "^2.4.2",
"vue-template-loader": "^0.3.1",
"webpack": "^3.9.1",
"webpack-bundle-analyzer": "^2.8.3",
"webpack-dev-middleware": "^1.11.0",
"webpack-hot-middleware": "^2.18.2",
"webpack-manifest-plugin": "^1.1.0",
"write-file-webpack-plugin": "^4.1.0",
"yargs": "^10.0.3"
}
}

0 comments on commit 6ee25ad

Please sign in to comment.