Giter Club home page Giter Club logo

generator-angm's Issues

Can update dependences versions?

When I used this on newest version OS X. It always tried to use phantomjs 1.9. But this version of phantomjs can not be executed on the newest version OS X.

third party component dependency injection issue

Hi @newaeonweb ,

I would like to know how can I inject 3rd party dependencies into my app? For eg. let's say I am using https://github.com/daniel-nagy/md-data-table
Now if I inject the dependency 'md.data.table' in my app.js, and if I create a new module by yo angm:angm-module, the 3rd party dependency 'md.data.table' that I injected previously is removed. I noticed the src code updateAppFile function, it gets the modules from the config & when I add a 3rd party bower component, it is niether added in the .yo-rc.json file nor does it exists in the _app.js file & hence I understand why the dependency gets removed when I add a new module.

So is app.js the wrong place to inject 3rd party dependencies ? What's the correct approach ?

I guess there should be an object array named dependencies in the .yo-rc.json which should be updated when I add/remove a bower component into my app & when app.js gets overwritten it should consider _app.js + modules (in .yo-rc.json file) + dependencies (in .yo-rc.json file)
Do I need to change the source file to support this or is there some another approach to achieve this?

Please advice. Thanks in advance.

Gruntfile suggestion

Hi,

First of all, great generator. It's very simple and effective.

I started a simple project including angular-plotly library which depends on plotly. Using bower install angular-plotly --save works ok and grunt dev works as expected. However if I do a grunt build it fails with the following error:

Running "concat:build" (concat) task
Warning: Unable to read "app/assets/libs/plotly.js" file (Error code: EISDIR). Used --force, continuing.

The concat task was failing because it treated "plotly.js" as a file a not a folder the correction is easy, just add filter: 'isFile' to Gruntfile.js:

            build: {
                src: [
                    // Angular Project Dependencies,
                    'app/assets/libs/angular/angular.js',
                    'app/assets/libs/{,**/}*.js'
                ],
                filter: 'isFile',
                dest: 'app/assets/js/<%= pkg.name %>-angularbundle.js'
            }

In the future I suggest it should be included by default in the generator.

grunt build results in broken app

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?

angm-directive and external assets folder

Hi!

First of all, thank you for this generator, it's pure awesomeness. I have learnt a lot about angular using it.

I have a question regarding directives and the assets folder. It's great that I can put all the assets needed for a directive within its own folder, because it's easier to maintain and distribute. But I have no idea how to get the URL for those assets.

I have a directive folder, with a controller, template and test, plus the assets folder. I have a big SVG file that goes with mu directive (basically the whole directive depends on that SVG). I was wondering how to embed it, what the URL to the SVG would be. And in case I add CSS/JS to the directive, how could I include it in the page when the directive is used?

What would happen if I have several instances of the directive? (not planning to, but I am curious).

Thanks!!!

Especificar pasta ao criar modulo

Parabéns pela sua iniciativa, tem ajudado muito.

Existe alguma forma de informar uma pasta ao criar novo modulo ?

Algo como:
yo angm:angm-module /Minhapasta/NomedoModulo

Ficando:
app
|__modules
|__minhapasta
|__modulocriado

SubGenerator calls new Application

When adding a new module with the SubGenerator example:

yo angm:angm-module

