nbarithel / generator-ng2-alfresco-app

Yeoman Generator Angular 2 Alfresco Application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ADF application generator for Yeoman

npm Build Status

Yeoman generator generating a ADF Angular Alfresco App scaffold

Introduction

See the following page for an introduction to the Alfresco Application Development Framework.

Prerequisites

Before you start using this development framework and the generator, make sure you have installed all required software and done all the necessary configuration, see this page.

Installing Yeoman and the App Generator

First, install Yeoman:

npm install -g yo

Then the Alfresco Application Generator:

npm install -g generator-alfresco-adf-app

Generating a new application project

First, move in the folder where you want create your project.

yo alfresco-adf-app

You will need to run the following scripts in the generated folder:

npm install
npm start

Commands above install all project dependencies, start the project and watch for changes.

Alternatively you can use generator with install switch to trigger automatic installation of dependencies via npm install script:

yo alfresco-adf-app --install

Using from the command line

You can use the generator in the unattended mode by providing all necessary options from the command line:

yo ng2-alfresco-app -n app2 -b adf-cli-aps-template -i

Options:

Name Alias Type Description
--name=<value> -n <value> string Application name
--blueprint=<value> -b <value> string Blueprint name
--install -i boolean Install dependencies upon generation

Default blueprint names:

  • adf-cli-acs-aps-template
  • adf-cli-acs-template
  • adf-cli-aps-template

Updating generator

npm update -g generator-alfresco-adf-app

Getting current version

  • Show current version generator-alfresco-adf-app installed
yo alfresco-adf-app --version

Contributing to the generator

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Make some changes
  4. Add the changes to the index: git add .
  5. Commit your changes: git commit -m 'Add some feature'
  6. Push to the branch: git push origin my-new-feature
  7. Submit a pull request

To Contribute to the existing code base, add test cases to cover the new behaviour, and make sure all the existing tests are still green.

To test the generator:

npm test

Extending the blueprints

In order to add a new blueprint just put the project template to the app/templates folder.

Requirements for new projects:

  • must contain package.json file
  • the package.json file must contain at least name and version attributes

Debugging generator

# OS X / Linux
DEBUG=yeoman:generator yo alfresco-adf-app

# Windows
set DEBUG=yeoman:generator & yo alfresco-adf-app

More on debugging generators.

History

For detailed changelog, see Releases.

License

Apache Version 2.0

About

Yeoman Generator Angular 2 Alfresco Application

License:Apache License 2.0


Languages

Language:TypeScript 59.7%Language:HTML 19.2%Language:JavaScript 14.6%Language:Shell 3.6%Language:CSS 2.7%Language:Dockerfile 0.2%