Skip to content

Setup babel for ES6 and JSX transformation.#1060

Merged
tpetr merged 4 commits into
masterfrom
babel
Jun 9, 2016
Merged

Setup babel for ES6 and JSX transformation.#1060
tpetr merged 4 commits into
masterfrom
babel

Conversation

@wolfd

@wolfd wolfd commented Jun 2, 2016

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

2 participants