Network Performance Monitor
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

yellfy-use

2.1.0 • Public • Published

yellfy-use

User-friendly require function for Yellfy project.

Travis Status

Install

$ npm i -D yellfy-use

Why?

In order to describe dependencies of tasks easier. Without const and require.

Usage

// npm i -D gulpjs/gulp#4.0 yellfy-use
const gulp = require('gulp');
const use = require('yellfy-use');
 
use.setup({
    gulp: gulp
});
 
// or global.use = new use.Use({ gulp: gulp }).use;
 
const $ = use('gulp-less', 'camelcase', 'very-long-name as shortName');
 
console.log($);
// {
//   gulp: [function],
//   helpers: {},
//   configs: {},
//   less: [function],
//   camelcase: [function],
//   shortName: [function]
// }

Supported options

gulp

  • Type: Object
  • Default: undefined

The gulp instance to use.

dependencies

  • Type: Boolean
  • Default: false

Check dependencies in the dependencies section.

devDependencies

  • Type: Boolean
  • Default: true

Check dependencies in the devDependencies section.

helperDir

  • Type: String
  • Default: null

The directory which contains the helper files.

configDir

  • Type: String
  • Default: null

The directory which contains the configuration files.

reporter

  • Type: Function
  • Default: >> Use 'npm i -D ...'
  • Example: reporter: (toInstall) => console.log(toInstall)

Custom reporter.

Changelog

See the Releases section of our GitHub project for changelogs for each release version.

License

This software is released under the terms of the MIT license.

install

npm i yellfy-use

Downloadsweekly downloads

15

version

2.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar