1.0.0 • Published 8 years ago

@gustavnikolaj/module-kickstart v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
8 years ago

Module Kickstart

An example of how you can set up a repo for a node module enabling use of babel while allowing you to publish only transpiled code. It works when linking the source repo into other projects (by adding the babel runtime transpiler) and will automatically build the files for distribution when you publish packages.

Notes

Enable source maps

When transpiling the code with babel we enable inline source maps. The module source-map-support adds support for source maps in node. The module should be installed in the consuming project.

babel-plugin-add-module-exports

This babel plugin will allow you to write ES? module code that works nicely with CommonJS.

Take this example:

export default function main() { /* ... */ }

It would normally be transpiled into something rougly equivalent to:

module.exports = {
  default: function main() { /* ... */ }
};

With this plugin it will be transpiled into:

module.exports = function main() { /* ... */ };

It will only do that change, when you have only one export which is also marked with default. It will not change the behaviour in other cases.

1.0.0

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago

0.0.0

8 years ago