Skip to content

Instantly share code, notes, and snippets.

@kevin-smets
Last active September 21, 2017 23:40
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kevin-smets/a424cc1672461526e49f to your computer and use it in GitHub Desktop.
Save kevin-smets/a424cc1672461526e49f to your computer and use it in GitHub Desktop.
harp + browsers-sync, start developing for the web in under a minute (probably ;) )

What is this combo?

Static file server with livereload, preprocessors, synchronised testing over multiple browser instances and batteries included. This setup uses Harp and Browsersync, hence the name.

Prerequisite

You will need node, install it if you haven't already.

Init all the things

Run the following command (replace myproject with anything you want):

npm init myproject && cd myproject && npm init

Enter through the questionnaire, fill in what you want :).

More commandments

npm i -D harp browser-sync

This will take a while, lots of deps you know.

After that, open that minty package.json file in you favorite editor and add the following to the "scripts" property:

"dev": "harp server & browser-sync start --proxy 'localhost:9000' --files '**/*.coffee, **/*.jade, **/*.scss'"

Adjust the files argument to your liking obviously.

Run the puppy

npm run dev

Happy coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment