-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
31 lines (31 loc) · 2.36 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"name": "broccoli-writer",
"description": "Helper base class for Broccoli plugins that write output files",
"version": "0.1.1",
"author": {
"name": "Jo Liss",
"email": "joliss42@gmail.com"
},
"main": "index.js",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/joliss/broccoli-writer"
},
"keywords": [
"broccoli-helper"
],
"dependencies": {
"quick-temp": "^0.1.0",
"rsvp": "^3.0.6"
},
"readme": "# broccoli-writer\n\nBase class for Broccoli plugins that write an output tree. Most plugins fall\ninto this category (the exception being plugins that just point at an existing\ndirectory on the file system, like broccoli-bower), so they will be\nimplemented either using this base class or using a derived, more specific\nbase class.\n\nThis base class's main purpose is to create and clean up the temporary output\ndirectory for you.\n\n## Installation\n\n```\nnpm --save broccoli-writer\n```\n\n## Usage\n\nWrite your plugin like so:\n\n```js\nvar Writer = require('broccoli-writer');\n\nmodule.exports = MyCompiler;\nMyCompiler.prototype = Object.create(Writer.prototype);\nMyCompiler.prototype.constructor = MyCompiler;\nfunction MyCompiler (arg1, arg2, ...) {\n if (!(this instanceof MyCompiler)) return new MyCompiler(arg1, arg2, ...);\n ...\n};\n\nMyCompiler.prototype.write = function (readTree, destDir) {\n ...\n};\n```\n\nInside `MyCompiler.prototype.write`, `readTree` is [supplied by\nBroccoli](https://github.com/joliss/broccoli#plugin-api-specification) -- call\n`readTree(someInputTree)` to read another tree. `destDir` is the path to a\nnewly-created temporary directory created by the `Writer` base class. Place\nall the output files you wish to generate in this directory.\n\nIf you want to do something asynchronous, return a promise that resolves when\nyou are done.\n\nIn the `MyCompiler` constructor, you don't need to call the `Writer` base\nclass constructor.\n\nYour plugin can be used in `Brocfile.js` like so:\n\n```js\nvar compileSomething = require('broccoli-my-compiler');\n\nvar outputTree = compileSomething(arg1, arg2, ...)\n```\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/joliss/broccoli-writer/issues"
},
"homepage": "https://github.com/joliss/broccoli-writer",
"_id": "broccoli-writer@0.1.1",
"_from": "broccoli-writer@^0.1.1",
"scripts": {}
}