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

Setup babel for ES6 and JSX transformation. #1060

Merged
merged 4 commits into from Jun 9, 2016
Merged

Setup babel for ES6 and JSX transformation. #1060

merged 4 commits into from Jun 9, 2016

Conversation

wolfd
Copy link
Contributor

@wolfd wolfd commented Jun 2, 2016

The eventual goal is to have SingularityUI to be entirely a React/Babel ES6 project.

Steps taken:

  • Convert GlobalSearch to JSX/ES6

Notes on how to do coffeescript -> es6 transformation:

  • the decaffeinate npm module does a lot of the heavy lifting, but do it one file at a time
  • comment out all of the CJSX parts of the file, convert those manually
  • rewrite parts that use coffeescript specific functionality (such as the in keyword)
  • because of the differences in ES6 imports versus CommonJS, you have to add .default to the ES6 imports

render() {
let options = _.pluck(this.props.requests.toJSON(), 'id');

globalSearchClasses = classNames({
Copy link
Contributor

Choose a reason for hiding this comment

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

add const globalSearchClasses here instead of the let at the top of the file

@tpetr tpetr added this to the 0.8.0 milestone Jun 7, 2016
@tpetr tpetr merged commit e060efe into master Jun 9, 2016
@tpetr tpetr removed hs_qa labels Jun 9, 2016
@ssalinas ssalinas deleted the babel branch September 12, 2016 20:51
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.

None yet

2 participants