broccoli-writer

WebJar for broccoli-writer

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

broccoli-writer
Последняя версия

Последняя версия

0.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

broccoli-writer
WebJar for broccoli-writer
Ссылка на сайт

Ссылка на сайт

http://webjars.org

Скачать broccoli-writer

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/broccoli-writer/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>broccoli-writer</artifactId>
    <version>0.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/broccoli-writer/
implementation 'org.webjars.npm:broccoli-writer:0.1.1'
// https://jarcasting.com/artifacts/org.webjars.npm/broccoli-writer/
implementation ("org.webjars.npm:broccoli-writer:0.1.1")
'org.webjars.npm:broccoli-writer:jar:0.1.1'
<dependency org="org.webjars.npm" name="broccoli-writer" rev="0.1.1">
  <artifact name="broccoli-writer" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='broccoli-writer', version='0.1.1')
)
libraryDependencies += "org.webjars.npm" % "broccoli-writer" % "0.1.1"
[org.webjars.npm/broccoli-writer "0.1.1"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : quick-temp jar [0.1.0,0.2)
org.webjars.npm : rsvp jar [3.0.6,4)

Модули Проекта

Данный проект не имеет модулей.

broccoli-writer

Deprecated in favor of broccoli-plugin.

Base class for Broccoli plugins that write an output tree. Most plugins fall into this category (the exception being plugins that just point at an existing directory on the file system, like broccoli-bower), so they will be implemented either using this base class or using a derived, more specific base class.

This base class's main purpose is to create and clean up the temporary output directory for you.

Installation

npm install --save broccoli-writer

Usage

Write your plugin like so:

var Writer = require('broccoli-writer');

module.exports = MyCompiler;
MyCompiler.prototype = Object.create(Writer.prototype);
MyCompiler.prototype.constructor = MyCompiler;
function MyCompiler (arg1, arg2, ...) {
  if (!(this instanceof MyCompiler)) return new MyCompiler(arg1, arg2, ...);
  ...
};

MyCompiler.prototype.write = function (readTree, destDir) {
  ...
};

Inside MyCompiler.prototype.write, readTree is supplied by Broccoli -- call readTree(someInputTree) to read another tree. destDir is the path to a newly-created temporary directory created by the Writer base class. Place all the output files you wish to generate in this directory.

If you want to do something asynchronous, return a promise that resolves when you are done.

In the MyCompiler constructor, you don't need to call the Writer base class constructor.

Your plugin can be used in Brocfile.js like so:

var compileSomething = require('broccoli-my-compiler');

var outputTree = compileSomething(arg1, arg2, ...)
org.webjars.npm

Broccoli

The Broccoli build tool

Версии библиотеки

Версия
0.1.1