Skip to main content

Build Using grunt and NPM

Using grunt and npm

By Dominik Wilkowski

Using grunt and npm

Writing a modern web app these days can sometimes feel like a tedious process; frameworks, boilerplates, abstractions, dependency management, build processes… the list of requirements for a front-end workflow appears to grow each year.

What if you could automate a lot of this?

What is npm?

npm makes it easy for JavaScript developers to share and reuse code, and it makes it trivial to update the code that you're sharing.

Installing npm

The npm command-line tool is bundled with node. If you have it installed, then you already have npm too. If not, go to download node.

What is grunt?

In one word: automation. The less work you have to do when performing repetitive tasks like minification, compilation, unit testing, linting, etc, the easier your job becomes. Grunt is a task manager and build to automate your tasks. After you've configured it through a Gruntfile, a task runner can do most of that mundane work for you — and your team — with almost zero effort.

Using grunt

The Grunt ecosystem is huge and it's growing every day. With literally hundreds of plugins to choose from, you can use Grunt to automate just about anything with a minimum of effort. If someone hasn't already built what you need, authoring and publishing your own Grunt plugin to npm is a breeze.