jayphelps / core-decorators

Library of stage-0 JavaScript decorators (aka ES2016/ES7 decorators but not accurate) inspired by languages that come with built-ins like @​override, @​deprecate, @​autobind, @​mixin and more. Popular with React/Angular, but is framework agnostic.
MIT License
4.52k stars 263 forks source link

npm run build - fails from Windows command prompt #117

Closed BurtHarris closed 7 years ago

BurtHarris commented 7 years ago

Looks like the build script update for es output causes a failure for the windows platform. It look to be driven by this line in package.json:

    "build": "babel --out-dir lib src && BABEL_ENV=es babel --out-dir es src",

I gather that starting the second command with BABEL_ENV=es is a bash convention for setting a temporary environment variable. It doesn't work under Command.exe. It seems like a cool feature for a shell, just not found everywhere.

jayphelps commented 7 years ago

https://www.npmjs.com/package/cross-env would solve this. I don't have a Windows machine to test, but if you get it working please do PR!

BurtHarris commented 7 years ago

cross-env sounds cool, thanks I'll have a look.

P.S. https://www.appveyor.com is free windows-based CI service (for public projects) could be useful. I could probably submit a PR to enable it if you are interested..

jayphelps commented 7 years ago

@BurtHarris always interested in PRs like that! 👍

BurtHarris commented 7 years ago

Give me a few minutes, I'll add appveyor to my branch.

BurtHarris commented 7 years ago

Done! @jayphelps Please have a look. https://ci.appveyor.com/project/BurtHarris/core-decorators-js/build/1.0.4