JS Modules

JavaScript Modules

Structure

Some Fozzie modules will include JavaScript as part of its structure (such as the f-header module), others will be specifically a JavaScript module like the f-validate module.

If the module includes SCSS as well, the JS should be located inside the src/js folder (from the root).

If the module is being written specifically to be a JavaScript module, then the entry file should be at src/index.js.

Creating a Fozzie JS module

The easiest way to create a Fozzie JS module is to use the Fozzie Yeoman generator.

This will let you specify a number of options as to what aspects of your Fozzie module you would like to include – such as whether you want CSS and JS folders as part of your module.

Create a new repository on GitHub

If you want more information on using Yeoman, check out their documentation.