
Product
Introducing Custom Tabs for Org Alerts
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.
base-target
Advanced tools
Plugin that adds support for defining declarative `target` configurations that directly map to functional tasks.
Plugin that adds support for defining declarative target configurations that directly map to functional tasks.
You might also be interested in expand-target.
Install with npm:
$ npm install --save base-target
Can be used with gulp or any supporting base application.
var target = require('base-target');
var each = require('base-files-each');
var Base = require('base-app');
var app = new Base();
app.use(target());
app.use(each());
// create a "target" configuration
var site = app.target('site', {
options: {
data: {
site: { title: 'My Blog' }
}
},
src: 'templates/*.hbs',
dest: 'site',
});
// build the target
app.task('default', function(cb) {
app.each(site, cb);
});
See the expand-target library for additional information and API documentation.
Returns true if the given value is a valid Target.
Params
val {any}returns {Boolean}Example
app.isTarget('foo');
//=> false
var Target = require('expand-target');
var target = new Target();
app.isTarget(target);
//=> true
Get target name from app.targets, or set target name with the given config.
Params
name {String|Object|Function}config {Object|Fucntion}returns {Object}: Returns the app instance when setting a target, or the target instance when getting a target.Example
app.target('foo', {
options: {},
files: {
src: ['*'],
dest: 'foo'
}
});
// or
var target = app.target('foo');
Add target name to app.targets.
Params
name {String}config {Object|Function}Example
app.addTarget('foo', {
options: {},
files: {
src: ['*'],
dest: 'foo'
}
});
Get target name from app.targets, or return a normalized instance of Target if an object or function is passed.
Params
name {String}options {Object}Example
var target = app.getTarget('foo');
// or create an instance of `Target` using the given object
var target = app.getTarget({
options: {},
files: {
src: ['*'],
dest: 'foo'
}
});
Get or set the Target constructor. Exposed as a getter/setter to allow it to be customized before or after instantiation.
Example
// set
app.Target = require('expand-target'); // or something custom
// get
var target = new app.Target();
This plugin can be used with base, or any of the following base applications:
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on July 18, 2016.
FAQs
Plugin that adds support for defining declarative `target` configurations that directly map to functional tasks.
We found that base-target demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.