# grunt-es6-module-wrap-default

> Wrap CommonJS and AMD modules created with es6-module-transpiler so that they can be required as ('name') and not ('name').default

Latest version **0.2.0** (published 2014-04-08) · 0 weekly downloads

## Install

```sh
npm install grunt-es6-module-wrap-default
pnpm add grunt-es6-module-wrap-default
yarn add grunt-es6-module-wrap-default
bun add grunt-es6-module-wrap-default
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2014-04-08 |
| First published | 2014-01-26 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Stephen J. Collings |
| Maintainers | stevoland |
| Keywords | gruntplugin |

## Links

- npm: https://www.npmjs.com/package/grunt-es6-module-wrap-default
- Repository: https://github.com/stevoland/grunt-es6-module-wrap-default
- Issues: https://github.com/stevoland/grunt-es6-module-wrap-default/issues
- npm.io page: https://npm.io/package/grunt-es6-module-wrap-default

## Recent versions

- 0.2.0 (latest) — 2014-04-08
- 0.1.1 — 2014-03-26
- 0.1.0 — 2014-01-26

## README

# grunt-es6-module-wrap-default

> Wrap CommonJS and AMD modules created with [es6-module-transpiler](https://github.com/square/es6-module-transpiler) so that they can be required as ('name') and not ('name').default

## Getting Started
This plugin requires Grunt `~0.4.2`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-es6-module-wrap-default --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-es6-module-wrap-default');
```

## The "es6_module_wrap_default" task

### Overview
In your project's Gruntfile, add a section named `es6_module_wrap_default` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  es6_module_wrap_default: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      // Target-specific file lists and/or options go here.
    },
  },
});
```

### Options

#### options.type
Type: `String`
Default value: `'cjs'`

Either `'cjs'` or `'amd'`.

### Usage Examples

```js
grunt.initConfig({
  es6_module_wrap_default: {
    options: {
      type: 'cjs'
    },
    files: [{
      expand: true,
      cwd: 'cjs/transpiled',
      src: ['**/*.js'],
      dest: 'cjs'
    }]
  },
});
```


## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History
_(Nothing yet)_

---
_Source: https://npm.io/package/grunt-es6-module-wrap-default · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
