Closed ronniegane closed 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 👍
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.
@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
fixes #1 - allows
sbt run
andsbt 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:
chmod +x normalize_file_names.sh
command, becausechmod
doesn't exist on Windows. Not sure what to do about that, since you can't put OS-checking logic in package.json, could possibly have the postinstall script call some javascript with node that carries out OS-specific commands. This has no effect on the web app running successfully though.sbt test
fails initially with error code 135:Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
This might be related to this angular-cli issue. In any case, this is fixed by runningnpm run pree2e
in the/ui
folder. Maybe we could add that to the normal sbt test hook.