mild-config

Mild config for gulp

Usage no npm install needed!

<script type="module">
  import mildConfig from 'https://cdn.skypack.dev/mild-config';
</script>

README

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

Related

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

License

MIT © Guntur Poetra