---
title: Run a check on your npm mudules before serving Broccoli
layout: post
---

To check your node modules when you start Broccoli you can use the [npm module](https://www.npmjs.com/package/npm-check) *npm-check*. You get a test everytime you start Broccoli. Very useful if you work together with multiple developers.

![](https://cloud.githubusercontent.com/assets/1079135/10659668/bc7a18c8-78a1-11e5-842d-2fde8f73e158.png)

To install *npm-check* you type `npm install npm-check`.

Create a folder `scripts` in your root folder of your project. Navigate into it and create a `start.sh` with this contents:

{% highlight sh %}
#!/usr/bin/env bash

# Run a check on installed npm modules
./node_modules/npm-check/bin/cli.js -s && echo "" # Add a newline

# Last but not least run the favorite vegetable
./node_modules/broccoli-cli/bin/broccoli serve
{% endhighlight %}

Add the start script in your `package.json`.

{% highlight js %}
{
  ...
  "scripts": {
    "start": "./scripts/start.sh",
    ...
  },
  ...
}
{% endhighlight %}

Now you can run `npm run start` or if you don't like typing use this shortcut `npm start`.

---
title: Run a check on your npm mudules before serving Broccoli
---

To check your node modules when you start Broccoli you can use the [npm module](https://www.npmjs.com/package/npm-check) *npm-check*. You get a test everytime you start Broccoli. Very useful if you work together with multiple developers.

![](https://cloud.githubusercontent.com/assets/1079135/10659668/bc7a18c8-78a1-11e5-842d-2fde8f73e158.png)

To install *npm-check* you type `npm install npm-check`.

Create a folder `scripts` in your root folder of your project. Navigate into it and create a `start.sh` with this contents:

```sh
#!/usr/bin/env bash

# Run a check on installed npm modules
./node_modules/npm-check/bin/cli.js -s && echo "" # Add a newline

# Last but not least run the favorite vegetable
./node_modules/broccoli-cli/bin/broccoli serve
```

Add the start script in your `package.json`.

```js
{
  ...
  "scripts": {
    "start": "./scripts/start.sh",
    ...
  },
  ...
}
```

Now you can run `npm run start` or if you don't like typing use this shortcut `npm start`.

Use default highlighter Rouge for Jekyll 3.0
Use default highlighter Rouge for Jekyll 3.0