Package Exports
- generator-ariatemplates
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (generator-ariatemplates) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
generator-ariatemplates

An Aria Templates generator for Yeoman.
Travis build status
Getting started
- Make sure you have yo installed:
npm install -g yo - Install the generator:
npm install -g generator-ariatemplates - Run:
yo ariatemplatesto create a very basic aria templates projectyo ariatemplates --wizardto chose which file you want to generate for you projectyo ariatemplates --helpfor help
SubGenerators
The generator-ariatemplates comes also with some subgenerator that you can use to generate single files.
yo ariatemplates:template MyTemplateto generate a templateyo ariatemplates:controller MyControllerto generate a module controlleryo ariatemplates:interface IMyInterfaceto generate an interface for a module controlleryo ariatemplates:csstemplate MyCssTemplateto generate a CSS templateyo ariatemplates:macro MyMacroto generate a macro libraryyo ariatemplates:bootstrap indexto generate the bootstrap file
Live Reload
After creating your project, you can also run the grunt server embedded in order to see your template generated and to start working on it, using the amazing live reload feature.
From your project folder type: 'grunt server'
The application will open a tab browser and it will show you your template. If you want to change something inside your template, or you want to add more stuff, just do it and have a look at the browser, your application it will be refreshed automatically without pressing F5.
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 files, but it also download the Aria Templates framework from bower, it downloads and installs all the dependecies and it creates other files like the grunt configuration file, to let you use the live reload feature during development, and other useful things like the package.json, the .gitignore, the bower.json, etc.
So let's have a look what the application generates.
Basic Mode
When you call the generator using yo ariatemplates the application generates the basic files to let you start a new project with Aria Templates.
So it creates this project structure:
- MyFolder
- aria
- bower_components
- myapp
- lib
- MyMacro.tml
- style
- MyTemplateStyle.tpl.css
- view
- MyTemplate.tpl
- MyTemplateScript.js
- IMyInterface.js
- MyController.js
- index.html
- lib
- node_modules
- Gruntfile.js
- bower.json
- package.json
Inside this structure you'll find your Aria Templates file inside the application name folder (in this example 'myapp'), the Aria Templates framework inside the aria folder, the bower's dependencies inside bower_components folder, and the Gruntfile at the root of the folder.
Wizard Mode
When you call the generator using yo ariatemplates --wizard the application gives you the possibility to choice which file inside the application name folder (in this example is myapp) you want to generate. So the project structure differs from the basic mode project structure only inside myapp folder, because you choose what to create, and it is the same for the other files and folders
Subgenerator Mode
When you use one of the six subgenerator you creates, inside the current folder, the specific file that the subgenerator can create.
For instance, when you do yo ariatemplates:controller MyController, the subgenerator creates a controller file inside the current folder.
You can also create multiple files in one single command, doing yo ariatemplates:controller MyFirstController MySecondController MyThirdController. This is particularly useful when you know that you'll need a lot of files, so you can generate them in one command.
Help
The Aria Templates generator provides also an help guide. Just type yo ariatemplates --help to consult it.
Support & 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.
