@lyra/webpack-integration
Tools and modules required for making partisan (the part system) work with webpack
Last updated a year ago by bjoerge .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @lyra/webpack-integration 
SYNC missed versions from official npm registry.

@lyra/webpack-integration

Tools and modules required for making partisan (the part system) work with webpack. Note: currently only works with Webpack 1.

Installing

npm install --save @lyra/webpack-integration

Usage

const lyraWebpack = require('@lyra/webpack-integration/v1')
const options = {
  basePath: '/path/to/project',
  env: 'production'
}

// Get array of plugins required for part loading
lyraWebpack.getPlugins(options)

// Get array of loader definitions required for part loading
lyraWebpack.getLoaders(options)

// Get array of postcss plugins required to build the CSS used in Lyra
lyraWebpack.getPostcssPlugins(options)

// Get a partial webpack configuration for the Lyra-specific parts. You'll have to merge this with your existing webpack config.
lyraWebpack.getConfig(options)

// Less common, but if you need more fine-grained access to internals:

// Get a preconfigured `DefinePlugin` that exposes `__DEV__`
lyraWebpack.getEnvPlugin(options)

// Get the part resolver plugin required for part imports
lyraWebpack.getPartResolverPlugin(options)

// Get the part loader (requires the PartResolverPlugin)
lyraWebpack.getPartLoader(options)

// Get the resolving function required for postcss-import
lyraWebpack.getStyleResolver(options)

// Get an initialized postcss-import plugin
lyraWebpack.getPostcssImportPlugin(options)

License

MIT-licensed. See LICENSE.

Current Tags

  • 0.3.0                                ...           latest (a year ago)

4 Versions

  • 0.3.0                                ...           a year ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
Downloads
Today 0
This Week 1
This Month 2
Last Day 1
Last Week 0
Last Month 0
Dependencies (9)
Dev Dependencies (1)

Copyright 2014 - 2016 © taobao.org |