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

Build: Invert JSX pragma application condition #7701

Merged
merged 1 commit into from
Jul 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/packages/get-babel-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const plugins = map( babelDefaultConfig.plugins, ( plugin ) => {
return plugin;
} );

if ( process.env.TRANSFORM_JSX_PRAGMA ) {
if ( ! process.env.SKIP_JSX_PRAGMA_TRANSFORM ) {
plugins.push( [ require( '../../packages/babel-plugin-import-jsx-pragma' ).default, {
scopeVariable: 'createElement',
source: '@wordpress/element',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@
"scripts": {
"prebuild": "npm run check-engines",
"clean:packages": "rimraf ./packages/*/build ./packages/*/build-module",
"prebuild:packages": "npm run clean:packages && cross-env INCLUDE_PACKAGES=babel-plugin-import-jsx-pragma node ./bin/packages/build.js",
"build:packages": "cross-env TRANSFORM_JSX_PRAGMA=1 EXCLUDE_PACKAGES=babel-plugin-import-jsx-pragma node ./bin/packages/build.js",
"prebuild:packages": "npm run clean:packages && cross-env INCLUDE_PACKAGES=babel-plugin-import-jsx-pragma SKIP_JSX_PRAGMA_TRANSFORM=1 node ./bin/packages/build.js",
"build:packages": "cross-env EXCLUDE_PACKAGES=babel-plugin-import-jsx-pragma node ./bin/packages/build.js",
"build": "npm run build:packages && cross-env NODE_ENV=production webpack",
"check-engines": "check-node-version --package",
"ci": "concurrently \"npm run lint && npm run build\" \"npm run test-unit:coverage-ci\"",
Expand Down