A Yeoman generator for Aria Templates

The fastest way to start your Aria Templates project in a couple of minutes, with a live demo.

View Project on Github

Gettin Started

  • Before starting with the Aria Templates generator, make sure you have yo installed:
    • npm install -g yo

  • Then you can start installing the generator:
    • npm install -g generator-ariatemplates

  • And actually run it:
    • yo ariatemplates

That's it!!

The generator will create all the files needed for your project, including the Aria Templates framework and resolving all the dependencies automatically.

To have a look at what the generator creates, type, from the project folder, grunt server. It will open a new tab inside your browser and display the Hello World template.

If you are able to see the Hello World message, you are ready to start working on your project!

It is possible to call the generator using some specific arguments, in order to customize the project's files that will be created.

Let's have a look to the options:

using the generator in 'wizard mode' you'll be able to chose which file you want to generate for your project
to skip the automatic execution of bower and npm after scaffolding is finished
well, to display the integrated help

You can even call just a subgenerator in order to create only a specific subset of files. For more info please have a look to the section SubGeneretor Mode.

What does it generate?

As explained before, there are 3 possible ways to call the generator:

  • calling it in basic mode
  • calling it in wizard mode
  • calling a SubGenerator

The generator does different things, it generates the Aria Templates project files, of course, but it also fetch the Aria Templates framework from bower and install it, resolving all the dependencies too. It also generates other files, such as, the grunt configuration file, to let you launch the live demo of your project, the package.json, the .gitignore, the bower.json, etc.

Let's have a look at what it generates.

Basic Mode

When you call the generator using yo ariatemplates the application generates the basic file to let you start a new Aria Templates project with this structure:

Inside this structure you'll find your Aria Templates files inside the application name folder (in this example 'myapp'), the Aria Templates framework inside the ariatemplates folder and the Gruntfile.js, package.json, bower.json and index.html at the root.

Wizard Mode

When you call the generator using yo ariatemplates --wizard the application gives you the possibility to customize your project and choice which files generate inside the application name folder ('myapp'). So the project structure differs from the basic mode project structure only inside myapp folder and it will remain the same for the other files.

SubGenerator Mode

The generator comes with 7 SubGenerators that let you create a certain type of Aria Templates such as templates, template scripts, module controller, etc.

yo ariatemplates:template MyTemplate
to generate one or more templates
yo ariatemplates:templatescript MyTemplateScript
to generate one or more template scripts
yo ariatemplates:csstemplate MyTemplateStyle
to generate one or more CSS templates
yo ariatemplates:controller MyController
to generate one or more module controllers
yo ariatemplates:interface IMyInterface
to generate one or more interfaces
yo ariatemplates:macro MyMacro
to generate one or more macro libraries
yo ariatemplates:bootstrap index
to generate the bootstrap file

When you use one of the seven subgenerators the application creates only the file specified in the command typed. You can create more files passing name files separated by space.

A cool feature: Live Reload

Creating your AT project using the generatior gives you the possibility to have a live demo of your project and add also a cool feature, very useful during development, the live reload.

The Live Reload shows all the changes that you make on your files directely inside the browser without asking you to press F5 refreshing automatically the content. It is very helpful, especially when you develop with 2 screens.

To launch the live demo type: grunt server.

Change something inside the template and check your browser.

Supporting & Contributing

Visit our forum to ask questions. If you spotted some problems, please open an issue or ideally, a pull request with the fix and a test.

If you feel to contribute please read the Aria Templates guidelines for contributing and try to follow and apply them also to this project.