Skip to content

Commit 59df130

Browse files
committed
feat(app): add yo and jhipster logic
1 parent 4991cea commit 59df130

File tree

3 files changed

+30
-43
lines changed

3 files changed

+30
-43
lines changed

README.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,50 @@
1+
<p align="center">
2+
<a href="https://github.com/compodoc/compodoc" target="_blank"><img src="https://avatars3.githubusercontent.com/u/23202313" alt="Compodoc: The missing documentation tool for your Angular application" width="226"></a>
3+
</p>
4+
15
# generator-jhipster-compodoc
2-
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]
3-
> JHipster module, JHipster module, additional compodoc support in your JHipster application
6+
[![NPM version][npm-image]][npm-url]
7+
[![Dependency Status][daviddm-image]][daviddm-url]
8+
> JHipster module, additional [compodoc](https://github.com/compodoc/compodoc) support in your JHipster application
9+
10+
<p align="center">
11+
<img src="https://raw.githubusercontent.com/groupe-sii/compodoc/master/screenshots/main-view.png" alt="Compodoc: The missing documentation tool for your Angular application">
12+
</p>
413

514
# Introduction
615

716
This is a [JHipster](http://jhipster.github.io/) module, that is meant to be used in a JHipster application.
817

918
# Prerequisites
1019

20+
This module requires Jhipster version greater than 3.0.0 in order to work.
21+
1122
As this is a [JHipster](http://jhipster.github.io/) module, we expect you have JHipster and its related tools already installed:
1223

1324
- [Installing JHipster](https://jhipster.github.io/installation.html)
1425

1526
# Installation
1627

17-
To install this module:
28+
To install this module :
1829

1930
```bash
2031
npm install -g generator-jhipster-compodoc
2132
```
2233

23-
To update this module:
34+
# Usage
35+
36+
Run the module on your JHipster generated application :
37+
2438
```bash
25-
npm update -g generator-jhipster-compodoc
39+
yo jhipster-compodoc
2640
```
2741

28-
# Usage
42+
Due to a limitation of yeoman about file override, you will have to accept the overwrite question.
43+
44+
```bash
45+
conflict package.json
46+
? Overwirte package.json? (Ynaxdh)
47+
```
2948

3049
# License
3150

generators/app/index.js

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,45 +25,13 @@ module.exports = yeoman.Base.extend({
2525
},
2626
displayLogo: function () {
2727
// Have Yeoman greet the user.
28-
this.log('Welcome to the ' + chalk.red('JHipster compodoc') + ' generator! ' + chalk.yellow('v' + packagejs.version + '\n'));
28+
this.log('Welcome to the JHipster compodoc generator! ' + chalk.blue('v' + packagejs.version + '\n'));
2929
}
3030
},
3131

32-
prompting: function () {
33-
var done = this.async();
34-
35-
var prompts = [{
36-
type: 'input',
37-
name: 'message',
38-
message: 'Please put something',
39-
default: 'hello world!'
40-
}];
41-
42-
this.prompt(prompts, function (props) {
43-
this.props = props;
44-
// To access props later use this.props.someOption;
45-
46-
done();
47-
}.bind(this));
48-
},
49-
5032
writing: {
5133
writeTemplates : function () {
52-
this.baseName = jhipsterVar.baseName;
53-
this.packageName = jhipsterVar.packageName;
54-
this.angularAppName = jhipsterVar.angularAppName;
55-
var javaDir = jhipsterVar.javaDir;
56-
var resourceDir = jhipsterVar.resourceDir;
57-
var webappDir = jhipsterVar.webappDir;
58-
59-
this.message = this.props.message;
60-
61-
this.log('baseName=' + this.baseName);
62-
this.log('packageName=' + this.packageName);
63-
this.log('angularAppName=' + this.angularAppName);
64-
this.log('message=' + this.message);
65-
66-
this.template('dummy.txt', 'dummy.txt', this, {});
34+
jhipsterFunc.addNpmDevDependency('compodoc', '0.0.26');
6735
},
6836

6937
registering: function () {
@@ -76,10 +44,10 @@ module.exports = yeoman.Base.extend({
7644
},
7745

7846
install: function () {
79-
this.installDependencies();
47+
this.npmInstall();
8048
},
8149

8250
end: function () {
83-
this.log('End of compodoc generator');
51+
this.log('End of JHipster compodoc generator');
8452
}
8553
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"yeoman-generator": "0.22.4",
2626
"chalk": "1.1.1",
2727
"mkdirp": "0.5.1",
28-
"generator-jhipster": ">2.26.0"
28+
"generator-jhipster": "^3.0.0"
2929
},
3030
"devDependencies": {
3131
"fs-extra": "0.26.4",

0 commit comments

Comments
 (0)