1.9.0 • Published 7 years ago

generator-ng2-alfresco-component v1.9.0

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

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 Component Generator

First, install Yeoman:

npm install -g yo

Then the Alfresco Component Generator:

npm install -g generator-ng2-alfresco-component

Generating a new component project

First, move into the folder where you want create your component.

yo ng2-alfresco-component

alfresco generator

Which will generate project structure similar to the following:

├── assets/
│   └── license_header.txt
├── demo/
│   ├── src/
│   │   └── main.ts
│   ├── .editorconfig
│   ├── .gitignore
│   ├── index.html
│   ├── package.json
│   ├── README.md
│   ├── systemjs.config.js
│   ├── tsconfig.json
│   ├── tslint.json
│   └── typings.json
├── src/
│   ├── my-element.component.spec.ts
│   └── my-element.component.ts
├── .editorconfig
├── .gitignore
├── gulpfile.ts
├── index.ts
├── karma-test-shim.js
├── karma.conf.js
├── LICENSE
├── package.json
├── README.md
├── tsconfig.json
├── tslint.json
└── typings.json

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

npm install
npm run build

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

yo ng2-alfresco-component --install

Optinally you can use npm run link script to locally link ADF libraries if necessary.

npm scripts

CommandDescription
npm run buildcompiles component
npm run build:wcompiles component, watches for changes and recompiles if needed
npm run testcompiles, runs and watches the karma unit tests (console version)
npm run test-browsercompiles, runs and watches the karma unit tests (browser version)
num run coverageruns unit tests, generates and opens code coverage report in browser
npm run linkLink ADF components locally by means of npm link
npm run build.umdBuild the UMD bundle package

Running demo

If you have answered Yes for the generator question Do you want a demo project to be generated? you will get an additional demo project in the demo folder.

You will need installing npm dependencies for the generated demo project separately:

cd demonpm run test
npm install
npm run start

Optinally you can use npm run link script to locally link ADF libraries if necessary.

Contributing to the generator

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Make some changes
  4. Commit your changes: git commit -m 'Add some feature'
  5. Push to the branch: git push origin my-new-feature
  6. 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 run:

npm run test

Debugging generator

# OS X / Linux
DEBUG=yeoman:generator yo ng2-alfresco-component

# Windows
set DEBUG=yeoman:generator & yo ng2-alfresco-component

More on debugging generators.

Advanced options

yo ng2-alfresco-component --alfresco

Typically used for internal purposes and adds the following extras to the generated project structure:

  • adds Alfresco license headers to all code files
  • configures component package.json with additional license checker configurations (devDependencies, scripts, etc.)

History

For detailed changelog, see Releases.

Contributors

ContributorGitHub profileTwitter profile
Eugenio RomanoEugenio Romano@RomanoEugenio
Denys VuikaDenys Vuika@denisvuyka
Mario RomanoMario Romano@MagemelloMario

See all contributors

License

Apache Version 2.0

1.9.0

7 years ago

1.8.0

7 years ago

1.7.0

7 years ago

1.6.1

7 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

0.5.0

7 years ago

0.4.0

7 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.0.26

8 years ago

0.0.25

8 years ago

0.0.24

8 years ago

0.0.23

8 years ago

0.0.22

8 years ago