Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make addon consumable without build step / as Git dependency #55

Closed
buschtoens opened this issue Feb 28, 2018 · 2 comments
Closed

Make addon consumable without build step / as Git dependency #55

buschtoens opened this issue Feb 28, 2018 · 2 comments

Comments

@buschtoens
Copy link
Contributor

I am very much looking forward to get to use #52 in production. So much in fact, that I have been using a private fork for quite some time now, since there has been no official release so far. The point of this issue is not to pressure you into cutting a new release.

The reason I'm opening this issue, is this diff buschtoens@a9b6f76

 /* eslint-env node */
 
-module.exports = require('./lib/index');
+module.exports = require('./src/index');

Because of this build step here:

https://github.com/ivanvotti/ember-svg-jar/blob/bbec727607a7f0f80f82ea2a5692079a1050b63a/package.json#L24

To be able to use this addon as a direct Git dependency, which is useful for trying out unreleased features or fixes, you either have to apply the above patch or push a built version.

Since you're not using any ES features that aren't natively supported on the latest version of Node, enabling direct, untranspiled usage is no problem.

I think the cleanest solution is to add a symlink lib/index.js to src/index.js or a js file that re-exports src/index.js for maximum OS compatibility, and then remove that file during the build step.

Would you accept such a PR?

@voltidev
Copy link
Collaborator

Sounds good. It would be great to have such a PR. I'm going to release in a few days.

@voltidev
Copy link
Collaborator

It's done. The addon can be consumable without the build step as Git dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants