Created
November 15, 2018 01:56
-
-
Save sgen/a84cb7dcb4515db16a7d952f94b726d1 to your computer and use it in GitHub Desktop.
Recreate the Gulp.js @babel/register issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
working_dir='gulp-babel-register-namespace-issue-scratchpad'; | |
mkdir -p "$working_dir"; | |
cd "$working_dir"; | |
cat << EOF >> package.json | |
{ | |
"name": "gulp-babel-register-namespace-issue-scratchpad", | |
"version": "0.0.1", | |
"description": "An example repository showing the current issue with using @babel/register with gulp", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"license": "UNLICENSED", | |
"devDependencies": { | |
"@babel/preset-es2015": "^7.0.0-beta.53", | |
"@babel/register": "^7.0.0", | |
"gulp": "^4.0.0" | |
} | |
} | |
EOF | |
cat << EOF >> .babelrc | |
{ | |
"presets": [ "es2015" ] | |
} | |
EOF | |
cat << EOF >> gulpfile.babel.js | |
export default function build() { | |
return Promise.resolve(); | |
} | |
EOF | |
npm install; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment