Skip to content

Commit

Permalink
improve scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
plantain-00 committed Aug 7, 2017
1 parent ca76b02 commit 25a2a46
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 26 deletions.
48 changes: 27 additions & 21 deletions clean-scripts.config.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
module.exports = {
build: [
`rimraf dist`,
`rimraf demo/**/index.bundle-*.js`,
`rimraf demo/*.bundle-*.css`,
`file2variable-cli src/vue.template.html -o src/vue-variables.ts --html-minify --base src`,
`file2variable-cli src/angular.template.html -o src/angular-variables.ts --html-minify --base src`,
`ngc -p src`,
`tsc -p demo`,
`lessc src/select2.less > dist/select2.css`,
`cleancss -o dist/select2.min.css dist/select2.css`,
`cleancss -o demo/index.bundle.css dist/select2.min.css ./node_modules/github-fork-ribbon-css/gh-fork-ribbon.css`,
`webpack --display-modules --config demo/webpack.config.js`,
{
js: [
{
vue: `file2variable-cli src/vue.template.html -o src/vue-variables.ts --html-minify --base src`,
angular: `file2variable-cli src/angular.template.html -o src/angular-variables.ts --html-minify --base src`
},
`ngc -p src`,
`tsc -p demo`,
`webpack --display-modules --config demo/webpack.config.js`
],
css: [
`lessc src/select2.less > dist/select2.css`,
`cleancss -o dist/select2.min.css dist/select2.css`,
`cleancss -o demo/index.bundle.css dist/select2.min.css ./node_modules/github-fork-ribbon-css/gh-fork-ribbon.css`
],
clean: [
`rimraf demo/**/index.bundle-*.js`,
`rimraf demo/*.bundle-*.css`
]
},
`rev-static --config demo/rev-static.config.js`
],
lint: [
`tslint "src/**/*.ts" "src/**/*.tsx" "demo/**/*.ts" "demo/**/*.tsx"`,
`standard "**/*.config.js"`,
`stylelint "src/**/*.less"`
],
lint: {
ts: `tslint "src/**/*.ts" "src/**/*.tsx" "demo/**/*.ts" "demo/**/*.tsx"`,
js: `standard "**/*.config.js"`,
less: `stylelint "src/**/*.less"`
},
test: [
'tsc -p spec',
'karma start spec/karma.config.js'
],
fix: [
`standard --fix "**/*.config.js"`
],
release: [
`clean-release`
]
fix: `standard --fix "**/*.config.js"`,
release: `clean-release`
}
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@types/react-dom": "15.5.1",
"clean-css-cli": "4.1.6",
"clean-release": "1.3.2",
"clean-scripts": "1.0.1",
"clean-scripts": "1.1.0",
"core-js": "2.4.1",
"file2variable-cli": "1.4.1",
"github-fork-ribbon-css": "0.2.1",
Expand Down

0 comments on commit 25a2a46

Please sign in to comment.