broccoli-merge-trees

WebJar for broccoli-merge-trees

Лицензия

Лицензия

MIT
Группа

Группа

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

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

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

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

3.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

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

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

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/broccolijs/broccoli-merge-trees

Скачать broccoli-merge-trees

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

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : broccoli-plugin jar [1.3.0,2)
org.webjars.npm : merge-trees jar [2.0.0,3)

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

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

broccoli-merge-trees

CI

Copy multiple trees of files on top of each other, resulting in a single merged tree.

Installation

npm install --save-dev broccoli-merge-trees

Usage

  • As a function call
const broccoliMergeTrees = require('broccoli-merge-trees');

let mergedNode = broccoliMergeTrees(inputNodes, options);
  • With new
const { MergeTrees } = require('broccoli-merge-trees');

let mergedNode = new MergeTrees(inputNodes, options);
  • inputNodes: An array of nodes, whose contents will be merged

  • options: A hash of options

Options

  • overwrite: By default, broccoli-merge-trees throws an error when a file exists in multiple nodes. If you pass { overwrite: true }, the output will contain the version of the file as it exists in the last input node that contains it.

  • annotation: A note to help tell multiple plugin instances apart.

  • destDir: A string representing the destination path that merged files will be copied to.

Example

If this is your Brocfile.js:

const mergeTrees = require('broccoli-merge-trees');

module.exports = function() {
  return mergeTrees(['public','scripts']);
};

And your project contains these files:

.
├─ public
│  ├─ index.html
│  └─ images
│     └─ logo.png
├─ scripts
│  └─ app.js
├─ Brocfile.js
…

Then running broccoli build the-output will generate this folder:

the-output
├─ app.js
├─ index.html
└─ images
   └─ logo.png

The parent folders, public and scripts in this case, are not included in the output. The output tree contains only the files within each folder, all mixed together.


If this is your Brocfile.js:

var BroccoliMergeTrees = require('broccoli-merge-trees');

module.exports = new BroccoliMergeTrees(['public', 'scripts'], {
    destDir: 'assets'
});

Then running broccoli build the-output will generate this folder:

the-output
└─ assets
    ├─ app.js
    ├─ index.html
    └─ images
    └─ logo.png

Contributing

Clone this repo and run the tests like so:

npm install
npm test

Issues and pull requests are welcome. If you change code, be sure to re-run npm test. Oftentimes it's useful to add or update tests as well.

org.webjars.npm

Broccoli

The Broccoli build tool

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

Версия
3.0.2
2.0.0
1.1.1