-
Notifications
You must be signed in to change notification settings - Fork 1.2k
grunt serve:dist not concated all of app.js #491
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
Comments
the same problem here. The vendor.js file is in the dist folder. Investigating. |
I even have an app.js file there too, but apparently without the files listed above in it. |
Hmm, are you guys running the latest version of the generator? |
How can we check? |
|
I see; in |
$ npm list -g | grep fullstack |
That is the current version. Does the issue occur with a freshly generated project? |
Yep. |
Odd, mind posting your |
{
"generator-angular-fullstack": {
"insertRoutes": true,
"registerRoutesFile": "server/routes.js",
"routesNeedle": "// Insert routes below",
"routesBase": "/api/",
"pluralizeRoutes": true,
"insertSockets": true,
"registerSocketsFile": "server/config/socketio.js",
"socketsNeedle": "// Insert sockets below",
"filters": {
"js": true,
"html": true,
"sass": true,
"uirouter": true,
"bootstrap": true,
"uibootstrap": true,
"mongoose": true
}
},
"generator-ng-component": {
"routeDirectory": "client/app/",
"directiveDirectory": "client/app/",
"filterDirectory": "client/app/",
"serviceDirectory": "client/app/",
"basePath": "client",
"filters": [
"uirouter"
],
"extensions": [
"js",
"html",
"scss"
],
"directiveSimpleTemplates": "",
"directiveComplexTemplates": "",
"filterTemplates": "",
"serviceTemplates": "",
"factoryTemplates": "",
"controllerTemplates": "",
"decoratorTemplates": "",
"providerTemplates": "",
"routeTemplates": ""
} |
In <!-- build:js({client}) app/vendor.js --> to: <!-- build:js(client) app/vendor.js --> No braces. |
Hey, |
Just noticed my something: cat dist/public/app/cf3a9943.app.js | wc -l
0 |
What version of the generator did you use to begin with? |
I am currently at work and started the project at home. I think it was the version right before you added grunt-build-control |
You can TRY to rebase on to a newer version of the generator. Then delete all the files and folders in that branch and regenerate the app with the same settings and commit the changes in the newbase branch. Then create another branch to test the rebase in: Then rebase test-rebase onto newbase: You may have to resolve conflict errors, |
Okay, that's a new concept in git for me, but I will try it out this evening. |
Sounds good. You can read up on git rebase here if you'd like to know more :) |
I knew rebasing in concept but rarely used it before :) okay the test-rebase branch seems to work so far... |
So if everything works you can just rebase |
Okay, the same problem came up again after I redid my changes and tried to prepare for deploying to heroku. I think I'm gonna try and restart it all with the newer generator from grounds up... |
Oh dang, the problem just came back totally randomly! Running "wait" task
>> Waiting for server reload...
Done waiting!
Running "open:server" (open) task
Running "express-keepalive" task
GET /app/account/account.js 404 29ms
GET /app/account/login/login.controller.js 404 12ms
GET /app/account/settings/settings.controller.js 404 11ms
GET /app/account/signup/signup.controller.js 404 8ms
GET /app/admin/admin.controller.js 404 7ms
GET /app/admin/admin.js 404 21ms
GET /app/main/main.controller.js 404 19ms
GET /app/main/main.js 404 19ms
GET /app/shop/geocode.service.js 404 17ms
GET /app/shop/new/new.controller.js 404 21ms
GET /app/shop/new/new.js 404 12ms
GET /app/shop/shop.controller.js 404 11ms
GET /app/shop/shop.js 404 14ms
GET /components/auth/user.service.js 404 15ms
GET /components/auth/auth.service.js 404 16ms
GET /components/mongoose-error/mongoose-error.directive.js 404 6ms
GET /components/navbar/navbar.controller.js 404 10ms
GET /api/shops 304 17ms Oh, and I am on version 2.0.12 now... |
Hmm it might be that scripts aren't getting injected on the dist build. This probably wont help, but it might be worth a try: Comment out injector from the jit-grunt in your gruntfile:
Then do Try building it again. |
Nope, that didn't work unfortunately. Didn't suspected that anyway as it worked a while ago... |
The strangest thing is, even if I clone the whole repository and immediatly check out the first commit (where the ´grunt serve:dist´ first worked) it doesn't work anymore... |
@Kageetai just wondering where you were on this? Any progress? |
Hi couldn't do much for it the last weeks but want to try more the next days. The problem still occurred and I don't know why. I will try to restart the project from the generator and not include running the Mongo server with grunt, although I don't really think that's the problem... |
Not sure if this is a related problem but my main.html view doesn't seem to be loaded on
but works just fine on
|
Any further progress on this? I'm having a similar issue and I can't seem to figure it out for the life of me. |
Unfortunately no progress on the problem, as I didn't have time to do something and are in vacation now. But will do more when I get back to it |
Hi there, I've encountered xactly the same problem here. I'm working on windows, and simply change the line ending to Unix style for "index.html" in my text editor (I'm using sublime text by the way) solve the problem. "Windows" line ending make the script bug it seems. Hope that will help. Meg4mi |
I was having this issue for a long time, and @Meg4mi's solution worked. Thanks a lot! In Webstorm, I opened index.html and then did File -> Line Separators -> LF (Unix style), then ran |
Oh wow!! |
Hey, that's awesome guys! I'm wondering if we should use the Also, github has a pretty decent write up on handling line endings in a project, if anybody would like some extra documentation: https://help.github.com/articles/dealing-with-line-endings/ |
I just stumbled upon that again in another project. Any progress on integrating that into the generator? |
@Kageetai .editorconfig and .jscsrc in canary validate line breaks |
+1 |
Hey @Meg4mi That's awesome ! |
Hi there,
I tried out your generator for a project and am generally very happy with it. But after working on it for a while and several commits to my project, I wanted to try out deploying to Heroku and ran
grunt serve:dist
but when the process ran through and the browser window opens I notice several 404s for all the apps script files. After looking into the generatedindex.html
indist
I saw that the said files don't seem to get put into the minifiedapp.js
like here:I generated a new project with the generator again and everything works fine. So I checkout out my very first commit in my project, where I just commited the unchanged code the yeoman generated. Still the same problem!
I even compared both projects file by file now and besides the names (and hashes of course) there are now differences in them at all!
Does anyone know about this problem and can help me out?
The text was updated successfully, but these errors were encountered: