From 9016665c0ebf0632970a309de3782863d8b7174d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Sun, 14 Dec 2014 12:51:39 -0800 Subject: [PATCH] Enable strip-types transform for internal code Flow is coming so we need to be ready. --- bin/jsx-internal | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/jsx-internal b/bin/jsx-internal index 430e596cf1b4..8716d7f1c3de 100755 --- a/bin/jsx-internal +++ b/bin/jsx-internal @@ -2,8 +2,7 @@ // -*- mode: js -*- "use strict"; -var getAllVisitors = require('../vendor/fbtransform/visitors').getAllVisitors; -var transform = require('jstransform').transform; +var transform = require('../main').transform; var propagate = require("../vendor/constants").propagate; require("commoner").version( @@ -31,7 +30,7 @@ require("commoner").version( var constants = context.config.constants || {}; // This is where JSX, ES6, etc. desugaring happens. - source = transform(getAllVisitors(), source).code; + source = transform(source, {harmony: true, stripTypes: true}); // Constant propagation means removing any obviously dead code after // replacing constant expressions with literal (boolean) values.