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 it possible to use harmony transforms in the browser with script tags #1420

Closed
zpao opened this issue Apr 17, 2014 · 1 comment
Closed

Comments

@zpao
Copy link
Member

zpao commented Apr 17, 2014

We already have the option enabled in the browser transform, and we export a function there that takes an option (for use with react-rails, et al). But we didn't make it possible to pass options from your <script type="text/jsx"> blocks. Let's do it.

Since there are no JS data types in html, let's just do an JSON.stringifyed data-options attribute.

There's only the single option right now, so <script type="text/jsx" data-options="{\"harmony\": true}" is all we need to support. Other options can be added easily if they come up.

@sophiebits
Copy link
Contributor

Well, we could do type="text/jsx;harmony" or similar; that's used to specify JS language versions in Firefox.

@zpao zpao closed this as completed in 65c258a Jun 20, 2014
zpao added a commit that referenced this issue Jun 20, 2014
Add harmony transform support in browser

Fixes #1420. Moved some code around in the merge to account for more
changes in the transform code.

Conflicts:
	vendor/browser-transforms.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants