Skip to content

Conversation

@mattlewis92
Copy link

I've added support for publishing to npm as well as requiring() with commonjs with tools like webpack, browserify etc.

After merging + whenever publishing a new release all you'll need to do is npm publish

Let me know if I missed anything.

Thanks!

@frapontillo
Copy link
Owner

@mattlewis92 do you still need this? If so, could you please add some tests to check that the module load happens correctly? Thanks.

@mattlewis92
Copy link
Author

@frapontillo Yup I still need this, in order to do a test for it though I'll need to integrate a module bundler like webpack (as a dev dependency). Are you ok with this?

@frapontillo
Copy link
Owner

Why would you need webpack? Can't you simply include commonjs as a devDep?

@mattlewis92
Copy link
Author

Commonjs is a module format used by bundles such as browserify or webpack I.e require('module-name'); Its more of a technique rather than a library you install.

On 27 Feb 2016, at 17:52, Francesco Pontillo notifications@github.com wrote:

Why would you need webpack? Can't you simply include commonjs as a devDep?


Reply to this email directly or view it on GitHub.

@frapontillo
Copy link
Owner

Yeah, but it would need the require function to be declared, right? That's defined in the commonjs module, whereas Webpack can be used to pack the module in several formats (commonjs, amd, es6, etc). I may be wrong on everything, though. 😁

@mattlewis92
Copy link
Author

The require function is defined by the module bundler like webpack, browserify etc. I'll add it to this PR and you'll see what I mean 😄

@frapontillo
Copy link
Owner

Okay, thanks, let's see where this leads us!

@mattlewis92
Copy link
Author

I've added a test for the module name, is that OK for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants