1.0.1 • Published 8 years ago

gulp-object-file-nimedev v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

gulp-object-file-nimedev

npm

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

Changelog

License