A structured workspace for creating and packaging svelte components.
This workspace created by this generator comes with a few key features that helps you to start writing components sooner, maintain them, and distribute.
It comes with Rollup for module bundling and Bublé to allow for ES2015/16 JavaScript code to be used in your components without needing to worry about browser/environment support.
The other main feature is the file structure that is supported. Rather than putting the css, html and js for a component in a single file, they are all split up and a gulp task takes care of the rest.
First, install Yeoman and generator-svelte-workbench using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-svelte-workbench
Then generate your new project:
yo svelte-workbench
Once your project is configured, you can continue to use this project to help create boiler plate files and code.
To create stubs for a new component run:
yo svelte-workbench:component componentName
For example, if you want to add a new component named button:
yo svelte-workbench:component button
This will add a new component named button being created.
MIT © Zachariah Brown