Allow packaging with rollup

This commit is contained in:
Linus Lee 2019-06-11 23:29:27 -07:00
parent 472b28260f
commit f30efd2bef
4 changed files with 1386 additions and 7 deletions

3
.gitignore vendored
View File

@ -1,3 +1,6 @@
# blocks.css ignores
dist/
# Logs
logs
*.log

View File

@ -1,9 +1,21 @@
{
"name": "blocks.css",
"version": "0.1.0",
"description": "Add some dimension to your page with blocks",
"main": "/src/blocks.css",
"repository": "git@github.com:thesephist/blocks.css.git",
"author": "Linus Lee <linus@thesephist.com>",
"license": "MIT"
"name": "blocks.css",
"version": "0.1.0",
"description": "Add some dimension to your page with blocks",
"main": "/src/blocks.css",
"repository": "git@github.com:thesephist/blocks.css.git",
"author": "Linus Lee <linus@thesephist.com>",
"license": "MIT",
"scripts": {
"build": "rollup --config rollup.config.js",
"clean": "git clean -fxd"
},
"files": [
"src",
"dist"
],
"devDependencies": {
"rollup": "^1.15.1",
"rollup-plugin-postcss": "^2.0.3"
}
}

27
rollup.config.js Normal file
View File

@ -0,0 +1,27 @@
import postcss from 'rollup-plugin-postcss'
const bundleNames = [
'blocks',
'reset',
];
const configs = bundleNames.map(name => {
return {
input: `src/${name}.css`,
output: {
file: `dist/${name}.min.css`,
format: 'es',
},
plugins: [
postcss({
minimize: true,
sourceMap: true,
extract: true,
modules: false,
}),
],
}
});
export default configs

1337
yarn.lock Normal file

File diff suppressed because it is too large Load Diff