yellfy-use
TypeScript icon, indicating that this package has built-in type declarations

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.

/yellfy-use/

    Package Sidebar

    Install

    npm i yellfy-use

    Weekly Downloads

    2

    Version

    2.1.0

    License

    MIT

    Last publish

    Collaborators

    • mrmlnc