It loads the generator's default prompt to create a new application:

     _-----_
    |       |
    |--(o)--|   .--------------------------.
   `---------´  |    Welcome to Yeoman,    |
    ( _´U`_ )   |   ladies and gentlemen!  |
    /___A___\   '__________________________'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `


You're using the official Angm-generator.
[?] What would you like to call your application? (Angmodular) 

missing ','

A comma is missing in the bower.json file after "angular-bootstrap": "~0.14.3" .

Errors in jshint

Linting Gruntfile.js ...ERROR
Running "jshint:gruntfile" (jshint) task
Linting Gruntfile.js ...ERROR
[L4:C15] W109: Strings must use singlequote.
"use strict";
Linting Gruntfile.js ...ERROR
[L119:C1] W099: Mixed spaces and tabs.
'app/app.config.js',
Linting Gruntfile.js ...ERROR
[L119:C19] W015: Expected 'app/app.config.js' to have an indentation at 13 instead at 19.
'app/app.config.js',
Linting Gruntfile.js ...ERROR
[L162:C29] W109: Strings must use singlequote.
grunt.registerTask("build", [
Linting Gruntfile.js ...ERROR
[L163:C13] W109: Strings must use singlequote.
"jshint",
Linting Gruntfile.js ...ERROR
[L164:C11] W109: Strings must use singlequote.
"exec",
Linting Gruntfile.js ...ERROR
[L165:C13] W109: Strings must use singlequote.
"concat",
Linting Gruntfile.js ...ERROR
[L166:C18] W109: Strings must use singlequote.
"ngtemplates",
Linting Gruntfile.js ...ERROR
[L167:C26] W109: Strings must use singlequote.
"injector:production",
Linting Gruntfile.js ...ERROR
[L168:C17] W109: Strings must use singlequote.
"concurrent",
Linting Gruntfile.js ...ERROR
[L169:C12] W109: Strings must use singlequote.
"clean"

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

Running "jshint:app" (jshint) task
Linting app/modules/home/homeCtrl.js ...ERROR
[L24:C16] W003: 'Home' was used before it was defined.
function Home(homeService) {
Linting app/modules/home/homeCtrl.js ...ERROR
[L27:C36] W109: Strings must use singlequote.
vm.title = "Hello, alpha-bank!";
Linting app/modules/home/homeCtrl.js ...ERROR
[L28:C25] W109: Strings must use singlequote.
vm.version = "1.0.0";
Linting app/modules/home/homeModule.js ...ERROR
[L1:C10] W013: Missing space after 'function'.
(function() {
Linting app/modules/home/homeModule.js ...ERROR
[L12:C5] W015: Expected 'angular' to have an indentation at 3 instead at 5.
angular.module('home', []);
Linting app/modules/home/homeService.js ...ERROR
[L17:C23] W003: 'homeService' was used before it was defined.
function homeService($http) {
Linting app/modules/home/homeService.js ...ERROR
[L20:C17] W109: Strings must use singlequote.
{"feature": "Implemented Best Practices, following: John Papa's Guide"},
Linting app/modules/home/homeService.js ...ERROR
[L20:C77] W109: Strings must use singlequote.
{"feature": "Implemented Best Practices, following: John Papa's Guide"},
Linting app/modules/home/homeService.js ...ERROR
[L21:C17] W109: Strings must use singlequote.
{"feature": "Using Controller AS syntax"},
Linting app/modules/home/homeService.js ...ERROR
[L21:C47] W109: Strings must use singlequote.
{"feature": "Using Controller AS syntax"},
Linting app/modules/home/homeService.js ...ERROR
[L22:C17] W109: Strings must use singlequote.
{"feature": "Wrap Angular components in an Immediately Invoked Function Expression (IIFE)"},
Linting app/modules/home/homeService.js ...ERROR
[L22:C97] W109: Strings must use singlequote.
{"feature": "Wrap Angular components in an Immediately Invoked Function Expression (IIFE)"},
Linting app/modules/home/homeService.js ...ERROR
[L23:C17] W109: Strings must use singlequote.
{"feature": "Declare modules without a variable using the setter syntax"},
Linting app/modules/home/homeService.js ...ERROR
[L23:C79] W109: Strings must use singlequote.
{"feature": "Declare modules without a variable using the setter syntax"},
Linting app/modules/home/homeService.js ...ERROR
[L24:C17] W109: Strings must use singlequote.
{"feature": "Using named functions"},
Linting app/modules/home/homeService.js ...ERROR
[L24:C42] W109: Strings must use singlequote.
{"feature": "Using named functions"},
Linting app/modules/home/homeService.js ...ERROR
[L25:C17] W109: Strings must use singlequote.
{"feature": "Including Unit test with Karma"},
Linting app/modules/home/homeService.js ...ERROR
[L25:C51] W109: Strings must use singlequote.
{"feature": "Including Unit test with Karma"},
Linting app/modules/home/homeService.js ...ERROR
[L26:C17] W109: Strings must use singlequote.
{"feature": "Including UI options for Bootstrap or Angular-Material"},
Linting app/modules/home/homeService.js ...ERROR
[L26:C75] W109: Strings must use singlequote.
{"feature": "Including UI options for Bootstrap or Angular-Material"},
Linting app/modules/home/homeService.js ...ERROR
[L27:C17] W109: Strings must use singlequote.
{"feature": "Including Angular-Material-Icons for Angular-Material UI"},
Linting app/modules/home/homeService.js ...ERROR
[L27:C77] W109: Strings must use singlequote.
{"feature": "Including Angular-Material-Icons for Angular-Material UI"},
Linting app/modules/home/homeService.js ...ERROR
[L28:C17] W109: Strings must use singlequote.
{"feature": "Dynamic Menu generator for both themes"},
Linting app/modules/home/homeService.js ...ERROR
[L28:C59] W109: Strings must use singlequote.
{"feature": "Dynamic Menu generator for both themes"},
Linting app/modules/home/homeService.js ...ERROR
[L29:C17] W109: Strings must use singlequote.
{"feature": "Grunt task for Production and Development"}
Linting app/modules/home/homeService.js ...ERROR
[L29:C62] W109: Strings must use singlequote.
{"feature": "Grunt task for Production and Development"}
Linting app/modules/home/homeService.js ...ERROR
[L36:C5] W026: Inner functions should be listed at the top of the outer function.
function getFeaturesList() {
Linting app/modules/home/homeService.js ...ERROR
[L36:C29] W003: 'getFeaturesList' was used before it was defined.
function getFeaturesList() {
Linting app/modules/home/homeService.js ...ERROR
[L37:C18] W033: Missing semicolon.
return list
Linting app/modules/layouts/nav-bar/navBarCtrl.js ...ERROR
[L24:C18] W003: 'NavBar' was used before it was defined.
function NavBar(homeService, MenuService) {
Linting app/modules/layouts/nav-bar/navBarCtrl.js ...ERROR
[L27:C28] W109: Strings must use singlequote.
vm.title = "alpha-bank";
Linting app/modules/layouts/nav-bar/navbarDirective.js ...ERROR
[L16:C18] W003: 'navBar' was used before it was defined.
function navBar() {
Linting app/modules/layouts/nav-bar/navbarDirective.js ...ERROR
[L32:C5] W026: Inner functions should be listed at the top of the outer function.
function link(scope, element, attrs, $location) {
Linting app/modules/layouts/nav-bar/navbarDirective.js ...ERROR
[L32:C18] W003: 'link' was used before it was defined.
function link(scope, element, attrs, $location) {
Linting app/modules/layouts/nav-bar/navbarDirective.js ...ERROR
[L44:C21] W003: 'control' was used before it was defined.
function control($scope, $location) {
Linting app/modules/layouts/nav-bar/navbarService.js ...ERROR
[L22:C16] W003: 'Menu' was used before it was defined.
function Menu($http) {
Linting app/modules/layouts/nav-bar/navbarService.js ...ERROR
[L36:C6] W033: Missing semicolon.
}

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.