Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hardcoded appDir #18

Open
jensengar opened this issue Aug 10, 2014 · 1 comment
Open

hardcoded appDir #18

jensengar opened this issue Aug 10, 2014 · 1 comment
Assignees
Labels

Comments

@jensengar
Copy link

So I couldn't figure out why grunt dev would work correctly in the browser but failed to copy all the resources to www in order to build correctly when emulating devices. I eventually tracked the error to this line in grunt.js

appDir: 'app/www',

which I am pretty sure should just be:

appDir: 'www',

When I changed it to www however, I started to get the following errors in the browser and on the devices:

GET http://0.0.0.0:9001/vendor.css 404 (Not Found) 0.0.0.0/:10
GET http://0.0.0.0:9001/app.css 404 (Not Found) 0.0.0.0/:11
GET http://0.0.0.0:9001/cordova.js 404 (Not Found) 0.0.0.0/:14
GET http://0.0.0.0:9001/endor.js 404 (Not Found) 0.0.0.0/:15
GET http://0.0.0.0:9001/g.js 404 (Not Found) 0.0.0.0/:16
GET http://0.0.0.0:9001/pp.js 404 (Not Found) 0.0.0.0/:17
GET http://0.0.0.0:9001/onfig.js 404 (Not Found) 0.0.0.0/:18
GET http://0.0.0.0:9001/odules.js 404 (Not Found) 0.0.0.0/:19
GET http://0.0.0.0:9001/irectives.js 404 (Not Found) 0.0.0.0/:20
GET http://0.0.0.0:9001/ilters.js 404 (Not Found) 0.0.0.0/:21
GET http://0.0.0.0:9001/ervices.js 404 (Not Found) 0.0.0.0/:22
GET http://0.0.0.0:9001/ontrollers.js 404 (Not Found) 0.0.0.0/:23
Uncaught ReferenceError: pg is not defined 

You'll notice the url's are cut off. I was able to track this down to the application.tmpl to find this:

<% if (env == 'development') {
     css.forEach(function(asset) {
       print('  <link rel="stylesheet" href="' + asset.substring(8) + '"/>\n');
     });
   } else if (env == 'production') {
     print('  <link rel="stylesheet" href="css/app.css" />');
   } %>

I had to fix the asset.substring(8) to be asset.substring(4) in src/html/layouts/application.tmpl in order to work. Maybe there's a better way to do this?

@calvinl
Copy link
Owner

calvinl commented Aug 15, 2014

Thanks for reporting this - definitely something to address. I'll file it and push a fix for it soon.

@calvinl calvinl added the bug label Aug 15, 2014
@calvinl calvinl self-assigned this Aug 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants