newaeonweb / generator-angm

AngularJS Yeoman Generator to help you getting started with a new project based on AngularJS and Angular Material to build large scale applications.
72 stars 24 forks source link

grunt build results in broken app #6

Closed davidcushing closed 8 years ago

davidcushing commented 8 years ago

Hi Just beginning to explore the opportunities your project might offer. I am struggling a little to understand how to use it properly, as I can't see how to build some assets that could be included as part of a project. If I use "grunt build" as you say to, then grunt starts a local server and seemingly lints and concats things. However - I don't understand why a local server is started, and the page it displays doesn't work... it's blank. Looking in the console, I can see that "angular is not defined" and it seems that looking at the resources, nothing in the way of bower components is being included! Can you help?

alborghetti commented 8 years ago

I had a similar issue, it was because I was missing bower-installer. running npm install -g bower-installerfixed the issue.

Hope this help.

davidcushing commented 8 years ago

Hi I tried this but unfortunately it hasn't helped. The output is below. I would expect:

david@exwun:~/Applications/NoNav/angm$ grunt build
Running "jshint:gruntfile" (jshint) task
>> 1 file lint free.

Running "jshint:app" (jshint) task
Linting app/modules/layouts/nav-bar/navBarService.js ...ERROR
[L12:C1] W099: Mixed spaces and tabs.
    angular
Linting app/modules/layouts/nav-bar/navBarService.js ...ERROR
[L29:C1] W099: Mixed spaces and tabs.
        ];
Linting app/modules/layouts/nav-bar/navBarService.js ...ERROR
[L35:C1] W099: Mixed spaces and tabs.
        }
Linting app/modules/layouts/nav-bar/navBarService.js ...ERROR
[L35:C16] W033: Missing semicolon.
        } 
Linting app/modules/layouts/side-nav/sidenavService.js ...ERROR
[L12:C1] W099: Mixed spaces and tabs.
    angular
Linting app/modules/layouts/side-nav/sidenavService.js ...ERROR
[L29:C1] W099: Mixed spaces and tabs.
        ];
Linting app/modules/layouts/side-nav/sidenavService.js ...ERROR
[L35:C1] W099: Mixed spaces and tabs.
        }
Linting app/modules/layouts/side-nav/sidenavService.js ...ERROR
[L35:C16] W033: Missing semicolon.
        } 
Linting app/modules/locations/locationsCtrl.js ...ERROR
[L12:C1] W099: Mixed spaces and tabs.
    angular
Linting app/modules/locations/locationsModule.js ...ERROR
[L12:C1] W099: Mixed spaces and tabs.
    angular.module('locations', []);
Linting app/modules/locations/locationsService.js ...ERROR
[L12:C1] W099: Mixed spaces and tabs.
    angular

Warning: Task "jshint:app" failed. Used --force, continuing.

Running "exec:bowerInstaller" (exec) task
Setting up install paths...Finished
Running bower install...Finished
Installing: 
    angular-aria : /home/david/Applications/NoNav/angm/app/assets/libs/angular-aria/angular-aria.js
    angular-material-icons : /home/david/Applications/NoNav/angm/app/assets/css/angular-material-icons/angular-material-icons.css
    angular-cookies : /home/david/Applications/NoNav/angm/app/assets/libs/angular-cookies/angular-cookies.js
    angular-messages : /home/david/Applications/NoNav/angm/app/assets/libs/angular-messages/angular-messages.js
    angular-sanitize : /home/david/Applications/NoNav/angm/app/assets/libs/angular-sanitize/angular-sanitize.js
    angular-resource : /home/david/Applications/NoNav/angm/app/assets/libs/angular-resource/angular-resource.js
    angular-mocks : /home/david/Applications/NoNav/angm/app/assets/libs/angular-mocks/angular-mocks.js
    es5-shim : /home/david/Applications/NoNav/angm/app/assets/libs/es5-shim/es5-shim.js
    json3 : /home/david/Applications/NoNav/angm/app/assets/libs/json3/json3.min.js
    angular-animate : /home/david/Applications/NoNav/angm/app/assets/libs/angular-animate/angular-animate.js
    angular-material-icons : /home/david/Applications/NoNav/angm/app/assets/libs/angular-material-icons/angular-material-icons.min.js
    angular-ui-router : /home/david/Applications/NoNav/angm/app/assets/libs/angular-ui-router/angular-ui-router.js
    angular-material : /home/david/Applications/NoNav/angm/app/assets/css/angular-material/angular-material.css
    angular-material : /home/david/Applications/NoNav/angm/app/assets/libs/angular-material/angular-material.js
    angular : /home/david/Applications/NoNav/angm/app/assets/libs/angular/angular.js
Success

Running "concat:base" (concat) task
File "app/assets/js/w3gcam-appbundle.js" created.

Running "concat:build" (concat) task
File "app/assets/js/w3gcam-angularbundle.js" created.

Running "ngtemplates:app" (ngtemplates) task
File app/assets/js/templates.js created.

Running "injector:production" (injector) task
Missing option `template`, using `dest` as template instead
Injecting css files (2 files)
Injecting js files (3 files)

Running "concurrent:tasks" (concurrent) task
Running "connect:server" (connect) task
Waiting forever...
Running "watch" task
Started connect web server on 127.0.0.1:4000.
    Warning:  Used --force, continuing.

    [D] server GET / 200 7450 - 15 ms
[D] server GET /app/assets/css/angular-material-icons/angular-material-icons.css 200 3513 - 6 ms
[D] server GET /app/assets/js/templates.js 200 17379 - 3 ms
[D] server GET /app/assets/js/w3gcam-appbundle.js 200 11888 - 3 ms
[D] server GET /app/assets/css/angular-material/angular-material.css 200 686320 - 14 ms
[D] server GET /app/assets/js/w3gcam-angularbundle.js 200 2800039 - 16 ms
[D] server GET /app/assets/images/favicon.ico 404 - - 2 ms
newaeonweb commented 8 years ago

@davidcushing Maybe in the future we will implement a dest folder for compiled files. Now we are planning in using Docker and NPM for building task instead of Grunt. We fixed the lint errors on version 1.0.7.