poetic / ember-cli-cordova

A tool for creating hybrid apps using a combination of ember-cli and cordova
MIT License
441 stars 77 forks source link

Check for dist folder before running ember cordova commands #40

Closed leonidez closed 10 years ago

leonidez commented 10 years ago

It would be nice if the ember cordova commands checked for the existence of the dist/ folder before trying to run. This would prevent errors such as 'Current working directory is not a Cordova project'. If the folder is not detected them ember cordova could run ember build to create the folder and then continue with its command.

rwjblue commented 10 years ago

Those commands could actually run a build as needed.

@jakecraige -- See https://github.com/stefanpenner/ember-cli/blob/master/lib/commands/test.js#L56 for an example, this.tasks.Build should return the main BuildTask just like in EmberCLI's TestCommand.

jakecraige commented 10 years ago

@rjackson nice! I didn't realize I could access the tasks in my command. That'll be a good refactor throughout to use that instead of exec'ing command line commands

That's what I was thinking as well, if it exists, cool, if not, I'll just run the build first