gulp-module-name-amd

2.0.1 • Public • Published

gulp-module-name-amd

give AMD module a module name if none

Based on https://github.com/elvinzhu/gulp-name-amd

Install

$ npm install --save-dev gulp-module-name-amd

Usage

AMD module
/***
 * views/index.js
 **/
define(['base'], function( Baseview ){
	"use strict";
	......
})
run plugin
/***
 * in gulpfile.js
 **/
var nameAmd  = require('gulp-module-name-amd');
...

gulp.src( './views/*.js' ) )
    .pipe( nameAmd( ) )
    .pipe( gulp.dest( './buld/views' ));
result
/***
 * build/views/index.js
 **/

define('index', ['base'], function( Baseview ){
	"use strict";
	......
})

Note

Package Sidebar

Install

npm i gulp-module-name-amd

Weekly Downloads

1

Version

2.0.1

License

MIT

Unpacked Size

5.97 kB

Total Files

4

Last publish

Collaborators

  • neverforgive