npm.io
0.0.3 • Published 11 years ago

browserify-transform-dna

Licence
MIT
Version
0.0.3
Deps
7
Vulns
2
Weekly
0

browserify-transform-dna

http://browserify.org/ transformer for organic-dna

use

  1. Install:

     $ cd myProject
     $ npm install browserify-transform-dna
    
  2. Create the following structure and files:

     + myProject
     |-+ dna
       |  |- client.json
       |- main.js
    
  3. Create the content:

     // client.json
     {
       "property": "value"
     }
    
     // main.js
     var dna = require("dna")
     console.log(dna.property)
    
  4. Bundle:

     $ browserify -t browserify-transform-dna ....
    
  5. See in the browser that dna.property is equal to value

  6. Read more about

  1. Note that browserify-transform-dna uses process.env.CELL_MODE for folding
  • default value is _development