Gulp, Browserify and NPM - Using A Particular Javascript Combination
Javascript, NPM, Gulp, Browserify

The ancient philosophers always start by asking the question, how do we define our different terms?, because this question is the doorway to a shared understanding.

How do we define NPM?
NPM might be compared to Gems or Bundler in the Ruby world. NPM manages Javascript packages (SOMETIMES called modules). A package consists of the relevant files, plus a package.json file. The package.json file contains meta-data about the package. It is similar to a Gemspec file in the Ruby world. Note that Node's approach, which is imitated in NPM, is to encourage the writing of small, distinct libraries that solve small, particular problems very well.

How do we define the tool Gulp?

Gulp might be compared to a Rake Task. Gulp minimizes and uglifies your Javascript.

How do we define Browserify?

Browserify combines all separate Javascript files into one giant file. It uses modules similar to NPM. 

Gulp + Browserify? 

We might think of Gulp and Browserify together as 

How do we define CommonJS?

CommonJS is an attempt to offer structure in defining Javascript modules, to solve Scope problems in Javascript. CommonJS makes a standard format that forces you to expose the appropriate variables to the "universe." 

Node.JS also standardizes module structure for Javascript 

https://github.com/greypants/gulp-starter

| Back

Footerfull