npm.io
0.1.2 • Published 9 years ago

mild-config

Licence
MIT
Version
0.1.2
Deps
1
Vulns
0
Weekly
0

mild-config Build Status

Mild config for gulp

Make easy and simple to setup gulp config tasks.

Install

$ npm install --save mild-config

Usage

const path = require('path');
const gulp = require('gulp');
const config = require('mild-config');

const source = path.join(config.get('js.sourcePath'), 'app.js');
const output = path.join(config.get('js.outputPath'), 'bundle.js');

gulp.task('script', () => {
    return gulp.src(source)
        .pipe(plugin1())
        .pipe(plugin2())
        .pipe(gulp.dest(output));
});

API

See dot-prop API

config.set(key, val)
config.get(path)
  • path

    Type: string

  • key

    Type: string, object

  • val

    Type: any

  • dot-prop - API for this module (Get, set, or delete a property from a nested object using a dot path)

License

MIT Guntur Poetra

Keywords