Skip to content

Commit

Permalink
feat: Add extraction css
Browse files Browse the repository at this point in the history
  • Loading branch information
NightCatSama committed Mar 27, 2019
1 parent d8db7f4 commit 2d7df19
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,6 +2,7 @@
node_modules
docs/
dist/
dist-css/
es/

# local env files
Expand Down
2 changes: 2 additions & 0 deletions .npmignore
@@ -0,0 +1,2 @@
dist/demo.html
dist-css/demo.html
9 changes: 5 additions & 4 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "vue-slider-component",
"version": "3.0.17",
"version": "3.0.18",
"description": "A highly customized slider component",
"keywords": [
"vue",
Expand All @@ -13,7 +13,7 @@
"typings": "./typings/index.d.ts",
"files": [
"dist",
"es",
"dist-css",
"lib",
"src",
"typings",
Expand All @@ -32,9 +32,10 @@
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build:library": "npm run package && npm run typings && npm run sass",
"typings": "tsc -p tsconfig.package.json && cp -a lib/typings typings/typings",
"build:library": "npm run package && npm run package:css && npm run typings && npm run sass",
"package": "vue-cli-service build --mode package --target lib --name vue-slider-component lib/index.ts",
"package:css": "NO_EXTRACT_CSS=true npm run package -- --dest dist-css",
"typings": "tsc -p tsconfig.package.json && cp -a lib/typings typings/typings",
"sass": "sass lib/theme:theme",
"prettier": "prettier --write lib/**/*.{ts,tsx,scss}",
"lint": "vue-cli-service lint",
Expand Down
2 changes: 1 addition & 1 deletion vue.config.js
Expand Up @@ -69,5 +69,5 @@ module.exports = {
config.output.libraryExport('default')
}
},
css: { extract: false },
css: { extract: !!process.env.NO_EXTRACT_CSS },
}

0 comments on commit 2d7df19

Please sign in to comment.