lbialy / play-ng2-webpack2

Play 2.6.0 + Angular with Angular-CLI + SBT - based build
Other
55 stars 20 forks source link

Added Windows compatibility to build and test scripts #6

Closed ronniegane closed 7 years ago

ronniegane commented 7 years ago

fixes #1 - allows sbt run and sbt test to work out-of-the-box on windows OS (tested on Windows 10 x64) and Mac (tested on OSX El Capitan 10.11.6).

Still outstanding issues:

lbialy commented 7 years ago

a) that normalize_file_names.sh script wasn't a very bright move on my side. It's quite obvious that same thing can be achieved using a node.js script, which is guaranteed to succeed thanks to node being available. b) yes, that's precisely result of that issue as I replaced npm task calls with ng task calls in last update. I think that webdriver should be updated during postinstall hook so that it doesn't get called every time one runs sbt test - it's relatively expensive, as it's doing a network call AFAIR.

Thanks for PR, I'll review it in few minutes 👍

lbialy commented 7 years ago

One more thing about a) - that's a problem only because angular-cli people insist on generating compilation hashes in file names for prod files and no option to disable that. I'll check if they added this option. Another way would be to make Play resolve and serve files with compilation hash somehow.

ronniegane commented 7 years ago

@lbialy with the webdriver update issue, for my own project that I'm building from this seed I added && ./node_modules/protractor/bin/webdriver-manager update to the postinstall script in package.json and that seemed to work. On OSX at least, I haven't tested it on Windows yet. Lets you run sbt test on a brand new project without having to manually update webdriver. Got the idea from this stackoverflow thread