gulp-object-file-nimedev
v1.0.1
Published
Create a exportable object in a file
Downloads
3
Maintainers
Readme
gulp-object-file-nimedev
Create a exportable object in a file
Installation
$ npm install gulp-object-file-nimedev
Usage
In gulpfile.js
// Require the module
const objectFileTask = require('gulp-object-file-nimedev')
// Set options object for objectFileTask function
const options = {
// Name of the output file
fileName: 'app.constants.ts',
// Configuration object for gulp-file module
options: {
src: true
},
// Destination path
dest: 'src/app'
}
// Object to save
const config = {
restUrl: 'http://localhost:9001',
log: true
}
// Create a gulp task to copy files from options.src path to options.dest path
gulp.task('config-file', () => objectFileTask(config, options))
Note: dest in options objects follow the same rules of gulp.dest() arguments