## NPM Scripts

* `npm install`: Install the dependencies (do this before starting the project)
* `npm start`: Run the project in development mode
* `npm build`: Create a compiled build of the projects assets
* `npm generate`: Used in combination with certain parameters to generate
components within the brandplatform
* `prepare`: NPM command, should not be executed manually. This command is
executed after a `npm install`
* `npm production`: Start the server
* `npm release`: Create a package.zip file from the compiled assets of the
brandplatform and place its version and the current one in the correct folders

## npm generate

The brandplatform has a certain structure when defining components. This is done
to create consistency. Now it gets really annoying when you have to create a
component because a certain amount of files and configuration is needed. So in
order to make this dreadsome process more enjoyable and automagical, we have
provided a command to generate a component with its correct configuration.

There are two type of parameters you can pass to the command:

* **category**: The category of the component library to place the component in.
This is **optional**. If not passed the default **general** will be used. So to
clearify this means that you have to write **--cateogry=general**.
* **folder-name**: The folder-name can be anything you want but it has to
represent one of the folders you used to differentiate the components from each
other. So this means if you have a folder called **components** and you want a
**button** to be generated into it. You will have to write
**components=button**.

### Examples:

1. Generate the building-block **button**. This will result in a building-block
being placed within the **building-blocks** folder of the **general** category.

	`npm run generate -- --building-blocks=button`

2. Generate the component **collapse**. This will result in a component being
placed within the **components** folder of the **general** category.

	`npm run generate -- --components=collapse`

3. Generate the layout **section**. This will result in a layout being placed
within the **layouts** folder of the **general** category.

	`npm run generate -- --layouts=section`

4. Generate the component **button**. This will result in a component being
placed within the **components** folder of the **general** category.

	`npm run generate -- --category=general --components=button`

5. Generate the component **button**. This will result in a component being
placed within the **components** folder of the **marketing** category.

	`npm run generate -- --category=marketing --components=button`

6. Generate the component **button**. This will result in a component being
placed within the **components** folder of the **portal** category.

	`npm run generate -- --category=portal --components=button`
