Commit Graph

8 Commits

Author SHA1 Message Date
Luca Greco 96cfb9c5c2 test: re-run the test suite on the minified file on travis 2017-04-11 14:24:23 +02:00
Luca Greco 9a38d923e9 fix: use babili to minify ES6 sources. 2017-04-11 14:19:56 +02:00
Luca Greco 31d778c2cd fix: Changes to the UMD built file and npm package publishing
This patch introduces on top of #17 some minor changes from the
review comments, in particular:

- do not replace require("../filename") to include the api-metadata.json
  (restored the original '{/* include("...") */}' placeholder)
- raise an appropriate error message when the source file is used
  by mistake (or the "dist/" file has not been built correctly).
- set the generated UMD wrapped module as the package.json main
  entrypoint
- do not include api-metadata.json and src dir from the files included
  in the published npm package
- run both build and test npm scripts on prepublish
2017-04-11 14:16:15 +02:00
Joseph Frazier f9248e62e7 feat: library wrapped as an UMD module
This addresses [issue 7] by making it possible for users to run:

```sh
npm install webextension-polyfill
```

and download a module that they can use with a bundler as follows:

```js
import browser from 'webextension-polyfill';
```

Also, add a [prepublish script] so that users who clone the repo don't
need to run `grunt` manually. In addition, specify [files] in
package.json so that this module can be published to npm without
including miscellanea. This can be verified by running:

```sh
npm pack && tar -tvf webextension-polyfill-0.1.0.tgz
```

[issue 7]: https://github.com/mozilla/webextension-polyfill/issues/7
[files]: https://docs.npmjs.com/files/package.json#files
[prepublish script]: https://docs.npmjs.com/misc/scripts
2017-04-11 13:32:31 +02:00
Joseph Frazier 52791c8633 fix: normalized package.json properties
When running `npm install` to add new `devDependencies`, `npm` reformats
package.json with these changes, as can be seen [here]. Making these
changes separately allows developers to more easily keep them out of
unrelated commits.

[here]: https://github.com/mozilla/webextension-polyfill/pull/11/files#diff-b9cfc7f2cdf78a7f4b91a753d10865a2L22
2017-04-11 13:32:02 +02:00
Luca Greco de50f2047d test: update eslint to version 3.9.1 and add enforced indentation on call expression params 2016-11-07 16:34:34 +01:00
Luca Greco c08b8af982 test: introduced a test suite for unit testing. 2016-11-07 16:33:42 +01:00
Kris Maglione c74d1af46d Initial checkin. 2016-10-10 11:36:21 -07:00