Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 716 Bytes

README.md

File metadata and controls

31 lines (22 loc) · 716 Bytes

Second Bundler

Bundle the assets for Second-compatible component modules

Installation

npm install --save second-bundler

API

getStyles(moduleName) -> Promise(Bundle)

Builds a bundle containing the core & enhanced styles for the given module and all of its dependencies. Bundle is an object with core and enhanced properties, each containing an array of CSS strings. For example:

{
  core: [
    'body { color: red; }',
    'button { border: 1px solid blue; padding: 1rem; }'
  ],
  enhanced: [
    'button { animation: blinker 1s linear infinite; }'
  ]
}

Arguments

  • moduleName (String): A name which, when resolved by require(), returns a Second component.