Skip to content

Commit

Permalink
module import docs
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkunka committed May 7, 2018
1 parent 31c4ee0 commit c10b599
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ npm-debug.*
node_modules
dist
bundle/dist
bundle/easydropdown.js
bundle/easydropdown.dev.js
coverage
.nyc_output
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@ npm install easydropdown --save
You may then import the `easydropdown()` factory function into your project's modules.

```js
// ES Modules
import easydropdown from 'easydropdown';
```

// CommonJS
var easydropdown = require('easydropdown');

```js
var easydropdown = = require('easydropdown');
// AMD/RequireJS
define(['easydropdown/bundles/easydropdown.js'] , function (easydropdown) {
...
});
```

#### Script Tag
Expand Down
2 changes: 1 addition & 1 deletion config/webpack/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const config = (env: Environment = Environment.DEVELOPMENT): Configuration => {
mode: env,
entry: './src/umd.ts',
output: {
filename: isProductionEnvironment ? 'easydropdown.min.js' : 'easydropdown.js',
filename: isProductionEnvironment ? 'easydropdown.js' : 'easydropdown.dev.js',
path: resolve(__dirname, '..', '..', 'bundle'),
library: 'easydropdown',
libraryTarget: 'umd'
Expand Down

0 comments on commit c10b599

Please sign in to comment.