mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
We will continue using `bin/jsx-internal`, well, internally. Note that this version no longer respects `@providesModule`, and it doesn't do anything special with constants like `__DEV__`, so we can no longer get to claim that `bin/jsx` can be used to build the core. I'm happy about this, personally, because it demonstrates the flexibility of Commoner.
13 lines
377 B
JavaScript
Executable File
13 lines
377 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
"use strict";
|
|
|
|
var visitors = require('../vendor/fbtransform/visitors').transformVisitors;
|
|
var transform = require('jstransform').transform;
|
|
|
|
require("commoner").resolve(function(id) {
|
|
return this.readModuleP(id);
|
|
}).process(function(id, source) {
|
|
// This is where JSX, ES6, etc. desugaring happens.
|
|
return transform(visitors.react, source).code;
|
|
});
|