jonespen / kss-webpack-plugin

Generate KSS styleguide from Webpack
MIT License
10 stars 10 forks source link

Support automatic inclusion of webpack chunks in generated HTML #6

Closed davecranwell-adestra closed 6 years ago

davecranwell-adestra commented 6 years ago

This allows the webpack user to define a chunks key in the KssWebpackPlugin options object, in which the user specifies an array of named "chunks" (JS or CSS) which they want to include in the generated HTML e.g:

new KssWebpackPlugin({
    title: 'My pattern library',
    source: 'src/scss',
    destination: 'dest/styleguide/',
    chunks: ['manifest', 'vendor', 'styles']
})

The additions to the code separate the chunks by their output file extension, putting anything ending .js into the kss options.js config option, and any .css into options.css

jonespen commented 6 years ago

This looks useful, thanks. I'm not using this project anymore, would you like to get collaborator access?

davecranwell-adestra commented 6 years ago

Yeah if you don't mind, that would be great. I'm not so familiar with NPM though - if you give me colab on github, can I publish new versions on NPM?

jonespen commented 6 years ago

Yea, if you'll send me your npm username I'll add you. Thanks!

davecranwell-adestra commented 6 years ago

I'm "davecranwell" on NPM

jonespen commented 6 years ago

Sorry for the delay, but think I have added you now :)

$ npm owner ls
davecranwell <dave@davecranwell.com>
jonespen <jonespen@gmail.com>