Skip to content

Instantly share code, notes, and snippets.

@kennethormandy
Last active December 25, 2015 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennethormandy/6943971 to your computer and use it in GitHub Desktop.
Save kennethormandy/6943971 to your computer and use it in GitHub Desktop.

Adding a CSS framework to a Harp app with npm

Let’s create an example app that installs Fluidity from npm.

  1. Create an example app.
cd ~/Desktop
harp init example
cd example
  1. Install normalize from npm npm install fluidity

  2. Now you have two options. You can either keep everything in node_modules so it’s easy to update, or you can copy the stuff out you actually need. If you choose the former, you can add a package.json inside _modules/node_modules/ and still update the modules by cd-ing into _modules. You want the node_modules to be in an underscore directory as the Stylus will try and compile directly otherwise, and you don’t want each .styl partial to be its own .css file. Without doing this, you will get an error on harp compile.

  3. Now, you can rename main.less to main.styl. Inside main.styl, add the following:

@import "_modules/node_modules/fluidity";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment