{
  "_args": [
    [
      "buildify@^0.4.0",
      "/Users/weism/qici/tool"
    ]
  ],
  "_from": "buildify@>=0.4.0 <0.5.0",
  "_id": "buildify@0.4.0",
  "_inCache": true,
  "_installable": true,
  "_location": "/buildify",
  "_npmUser": {
    "email": "charlie@powmedia.co.uk",
    "name": "powmedia"
  },
  "_npmVersion": "1.1.59",
  "_phantomChildren": {},
  "_requested": {
    "name": "buildify",
    "raw": "buildify@^0.4.0",
    "rawSpec": "^0.4.0",
    "scope": null,
    "spec": ">=0.4.0 <0.5.0",
    "type": "range"
  },
  "_requiredBy": [
    "#DEV:/"
  ],
  "_resolved": "https://registry.npmjs.org/buildify/-/buildify-0.4.0.tgz",
  "_shasum": "20c8bde20488b32588ce92a4189672a084d3a0c4",
  "_shrinkwrap": null,
  "_spec": "buildify@^0.4.0",
  "_where": "/Users/weism/qici/tool",
  "author": {
    "email": "charlie@powmedia.co.uk",
    "name": "Charles Davison"
  },
  "bin": {
    "buildify": "./bin/cli.js"
  },
  "bugs": {
    "url": "https://github.com/powmedia/buildify/issues"
  },
  "dependencies": {
    "clean-css": "0.6.0",
    "mkdirp": "0.3.2",
    "uglify-js": "1.3.4",
    "underscore": "1.3.3"
  },
  "description": "Builder for creating distributable JavaScript files from source. Concatenate, wrap, uglify.",
  "devDependencies": {
    "nodeunit": "latest",
    "sinon": "latest"
  },
  "directories": {},
  "dist": {
    "shasum": "20c8bde20488b32588ce92a4189672a084d3a0c4",
    "tarball": "http://registry.npmjs.org/buildify/-/buildify-0.4.0.tgz"
  },
  "engines": {
    "node": ">=0.4.0"
  },
  "homepage": "https://github.com/powmedia/buildify#readme",
  "main": "index.js",
  "maintainers": [
    {
      "name": "powmedia",
      "email": "charlie@powmedia.co.uk"
    }
  ],
  "name": "buildify",
  "optionalDependencies": {},
  "readme": "buildify\n===\n\nBuilder for creating distributable JavaScript files from source. Concatenate, wrap, uglify.\n\n\n##Install\nRequires [NodeJS](http://nodejs.org/#download) to run.\n\nThen install buildify via npm:\n\n```sh\nnpm install buildify\n```\n\nCreate a file with your build script (see the example in 'Usage' below), call it something like `build.js` and then run it with:\n\n```sh\nnode build.js\n```\n\n##Usage\n\n```js\nvar buildify = require('buildify');\n\nbuildify()\n  .load('base.js')\n  .concat(['part1.js', 'part2.js'])\n  .wrap('../lib/template.js', { version: '1.0' })\n  .save('../distribution/output.js')\n  .uglify()\n  .save('../distribution/output.min.js');\n```\n\n##API\n\n###buildify([dir, options])\nCreate a new Builder instance.\n\nTakes the starting directory as the first argument, e.g. __dirname. If this is not set, the current working directory is used.\n\nOptions:\n- `interpolate`   Underscore template settings. Default to mustache {{var}} style interpolation tags.\n- `encoding`      File encoding (Default 'utf-8')\n- `eol`           End of line character (Default '\\n')\n- `quiet`         Whether to silence console output\n\n\n###setDir(absolutePath)\nSet the current working directory.\n\n\n###changeDir(relativePath)\nChange the current working directory.\n\n\n###setContent(content)\nSet the content to work with.\n\n\n###getContent()\nGet the current content. Note: breaks the chain.\n\n\n###load(file)\nLoad file contents.\n\n\n###concat(files, [eol])\nConcatenate the content of multiple files.\n\n```js\nbuildify()\n    .concat(['file1.js', 'file2.js']);\n```\n\n\n###wrap(template, [data])\nWrap the contents in a template.\n\nUseful for creating AMD/CommonJS compatible versions of code, adding notes/comments to the top of the file etc.\n\nBy default the template uses Mustache-style tags and has a special tag, `{{body}}` which is where the contents are placed.\n\nOther custom tags can be included and passed in the `data` argument.\n\n```js\n//template.js\n/*\n * This is a module for doing stuff.\n * Version {{version}}.\n */\n(function() {\n    //Setup code can go here\n\n    {{body}}\n});\n\n//build.js\nbuildify()\n    .load('src.js')\n    .wrap('template.js', { version: '1.0' });\n```\n\n###perform(fn)\nPerform a function on the content. The content is set to what the function returns.\n\n```js\nbuildify()\n    .load('src.js')\n    .perform(function(content) {\n        return content.replace(\\assetpath\\g, 'http://cdn.example.com');\n     });\n```\n\n###uglify(options)\nMinimise your JS using uglifyJS.\n\nOptions:\n- mangle: Whether to mangle output from UglifyJS. Default: true\n\n\n###cssmin([maxLineLength])\nMinimise your CSS using clean-css.\nOptionally a line break is inserted after 'maxLineLength' characters in the minimized css file.\n\n\n###save(file)\nSave the contents to a file.\n\n\n###clear()\nReset/clear contents.\n\n## Tasks\n\nBuildify supports tasks, allowing to separate a build script in different\nsections. Dependencies can be specified between tasks.\nBy specifying tasks names as command line arguments, buildify will only run\nthe specified tasks, taking into account their dependencies\n\nFor example create a script named `buildify.js` with the following contents:\n```js\nvar buildify = require('buildify');\n\nbuildify.task({\n  name: 'task2',\n  depends: ['task1'],\n  task: function () {\n    console.log('task2...');\n  }\n});\n\nbuildify.task({\n  name: 'task1',\n  task: function () {\n    console.log('task1...');\n  }\n});\n```\n\nTo run all tasks, just run the script:\n```sh\nnode buildify.js\n```\n\nTo run a specific task, specify the task name as command line arguments.\n```sh\nnode buildify.js concat\n```\n\n### Tasks API\n\n#### buildify.task(options)\n\nCreate a task.\n\nOptions:\n- `name`    A string containing the task name\n- `desc`    An optional description of the task\n- `depends` An optional string or an array with strings containing the name(s)\n            of tasks which this task depends on.\n- `task`:   The function to be executed as task, doing the actual work.\n            Optional.\n\n\n## Command Line Interface\n\nWhen installed globally, the command line application `buildify` is available.\nRunning `buildify` will execute the script named `buildify.js` in the current\ndirectory (typically the root of a project).\n\n```sh\nbuildify [tasks]\n```\n\nOptionally, a list of task names can be provided to only execute specified tasks.\nIf no tasks are provided, buildify will run the script including all tasks.\n\n\n##Changelog\n\n0.4.0\nImplemented tasks (josdejong)\n\n0.3.1\nFix mangling (can be disabled with mangle: false option in uglify()) (powmedia, whadar)\n\n0.3.0\nAdd cssmin() for minifying CSS (RustyMarvin)\nFix tests under Windows (RustyMarvin)\n\n0.2.0\nAdd perform() for custom functions (trevorgerhardt)\n",
  "repository": {
    "type": "git",
    "url": "git://github.com/powmedia/buildify.git"
  },
  "version": "0.4.0"
}
