npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

@penpad/rollup-config

0.4.0-alpha.0

@rstacruz

npmRepoSnykSocket
Downloads:1
$ npm install @penpad/rollup-config
DailyWeeklyMonthlyYearly

@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"
  }
}