gulp-amd-builder

0.1.2 • Public • Published

gulp-amd-builder

Gulp plugin for creating distributable AMD-compatible bower modules using AMD internally

Build Status Dependency Status devDependency Status

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.

Package Sidebar

Install

npm i gulp-amd-builder

Weekly Downloads

3

Version

0.1.2

License

none

Last publish

Collaborators

  • tkuminecz