8000 Enable strip-types transform for internal code · gitcommituser/react@9016665 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9016665

Browse files
committed
Enable strip-types transform for internal code
Flow is coming so we need to be ready.
1 parent 6bb77b5 commit 9016665

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bin/jsx-internal

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
// -*- mode: js -*-
33
"use strict";
44

5-
var getAllVisitors = require('../vendor/fbtransform/visitors').getAllVisitors;
6-
var transform = require('jstransform').transform;
5+
var transform = require('../main').transform;
76
var propagate = require("../vendor/constants").propagate;
87

98
require("commoner").version(
@@ -31,7 +30,7 @@ require("commoner").version(
3130
var constants = context.config.constants || {};
3231

3332
// This is where JSX, ES6, etc. desugaring happens.
34-
source = transform(getAllVisitors(), source).code;
33+
source = transform(source, {harmony: true, stripTypes: true});
3534

3635
// Constant propagation means removing any obviously dead code after
3736
// replacing constant expressions with literal (boolean) values.

0 commit comments

Comments
 (0)
0