Merge pull request #1981 from MartijnCuppens/npm-files
Switch from `.npmignore` to `files` option
This commit is contained in:
commit
a052332816
3 changed files with 8 additions and 9 deletions
|
|
@ -1,5 +0,0 @@
|
|||
/__tests__/
|
||||
/jest/
|
||||
/src/
|
||||
index.html
|
||||
yarn-error.log
|
||||
|
|
@ -25,6 +25,14 @@
|
|||
"style": "eslint .",
|
||||
"test": "jest && eslint ."
|
||||
},
|
||||
"files": [
|
||||
"dist/*.css",
|
||||
"lib/*",
|
||||
"scripts/*.js",
|
||||
"stubs/*.stub.js",
|
||||
"*.css",
|
||||
"*.js"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.0.0",
|
||||
"@babel/core": "^7.0.0",
|
||||
|
|
|
|||
|
|
@ -14,13 +14,9 @@ function buildDistFile(filename) {
|
|||
.process(css, {
|
||||
from: `./${filename}.css`,
|
||||
to: `./dist/${filename}.css`,
|
||||
map: { inline: false },
|
||||
})
|
||||
.then(result => {
|
||||
fs.writeFileSync(`./dist/${filename}.css`, result.css)
|
||||
if (result.map) {
|
||||
fs.writeFileSync(`./dist/${filename}.css.map`, result.map)
|
||||
}
|
||||
return result
|
||||
})
|
||||
.then(result => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue