Comcast / patternlab-edition-node-webpack

The webpack wrapper around patternlab-node core, providing tasks to interact with the core library and move supporting frontend assets.
https://comcast.github.io/patternlab-edition-node-webpack/
Apache License 2.0
127 stars 95 forks source link

Documentation on adding a starterkit needs amending #11

Closed moda-schneij closed 6 years ago

moda-schneij commented 6 years ago

I found the following issue:

The documentation on adding a starter kit seems a little off.

I've added the starterkit-mustache-demo, but that's inserted scripts in my source/js file that aren't being picked up during development.

I think I'll need to expose them as modules and either append to my entry js or expose as new entries. Or figure out how to update the copy plugin to catch non-modular JS and copy from source to public.

This may be an issue of using non-webpack starterkits with the webpack wrapper.

In any case, the documentation says

To install a specific StarterKit from GitHub type:

npm run add [starterkit-vendor/starterkit-name]

npm run patternlab:loadstarterkit --kit=[starterkit-name]

But there is no add script in package.json

Recommendations on Solutions:

Amend documentation to explain how to do this, and/or how to deal with problems with available starter kits. Thanks.

mbulfair commented 6 years ago

Yup you are correct, it's a typo the first line should be npm install [starterkit-name] then the second. I will get that corrected.

Josh68 commented 6 years ago

Thanks. Still working out how to customize this wrapper in certain ways (like adding the html-webpack-plugin to my webpack.app.js, as it seems to blow away the patternlab iframe wrapper), but thanks for making it. I hope it eventually becomes a new standard approach for the node version.

mbulfair commented 6 years ago

Have you seen this: https://github.com/Comcast/patternlab-edition-node-webpack#setting-the-webpack-merge-options there's a link there to a readme that goes over the webpack merge options.

Josh68 commented 6 years ago

Yes, I did read that and the merge docs for webpack. Just experimenting to see how things work. Patternlab adds a layer of indirection (or that's how I'm seeing it) with the wrapper around the iframe that contains your actual bundles. That said, I have gotten some customizations to work, and merging options seem sensible.