Skip to content

Commit

Permalink
1.9.0 (#99)
Browse files Browse the repository at this point in the history
* 1.4.0

* fix settings

* Add viewer in all generated options app (#84)

* add viewer in all the generated options

* install folder instead to copy

* how to update generator doc

* fix links

* copy try

* update to 1.5.0 (#85)

* update to 1.5.0

* remove increase size memory

* fix license header and images dist

* remove license header

* change package metadata

* 1.6.0 (#88)

* 1.6.2
correct version charts

* 1.6.2 (#90)

* 1.6.2

* tsconfig.dev.json

* 1.7.0 (#92)

* 1.8.0 (#94)

* 1.8.0 update

* fix app config service

* 10 elements in task service

* replace alpha version with final version in package.json

* Completely reworked generator (2.0.0) (#96)

* regenerate package lock

* rework generator from scratch

* documentation cleanup

* show description in blueprint selector

* blank adf ng-cli template

* acs template

* aps template

* modify choose project
creation 3 project mix cs ps
add test

* fix all

* code and template fixes

* 1.9.0 (#98)
  • Loading branch information
eromano authored Oct 9, 2017
1 parent 28f2120 commit 001a8fd
Show file tree
Hide file tree
Showing 302 changed files with 6,414 additions and 13,930 deletions.
11 changes: 4 additions & 7 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"jasmine": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 8
},
"globals": {
"System": true,
"__karma__": true
Expand Down Expand Up @@ -41,13 +44,7 @@
"single"
],
"keyword-spacing": 2,
"space-before-function-paren": [
2,
{
"anonymous": "always",
"named": "always"
}
],
"space-before-function-paren": ["error", "never"],
"space-in-parens": [
2,
"never"
Expand Down
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ script:
- npm run test-build-app-document-list
- npm run test-cp-app-process-service-test
- npm run test-build-app-process-service-test
- npm run test-cp-app-search-test
- npm run test-build-app-search-test
- npm run test-cross-browsers
after_success:
- npm run coveralls
Expand All @@ -32,5 +30,4 @@ cache:
- node_modules
- temp/all-options-test/node_modules
- temp/app-process-service-test/node_modules
- temp/app-search-test/node_modules
- temp/app-document-list-test/node_modules
90 changes: 17 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
<h1 align="center">Yeoman Generator ADF Angular Alfresco Application</h1>
<p align="center">
<img title="yeoman generator" src='assets/yeoman.png' alt='yeoman logo' />
</p>
<p align="center">
<a href="https://nodei.co/npm/generator-ng2-alfresco-app/">
<img src="http://img.shields.io/npm/v/generator-ng2-alfresco-app.svg" alt='npm version' >
</a>
<a title='Build Status' href="https://travis-ci.org/Alfresco/generator-ng2-alfresco-app">
<img src='https://travis-ci.org/Alfresco/generator-ng2-alfresco-app.svg?branch=master' alt='Build Status' />
</a>
<a href='https://codecov.io/gh/Alfresco/generator-ng2-alfresco-app'>
<img src='https://img.shields.io/codecov/c/github/Alfresco/generator-ng2-alfresco-app/master.svg?maxAge=2592000' alt='Coverage Status' />
</a>
<a alt='downloads stats' href='https://npmjs.org/package/generator-ng2-alfresco-app'>
<img src='https://img.shields.io/npm/dt/generator-ng2-alfresco-app.svg' alt='downloads stats' />
</a>
</p>

>Yeoman generator generating a ADF Angular Alfresco App scaffold
# ADF application generator for Yeoman

[![npm](https://img.shields.io/npm/v/generator-ng2-alfresco-app)](https://www.npmjs.com/package/generator-ng2-alfresco-app)
[![Build Status](https://travis-ci.org/Alfresco/generator-ng2-alfresco-app.svg?branch=master)](https://travis-ci.org/Alfresco/generator-ng2-alfresco-app)

> Yeoman generator generating a ADF Angular Alfresco App scaffold
## Introduction

Expand All @@ -42,7 +28,7 @@ Then the Alfresco Application Generator:
npm install -g generator-ng2-alfresco-app
```

## Generating a new application project:
## Generating a new application project

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

Expand All @@ -65,40 +51,18 @@ Alternatively you can use generator with install switch to trigger automatic ins
yo ng2-alfresco-app --install
```

## Update ADF generator-ng2-alfresco-app
## Updating generator

```sh
npm update -g generator-ng2-alfresco-app
```

## Optional utility commands
## Getting current version

* Show current version generator-ng2-alfresco-app installed

```sh
npm list --depth 1 --global generator-ng2-alfresco-app
```

* Link all ADF components locally

```sh
npm run link
```

* Clean the project

```sh
npm run clean
```

>`start` script also includes live reload and watchers for all the `.ts` files.
TypeScript watchers are also configured for `node_modules` folder within demo shell
and provide live reload for all the component libraries as well.

* Install dependencies or reinstall after the clean

```sh
npm install
yo ng2-alfresco-app --version
```

## Contributing to the generator
Expand All @@ -111,21 +75,22 @@ npm install
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 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:

```sh
npm test
```

To run the integration test of the generator:
### Extending the blueprints

```sh
npm run integrations-test
```
In order to add a new blueprint just put the project template to the `app/templates` folder.

those test run the generator and install the app with different options in the tempo folder, because of the download of the npm packages are quite slow
Requirements for new projects:

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

### Debugging generator

Expand All @@ -139,31 +104,10 @@ set DEBUG=yeoman:generator & yo ng2-alfresco-app

More on [debugging generators](http://yeoman.io/authoring/debugging.html).

## Advanced options

```sh
yo ng2-alfresco-app --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](https://github.com/Alfresco/generator-ng2-alfresco-app/releases).

## Contributors

| Contributor | GitHub profile | Twitter profile |
| --- | --- | ---
| Eugenio Romano | [Eugenio Romano](https://github.com/eromano) | [@RomanoEugenio](https://twitter.com/RomanoEugenio)
| Denys Vuika | [Denys Vuika](https://github.com/denisvuyka) | [@denisvuyka](https://twitter.com/denisvuyka) |
| Mario Romano | [Mario Romano](https://github.com/magemello) | [@MagemelloMario](https://twitter.com/MagemelloMario) |

[See all contributors](https://github.com/alfresco/generator-ng2-alfresco-app/graphs/contributors)

## License

[Apache Version 2.0](https://github.com/alfresco/generator-ng2-alfresco-app/blob/master/LICENSE)
186 changes: 186 additions & 0 deletions __tests__/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
'use strict';
const path = require('path');
const assert = require('yeoman-assert');
const helpers = require('yeoman-test');

describe('Alfresco component generator', () => {

describe('Content Service', () => {
beforeEach(() => {
return helpers.run(path.join(__dirname, '../app'))
.withPrompts({
name: 'adf-cli-acs-template',
blueprint: 'Content Service'
});
});

it('created and CD into a folder named like the generator', () => {
assert.equal(path.basename(process.cwd()), 'adf-cli-acs-template');
});

it('creates files', () => {
const expected = [
'.editorconfig',
'.angular-cli.json',
'.gitignore',
'.travis.yml',
'LICENSE',
'README.md',
'karma.conf.js',
'package.json',
'protractor-ci.conf.js',
'protractor.conf.js',
'proxy.conf.json',
'tsconfig.json',
'tslint.json',
'src/index.html',
'src/app/home/home.component.ts',
'src/app/home/home.component.css',
'src/app/home/home.component.html',
'src/app/home/home.component.spec.ts',
'src/app/documentlist/documentlist.component.spec.ts',
'src/app/documentlist/documentlist.component.html',
'src/app/documentlist/documentlist.component.css',
'src/app/documentlist/documentlist.component.ts',
'e2e/app.e2e-spec.ts'
];

assert.file(expected);
});

it('fills package.json with correct information', () => {
assert.JSONFileContent('package.json', { // eslint-disable-line new-cap
name: 'adf-cli-acs-template'
});
});

it('fills the README with project data', () => {
assert.fileContent('README.md', 'ADF/ACS Application with Angular CLI');
});

});

describe('Process Service', () => {
beforeEach(() => {
return helpers.run(path.join(__dirname, '../app'))
.withPrompts({
name: 'adf-cli-aps-template',
blueprint: 'Process Service'
});
});

it('created and CD into a folder named like the generator', () => {
assert.equal(path.basename(process.cwd()), 'adf-cli-aps-template');
});

it('creates files', () => {
const expected = [
'.editorconfig',
'.angular-cli.json',
'.gitignore',
'.travis.yml',
'LICENSE',
'README.md',
'karma.conf.js',
'package.json',
'protractor-ci.conf.js',
'protractor.conf.js',
'proxy.conf.json',
'tsconfig.json',
'tslint.json',
'src/index.html',
'src/app/home/home.component.ts',
'src/app/home/home.component.css',
'src/app/home/home.component.html',
'src/app/home/home.component.spec.ts',
'src/app/task-details/task-details.component.spec.ts',
'src/app/task-details/task-details.component.html',
'src/app/task-details/task-details.component.css',
'src/app/task-details/task-details.component.ts',
'src/app/tasks/tasks.component.spec.ts',
'src/app/tasks/tasks.component.html',
'src/app/tasks/tasks.component.css',
'src/app/tasks/tasks.component.ts',
'e2e/app.e2e-spec.ts'
];

assert.file(expected);
});

it('fills package.json with correct information', () => {
assert.JSONFileContent('package.json', { // eslint-disable-line new-cap
name: 'adf-cli-aps-template'
});
});

it('fills the README with project data', () => {
assert.fileContent('README.md', 'ADF/APS Application with Angular CLI');
});

});

describe('Process Service and Content Service', () => {
beforeEach(() => {
return helpers.run(path.join(__dirname, '../app'))
.withPrompts({
name: 'adf-cli-acs-aps-template',
blueprint: 'Process Service and Content Service'
});
});

it('created and CD into a folder named like the generator', () => {
assert.equal(path.basename(process.cwd()), 'adf-cli-acs-aps-template');
});

it('creates files', () => {
const expected = [
'.editorconfig',
'.angular-cli.json',
'.gitignore',
'.travis.yml',
'LICENSE',
'README.md',
'karma.conf.js',
'package.json',
'protractor-ci.conf.js',
'protractor.conf.js',
'proxy.conf.json',
'tsconfig.json',
'tslint.json',
'src/index.html',
'src/app/home/home.component.ts',
'src/app/home/home.component.css',
'src/app/home/home.component.html',
'src/app/home/home.component.spec.ts',
'src/app/task-details/task-details.component.spec.ts',
'src/app/task-details/task-details.component.html',
'src/app/task-details/task-details.component.css',
'src/app/task-details/task-details.component.ts',
'src/app/tasks/tasks.component.spec.ts',
'src/app/tasks/tasks.component.html',
'src/app/tasks/tasks.component.css',
'src/app/tasks/tasks.component.ts',
'src/app/documentlist/documentlist.component.spec.ts',
'src/app/documentlist/documentlist.component.html',
'src/app/documentlist/documentlist.component.css',
'src/app/documentlist/documentlist.component.ts',
'e2e/app.e2e-spec.ts'
];

assert.file(expected);
});

it('fills package.json with correct information', () => {
assert.JSONFileContent('package.json', { // eslint-disable-line new-cap
name: 'adf-cli-acs-aps-template'
});
});

it('fills the README with project data', () => {
assert.fileContent('README.md', 'ADF/APS/ACS Application with Angular CLI');
});

});


});
16 changes: 0 additions & 16 deletions app/alfresco-license-header.ts

This file was deleted.

Loading

0 comments on commit 001a8fd

Please sign in to comment.