odoe / generator-arcgis-js-app

Generator for ArcGIS JS API applications
42 stars 9 forks source link

esri slurp needs to be called before grunt dev #4

Closed tomwayson closed 9 years ago

tomwayson commented 9 years ago

If not you will see dojo load errors for the esri/map module.

Don't know if this something that just needs to be doc'ed in the README, or should be part of the default grunt task, otherwise I'd PR a fix.

odoe commented 9 years ago

Odd, the generator is set up to do this when it's done generating files. https://github.com/odoe/generator-arcgis-js-app/blob/master/generators/app/index.js#L46

Does this issue come up on Windows? I can probably just create a initial grunt task or something, which makes sense if multiple people working on same project. I'll do that.

tomwayson commented 9 years ago

Yes, this is on Windows. The other thing to consider here is that my npm and bower installs went all wonky (#1 and #2), but I definitely saw grunt run after the install. I just assumed you had it run the default grunt task, but it looks like you're trying to have it run grunt esri_slurp. So, I don't know why (once I figured out my npm/bower issues) I didn't see the dist/esri folder.

odoe commented 9 years ago

Should be fixed via this commit https://github.com/odoe/generator-arcgis-js-app/commit/492a3971e2af55f9486e3525d14e46572179bc7d

Can you try latest release (0.0.9) and see if it fixes #1?

Thanks!

btfou commented 9 years ago

In 0.0.9:

  1. bower install never occurs despite https://github.com/odoe/generator-arcgis-js-app/blob/master/generators/app/index.js#L159
  2. esri_slurp gets called twice...should it be grunt.registerTask('initialize', ['esri_slurp:dev', 'default']);?
  3. Related to 1, default includes clean:dist so bower deps would get deleted even if bower would have run
  4. As a result the dev server fails when requesting dojo/dojo.js
odoe commented 9 years ago

I just tested on Win 8.1 with a fresh Yeoman install and it worked as expected using the app generator. Not sure why bower install wouldn't work.

clean:dist is set up to not remove the dependencies from the directory.

Are you running the generator inside a folder meant to be used for the app?

btfou commented 9 years ago

Missed those !.

Just reran all fresh. Works!

tomwayson commented 9 years ago

I tried again, but this time grunt didn't run at all, not surprising since yeoman's npm install fails (#1) and there are no installed grunt packages, so that's not really saying anything.

odoe commented 9 years ago

Alright @tomwayson , try it now. I use _.classify(appname) for package and bower json files now, so this should fix npm choking on names with dashes and spaces.

tomwayson commented 9 years ago

Confirmed that this is resolved in 0.0.10. Thanks!

Sorry that I opened a couple of issues for what turned out to be the same problem (#1).