0.1.2 • Published 10 years ago
gulp-amd-builder v0.1.2
gulp-amd-builder
Gulp plugin for creating distributable AMD-compatible bower modules using AMD internally
Getting Started
Installing the Plugin
Install the module via npm
:
npm install --save-dev gulp-amd-builder
Using the plugin
The plugin assumes by default that your source code is in {your module}/src/
, and generates an output file in {your module}/dist/
.
var gulp = require('gulp'),
amdBuilder = require('gulp-amd-builder');
// generates dist/module.js from src/**/*.js
gulp.task('build', ['other-build-process'], function() {
return amdBuilder({
srcDir: 'src',
distDir: 'dist',
moduleName: 'module'
});
});
API
amdBuilder(opts)
opts.srcDir
Type: string
The directory containing the source files.
opts.distDir
Type: string
The directory where outFile
should be created.
opts.moduleName
Type: string
The name of the module. If outFile
is not supplied, this is used to generate the filename.
opts.outFile
Type: string
The name of the output file.
opts.wrapper
Type: string
The path to the wrapper file.