README
ng-front
Front-end web application scaffolder based on Yeoman and AngularJS.
Usage
Install yo
and bower
:
npm install -g yo bower
Make a new directory, and cd
into it:
mkdir my-new-project && cd $_
Run yo ng-front
:
yo ng-front
Answer the prompts, wait for the generator to do it's work, then you are good to go!
Also, the address for the remote resources must be set manually in generated-project-foldeer/app/app.config.js, but it will be included in the prompting anytime soon.
Generators
Available generators:
App
Sets up a new AngularJS app, including Bootstrap, ng-sanitize, ng-translate, ng-animate, etc. Includes tests with grunt-karma tasks.
Example:
yo ng-front
The generator shall then prompt you for the project's name and version.
When the generation process is done, you can preview the application using:
grunt preview
This grunt task will open the application in your default browser.
To run tests for the newly generated application, use:
grunt test:shared
Crud
Generates a new module in the application, meant to execute CRUD operations in a entity from a remote resource. Includes tests with grunt-karma tasks.
Example:
yo ng-front:crud mymodule
Where "mymodule" is the name of the new module. The generator shall then prompt you for the entity's name and attributes, and also for the remote resource's name.
It must be noted that further CORS related setup may be necessary after the generation process, according to your API's characteristics.
When the generation process is done, you may test the newly created module with:
grunt test:mymodule
Where "mymodule" is the name of the new module.
Testing
Running npm test
will run the unit tests with Mocha.
Contribute
For now there are still pending tasks that I mean to complete myself, so contributing is welcome, but not quite recommended right now.
If you want to know more about such tasks, and want to pick one for yourself, simply contact me.