# gulp-name-amd

> use the file name as the amd module name if none

Latest version **1.0.2** (published 2015-07-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-name-amd
pnpm add gulp-name-amd
yarn add gulp-name-amd
bun add gulp-name-amd
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-07-30 |
| First published | 2015-07-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Elvin zhu |
| Maintainers | elvinzhu |
| Keywords | gulpplugin, amd, name, module |

## Links

- npm: https://www.npmjs.com/package/gulp-name-amd
- Repository: https://github.com/elvinzhu/gulp-name-amd
- Issues: https://github.com/elvinzhu/gulp-name-amd/issues
- npm.io page: https://npm.io/package/gulp-name-amd

## Dependencies (5)

- [esprima](https://npm.io/package/esprima.md) ^2.4.1
- [through2](https://npm.io/package/through2.md) ^2.0.0
- [escodegen](https://npm.io/package/escodegen.md) ^1.6.1
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.0
- [htmlclean](https://npm.io/package/htmlclean.md) ^2.6.4

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2015-07-30
- 1.0.1 — 2015-07-29
- 1.0.0 — 2015-07-29

## README

# gulp-name-amd

give AMD module a module name if none

## Install
```
$ npm install --save-dev gulp-nam-amd
```
## Usage
##### AMD module
```js
/***
 * views/index.js
 **/
define(['base'], function( Baseview ){
	"use strict";
	......
})
```
##### run plugin
```js
/***
 * in gulpfile.js
 **/
var nameAmd  = require('gulp-name-amd');
...

gulp.src( './views/*.js' ) )
    .pipe( nameAmd( ) ) 
    .pipe( gulp.dest( './buld/views' ));
    
```
##### result
```js
/***
 * build/views/index.js
 **/
 
define('index', ['base'], function( Baseview ){
	"use strict";
	......
})
```

## Note
 * DO NOT put code before define([],function(){}) call

---
_Source: https://npm.io/package/gulp-name-amd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
