Skip to content

Javascript ES6 preprocessor with Babel #940

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

Closed
wants to merge 16 commits into from
Closed

Javascript ES6 preprocessor with Babel #940

wants to merge 16 commits into from

Conversation

Kauabunga
Copy link

Added a follow up question to the first language selection question to enable ES6 client support with Babel if they originally select 'Javascript'.

Using the Babel library after better experiences with it over Traceur. Has more readable output and does not require a runtime library component.

  • Change scoped to the app generator
  • Added generator tests
  • Does not touch the generated ES5 angular components
  • Does not touch the language used in the server components

Related issue: Any plans for es6 and traceur support? #684

kleinlieu and others added 16 commits November 17, 2014 22:58
Fixing grammatical errors in endpoint generator
refactor: deprecate res.[send|json](status)
chore(gitignore) add npm-debug.log to gitignore
…t with mongodb server for some

reason

when the app will be started with grunt serve, if configured to run with mongodb and the service
will not be available, then the app will initialize anyway but mostly this isnt desired and no
handling or debug information of why the app has no connection to a mongodb server will be
provided
feat(app): exit process if unable to connect to mongo
In default variant if we have an error the code will continue executing
In default variant if we have an error the code will continue executing
…g babel

Added a follow up question to the first language selection question to enable
ES6 client support with Babel.

Related issue: Any plans for es6 and traceur support? #684
@Awk34
Copy link
Member

Awk34 commented Apr 22, 2015

👍 Nice

@bjackson
Copy link

This would be really sweet. It looks like there are some merge conflicts that might need to be solved before it can be merged, though.

@@ -50,7 +50,11 @@
<script src="socket.io-client/socket.io.js"></script><% } %>
<!-- endbuild -->

<% if(filters.babel) { %>
<!-- build:js(.tmp) app/app.js -->

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do exactly? Why is it different depending on wether babel is used?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heya - bit of a slow reply! Babel is precompiling all the /client js resources to /.tmp.

If we inject all the js resources from /.tmp and /client with the non-babel index.html annotation .... ..... then we get a double up of all ES5 and ES6 items causing angular to die with multiple definitions of modules or something along those lines.

@Awk34
Copy link
Member

Awk34 commented May 29, 2015

Also just thought, can you add the babel karma preprocessor and make sure that tests run alright?

@Kauabunga
Copy link
Author

Hey Andrew - have just booted up this fork again. Will have a look at getting babel and karma dancing when my time frees up this week.

@Kauabunga
Copy link
Author

Also - re the merge conflicts. I had forked from master though submitted the pull request to canary as suggested in the readme. Should I have (forked from canary/merged from canary) before submitting the request?

@Awk34
Copy link
Member

Awk34 commented Jun 16, 2015

As Canary has become a bit stale, it's fine to merge to master, especially with a fully working feature. If you don't have the time to tweak this I can go for it.

@Kauabunga
Copy link
Author

Sure - Happy for you to gun for it.

I had been playing around with karma config to get ES6 client tests working and have just wrapped up getting the changes into the generator.

Check it out if you'd like - they're sitting on Kauabunga:pullrequest-feature-es6-babel-and-karma

Seems to merge with DaftMonk:master all good.

@Awk34
Copy link
Member

Awk34 commented Jun 16, 2015

will do, thanks!

@Awk34
Copy link
Member

Awk34 commented Jun 17, 2015

Closed with #998, thank you!

@Awk34 Awk34 closed this Jun 17, 2015
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

Successfully merging this pull request may close these issues.

10 participants