-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate moduleNames for AMD/UMD #176
Conversation
Generate moduleNames for AMD/UMD
Looks good! Thanks! 馃憤 Sorry about those houndci comments that I've since deleted, I forgot I added it. |
Wow @sebmck, thanks for merging! I've added a bunch more documentation to this thread so if you need me to do anything more please let me know. I'm still working my way through the codebase. I see the build is failing so I'll have to update the tests, but it's 3AM here so I need some sleep first. 馃樃 |
Let me know if you have any questions (https://gitter.im/6to5/6to5), happy to have extra contributors! Pushed out a new release 1.12.17 I updated the tests/documentation and added |
@sebmck Awesome, happy to pitch in where I can. Thanks for the amazing work. |
@darvelo Thank you very much. It is truly awesome! |
Add test for invalid electron version
Add test for invalid electron version
references #158, references #44
This PR allows for generating user-defined module names for AMD and UMD.
Users can define a root prefix for each module, which allows for more flexible application routing (e.g.
js-client/moduleA
), and can strip the source file's directory root so that module names can be relative (e.g. module name ismoduleA
rather than/home/user/myApp/es6/moduleA
).This meant a couple of new user-defined opts, which for now I've named:
sourceRoot
- the JS source directory to be stripped from the pathmoduleRoot
- an optional prefix for each module. I've got a couple of lines forgulp-6to5
for this part that I will submit a PR for if these changes look good to go. Forgulp-6to5
the changeset would be something like this:With
sourceRoot: __dirname + '/js'
ingulpfile.js
andmoduleRoot: 'client'
, you'll see something like this:Modules
Output
index.html
I'm not totally sure how sourcemaps work here so I haven't done anything on that front yet.
Let me know what you think! 馃槈