I've been looking for some automatic way to generate an angular app. I tried to use the angular generator on YEOMAN, but I didn't like the app structure provided.

I found out this other generator angular-feature(https://github.com/codigo-pl/generator-angular-feature) which seems to solve my problem. But so far I could not make it works. Every time when I try to generate the app(on feature structure) returns me an error:

command: grunt build (even if I try grunt server returns me the same)

C:\Users\xxxxxx\WorkFolders\temp\testGenerator>grunt build Loading "cdnify.js" tasks...ERROR

Error: Unable to parse C:\Users\xxxxxx\WorkFolders\temp\testGenerator .bowerrc: Unexpected token v Warning: Task "cdnify" not found. Use --force to continue.

Aborted due to warnings.

UPDATE:

Inside the file .bowerrc:

{
    "directory": "app\vendor/bower_components"
}

My folder after running generator:

testGenerator
--app
----src
------common
--node_modules

There's no bower_components folder in any place in my APP folder.

Has anyone already used this YEOMAN generator and had the same problem? Is there another YEOMAN generator structured by feature like this one?

有帮助吗?

解决方案 2

the problem was sorted out and it was facing me all the time.

Problem

{
    "directory": "app\vendor/bower_components"
}

Solution

{
    "directory": "app/vendor/bower_components"
}

The generator is generating backslash instead slash. But the strange thing it seems be happening only on windows. Ubuntu and Mavericks I don't have this problem.

其他提示

Try this command in your project to fix the issue.

npm install --save-dev grunt-google-cdn

I am really not sure why this isn't documented officially anywhere nor why the default Yeoman project generation script builds with errors. I had to execute searches to find out about this command.

Also, make sure you are using a stable version of Node/npm. One of my problems was that I was using the latest version of npm, which is 0.11.12. However, according to Node.js's website, that version is unstable. Instead, I had to use version 0.10.26, their latest stable version.

Links:

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top