Stylus/Gulp

From Metro Studios Knowledgebase

Jump to: navigation, search

Contents

[edit] nodejs

Visit https://nodejs.org/en/download/ and click the windows installer (currently a dark green windows icon on a light-green background).

Run the installer at the root level of the C: drive. The file path should be C:/Node

Verify Node is installed by opening git bash and running this command: node -v If node is installed, the console will log a version number


[edit] Gulp

Open git bash at the root level on the C: drive

Run this command: npm intall -g gulp

Verify gulp is installed by running this command: npm list -g gulp


[edit] Stylus

http://stylus-lang.com/


[edit] Gulp Tasks

Use git bash to run gulp tasks from the project directory.

gulp styles

Compiles project's stylus files to minified CSS


gulp watch


-- Automatically watches project's stylus files for changes and compiles on save.
-- Repaints CSS in browser without a page refresh (only works in Chrome with LiveReload extension)


gulp js

Minifies and compresses project's javascript files and saves them with a .min suffix

ex. myScript.js -> myScript.min.js

Personal tools
Namespaces
Variants
Actions
Wiki Navigation
Knowledgebase
Toolbox