Skip to content

Fixing babel transpiler errors. windows environments need to normaliz…#16

Open
nenitiko wants to merge 1 commit intoSteveSanderson:masterfrom
nenitiko:master
Open

Fixing babel transpiler errors. windows environments need to normaliz…#16
nenitiko wants to merge 1 commit intoSteveSanderson:masterfrom
nenitiko:master

Conversation

@nenitiko
Copy link
Copy Markdown

Tried running the generator in windows and got two different errors:

  1. babel-core was not added as a dev-dependency
  2. skipped files/folders in transpilationConfig (gulpfile.js) were not matching any files under windows due to the path separator differences between the Regex strings and the pathnames, this gives many babel transpilation errors for files in node_modules (jquery being one of the first)

I added both the babel-core npm depepdency and the normalization/conversion of backslashes to posix dir separators (by using github.com/sindresorhus/slash) before transpilation occurs.

…e directory separators otherwise babel transformation wont skip files specified in configuration
neelabhg added a commit to neelabhg/sysbuild that referenced this pull request Nov 22, 2015
1. Added babel-core as a dev-dependency.
2. Fixed path separator differences which were causing Babel to
transpile
skipped files under Windows.

The fix was taken from SteveSanderson/generator-ko#16.
@carbontwelve
Copy link
Copy Markdown

👍 This is ace, I spent half an hour tinkering and making it work then noticed this PR - you could have saved me half an hour had I looked before tinkering haha.

@gabriel-sas
Copy link
Copy Markdown

Good job in Fixing the issue! 👍

@jeanPokou
Copy link
Copy Markdown

thks, just fixed the bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants