@penpad/rollup-config
v0.4.0-alpha.0
Published
Builds a Rollup configuration for use in Penpad plugins. The `buildConfig` function gets you a Rollup config with some basic necessities:
Downloads
5
Readme
@penpad/rollup-config
Builds a Rollup configuration for use in Penpad plugins. The buildConfig
function gets you a Rollup config with some basic necessities:
- rollup-plugin-typescript2 for TypeScript support
- rollup-plugin-react-svg for loading icons
- rollup-plugin-postcss-modules for CSS modules support with PostCSS
- postcss-import for
@import
support in CSS - postcss-preset-env for auto-prefixing and other new CSS features
- postcss-apply for
@apply
support
Usage
Write a rollup.config.js
for your plugin:
// rollup.config.js
import buildConfig from '@penpad/rollup-config'
import pkg from './package.json'
export default buildConfig({
// Entry point
input: 'src/index.tsx',
pkg
})
Configure npm scripts for scripts.prepare
:
/* package.json */
{
"scripts": {
"prepare": "rollup --config"
}
}