0.0.3 • Published 9 years ago

browserify-transform-dna v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

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