Skip to content

Commit

Permalink
Added automated CHANGELOG template to universal templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenouw committed Jul 16, 2019
1 parent 501cd36 commit af43f6a
Show file tree
Hide file tree
Showing 15 changed files with 295 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ lib/
# Other
package-lock.json
docs/
.nyc_output
.nyc_output
demo/
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ tsconfig.json
tslint.json
community-score.png
docs/
demo/
lib/**/*.spec.js
lib/**/**.d.ts
*.gif
210 changes: 210 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
# Changelog
__Commit:__ [501cd36](501cd36):
__Message:__ Updated showCreate and showUpdate methods with filePath of current project instead of systemPath
__Author:__ Jeroen Ouwehand on 2019-07-08 15:54

__Commit:__ [a203816](a203816):
__Message:__ Added types to tsconfig
__Author:__ Jeroen Ouwehand on 2019-07-08 15:53

__Commit:__ [1169712](1169712):
__Message:__ Removed todo and readme from all file generating
__Author:__ Jeroen Ouwehand on 2019-07-08 15:53

__Commit:__ [bc51320](bc51320):
__Message:__ 1.7.0
__Author:__ Jeroen Ouwehand on 2019-07-08 15:53

__Commit:__ [b29201a](b29201a):
__Message:__ Updated templates with FileName
__Author:__ Jeroen Ouwehand on 2019-06-26 20:09

__Commit:__ [2f39d8b](2f39d8b):
__Message:__ Added readme and todo files that can be generated
__Author:__ Jeroen Ouwehand on 2019-06-26 20:09

__Commit:__ [3092d9e](3092d9e):
__Message:__ Remove GenerateFile interface
__Author:__ Jeroen Ouwehand on 2019-06-26 20:08

__Commit:__ [d05cf24](d05cf24):
__Message:__ 1.6.0
__Author:__ Jeroen Ouwehand on 2019-06-26 20:08

__Commit:__ [040d727](040d727):
__Message:__ Added FileName to keep names at one place
__Author:__ Jeroen Ouwehand on 2019-06-26 20:07

__Commit:__ [448d341](448d341):
__Message:__ Added license demo to readme
__Author:__ Jeroen Ouwehand on 2019-06-25 13:13

__Commit:__ [4b25631](4b25631):
__Message:__ Added demo in readme
__Author:__ Jeroen Ouwehand on 2019-06-24 15:46

__Commit:__ [0d54679](0d54679):
__Message:__ Rename method and fixed update condition when creating file
__Author:__ Jeroen Ouwehand on 2019-06-24 09:58

__Commit:__ [52f9e36](52f9e36):
__Message:__ Updated README
__Author:__ Jeroen Ouwehand on 2019-06-22 19:06

__Commit:__ [25c2569](25c2569):
__Message:__ Added types for figlet and updated readme with coverage percentage
__Author:__ Jeroen Ouwehand on 2019-06-22 18:53

__Commit:__ [b33824f](b33824f):
__Message:__ Updated DefaultTemplate with option to overwrite files and renamed methods/variables
__Author:__ Jeroen Ouwehand on 2019-06-22 18:35

__Commit:__ [94e4675](94e4675):
__Message:__ Added possibility to overwrite files
__Author:__ Jeroen Ouwehand on 2019-06-22 18:34

__Commit:__ [7cc272e](7cc272e):
__Message:__ Updated checker and logger utils + console messages
__Author:__ Jeroen Ouwehand on 2019-06-22 18:34

__Commit:__ [6a0868d](6a0868d):
__Message:__ Added Bitbucket to providers
__Author:__ Jeroen Ouwehand on 2019-06-22 18:33

__Commit:__ [b01d558](b01d558):
__Message:__ Misspelled Gitlab
__Author:__ Jeroen Ouwehand on 2019-06-18 16:26

__Commit:__ [0e6d279](0e6d279):
__Message:__ Added BSD 2-Clause and GPLv3 licenses + moved 'code of conduct' to universal templates
__Author:__ Jeroen Ouwehand on 2019-06-18 16:05

__Commit:__ [2f60f34](2f60f34):
__Message:__ Renamed files added console-message ts and reduced npm package size with 30%
__Author:__ Jeroen Ouwehand on 2019-06-12 10:55

__Commit:__ [4a559de](4a559de):
__Message:__ Added automated documentation with TypeDoc
__Author:__ Jeroen Ouwehand on 2019-06-11 11:21

__Commit:__ [6b8cd13](6b8cd13):
__Message:__ Updated license
__Author:__ Jeroen Ouwehand on 2019-06-07 15:12

__Commit:__ [3c485cd](3c485cd):
__Message:__ Updated userName
__Author:__ Jeroen Ouwehand on 2019-06-07 15:12

__Commit:__ [d59a538](d59a538):
__Message:__ Added commander dependency
__Author:__ Jeroen Ouwehand on 2019-06-07 15:09

__Commit:__ [e2c20f5](e2c20f5):
__Message:__ Seperate universal options and refactored cgx ts and updated models
__Author:__ Jeroen Ouwehand on 2019-06-07 14:44

__Commit:__ [cff0324](cff0324):
__Message:__ Added gitlab options: bug ci-template and feature-proposal
__Author:__ Jeroen Ouwehand on 2019-06-07 14:42

__Commit:__ [95b9e90](95b9e90):
__Message:__ Removed unused code in logger
__Author:__ Jeroen Ouwehand on 2019-06-07 14:38

__Commit:__ [53aeb7e](53aeb7e):
__Message:__ Made seperate question files
__Author:__ Jeroen Ouwehand on 2019-06-07 14:38

__Commit:__ [1312f28](1312f28):
__Message:__ Added gitlab provider question and merge-request-template option
__Author:__ Jeroen Ouwehand on 2019-06-07 11:12

__Commit:__ [42db129](42db129):
__Message:__ Move options to github folder
__Author:__ Jeroen Ouwehand on 2019-06-07 11:11

__Commit:__ [b948a07](b948a07):
__Message:__ 1.1.0
__Author:__ Jeroen Ouwehand on 2019-06-06 11:20

__Commit:__ [4593ba6](4593ba6):
__Message:__ Added DefaultTemplate to options for reducing duplicate code
__Author:__ Jeroen Ouwehand on 2019-06-06 11:15

__Commit:__ [ec1d948](ec1d948):
__Message:__ Updated README
__Author:__ Jeroen Ouwehand on 2019-06-04 16:09

__Commit:__ [c797760](c797760):
__Message:__ Added MIT and APACHE choices to license option and v1.0.0
__Author:__ Jeroen Ouwehand on 2019-06-04 15:42

__Commit:__ [5cbf083](5cbf083):
__Message:__ Added all options to cgx and index files
__Author:__ Jeroen Ouwehand on 2019-06-04 15:08

__Commit:__ [856a36b](856a36b):
__Message:__ Updated license and code-of-conduct options
__Author:__ Jeroen Ouwehand on 2019-06-04 15:07

__Commit:__ [0651919](0651919):
__Message:__ Created bug-report contributing feature-request and pull-request-template options
__Author:__ Jeroen Ouwehand on 2019-06-04 15:07

__Commit:__ [007ff3d](007ff3d):
__Message:__ Updated util checker with checkIfDirExist and logger with showStartGenerating/Created
__Author:__ Jeroen Ouwehand on 2019-06-04 15:06

__Commit:__ [cbeb429](cbeb429):
__Message:__ Updated md files and README
__Author:__ Jeroen Ouwehand on 2019-06-04 15:05

__Commit:__ [6e9191b](6e9191b):
__Message:__ Refactored code-of-conduct and license files to be more readable
__Author:__ Jeroen Ouwehand on 2019-06-04 13:41

__Commit:__ [956932c](956932c):
__Message:__ 0.03
__Author:__ Jeroen Ouwehand on 2019-06-04 13:11

__Commit:__ [6508e0c](6508e0c):
__Message:__ Created files for generating code-of-conduct and license
__Author:__ Jeroen Ouwehand on 2019-06-04 11:53

__Commit:__ [aed3b76](aed3b76):
__Message:__ Added checker util and removed options in logger util
__Author:__ Jeroen Ouwehand on 2019-06-04 11:53

__Commit:__ [f10bbfb](f10bbfb):
__Message:__ Added choice model
__Author:__ Jeroen Ouwehand on 2019-06-04 11:52

__Commit:__ [0efb0fa](0efb0fa):
__Message:__ Added cgx core ts file and updated IoC index file
__Author:__ Jeroen Ouwehand on 2019-06-04 11:52

__Commit:__ [dbfa52d](dbfa52d):
__Message:__ Removed unused dependencies added image updated README and npmignore
__Author:__ Jeroen Ouwehand on 2019-06-04 11:51

__Commit:__ [eb8a2de](eb8a2de):
__Message:__ Added default pull request template
__Author:__ Jeroen Ouwehand on 2019-06-03 17:45

__Commit:__ [c5d0162](c5d0162):
__Message:__ Added and updated issue templates
__Author:__ jeroenouw on 2019-06-03 17:42

__Commit:__ [35e129e](35e129e):
__Message:__ Added index and logger
__Author:__ Jeroen Ouwehand on 2019-06-03 17:39

__Commit:__ [e53b8d2](e53b8d2):
__Message:__ Updated package json added necessary typescript files and docs
__Author:__ Jeroen Ouwehand on 2019-06-03 17:38

__Commit:__ [e92b123](e92b123):
__Message:__ Created package json and LICENSE
__Author:__ Jeroen Ouwehand on 2019-06-03 15:02

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ More files & providers in future versions.
- Apache 2.0
- BSD 2-Clause
- GPLv3
* Changelog
* Contributing
* Readme
* Todo
Expand Down Expand Up @@ -115,6 +116,7 @@ Generate file question:
? Which files do you want to generate? (Use arrow keys)
❯ All main files (without license, todo and readme)
License
Changelog
Code of conduct
Contributing
Bug report (issue)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cgx",
"version": "1.7.0",
"version": "1.8.0",
"description": "Generate all the recommended markdown documentation/templates (pre-filled) for the Github, Gitlab and Bitbucket community standards",
"author": "Jeroen Ouwehand",
"repository": "https://github.com/jeroenouw/cgx",
Expand Down
12 changes: 11 additions & 1 deletion src/cgx.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { injectable, inject } from 'inversify';
import { Logger } from './utils/logger.util';
import { CodeOfConduct, Contributing, License, ToDo, Readme } from './templates/universal';
import { CodeOfConduct, Contributing, License, ToDo, Readme, Changelog } from './templates/universal';
import { BugReport, FeatureRequest, PullRequest } from './templates/github';
import { UniversalChoiceValue, GithubChoiceValue, GitlabChoiceValue, Answer, ProviderValue } from './models/choice';
import { Bug, CITemplate, FeatureProposal, MergeRequest } from './templates/gitlab';
Expand All @@ -22,6 +22,7 @@ export class CGX {
@inject('FeatureProposal') private featureProposal: FeatureProposal,
@inject('ToDo') private todo: ToDo,
@inject('Readme') private readme: Readme,
@inject('Changelog') private changelog: Changelog,
@inject('CITemplate') private ciTemplate: CITemplate) {
this.logger.showTitleAndBanner();
this.executeCGX();
Expand Down Expand Up @@ -55,6 +56,9 @@ export class CGX {
case UniversalChoiceValue.LICENSE: {
return this.license.generateLicense();
}
case UniversalChoiceValue.CHANGELOG: {
return this.changelog.generateFile();
}
case UniversalChoiceValue.CONTRIBUTING: {
return this.contributing.generateFile();
}
Expand Down Expand Up @@ -96,6 +100,9 @@ export class CGX {
case UniversalChoiceValue.LICENSE: {
return this.license.generateLicense();
}
case UniversalChoiceValue.CHANGELOG: {
return this.changelog.generateFile();
}
case UniversalChoiceValue.CONTRIBUTING: {
return this.contributing.generateFile();
}
Expand Down Expand Up @@ -136,6 +143,9 @@ export class CGX {
case UniversalChoiceValue.LICENSE: {
return this.license.generateLicense();
}
case UniversalChoiceValue.CHANGELOG: {
return this.changelog.generateFile();
}
case UniversalChoiceValue.CONTRIBUTING: {
return this.contributing.generateFile();
}
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { CITemplate } from './templates/gitlab/ci.template';
import { FeatureProposal } from './templates/gitlab/feature-proposal.template';
import { ToDo } from './templates/universal/todo.template';
import { Readme } from './templates/universal/readme.template';
import { Changelog } from './templates/universal/changelog.template';

export function index(): CGX {
const container: Container = new Container();
Expand All @@ -27,12 +28,13 @@ export function index(): CGX {
// Default Template
container.bind<DefaultTemplate>('DefaultTemplate').to(DefaultTemplate).inSingletonScope();

// Github, Gitlab and Bitbucket Templates (universal)
// Universal Templates (Github, Gitlab and Bitbucket)
container.bind<License>('License').to(License).inSingletonScope();
container.bind<Contributing>('Contributing').to(Contributing).inSingletonScope();
container.bind<CodeOfConduct>('CodeOfConduct').to(CodeOfConduct).inSingletonScope();
container.bind<ToDo>('ToDo').to(ToDo).inSingletonScope();
container.bind<Readme>('Readme').to(Readme).inSingletonScope();
container.bind<Changelog>('Changelog').to(Changelog).inSingletonScope();

// Github Templates
container.bind<BugReport>('BugReport').to(BugReport).inSingletonScope();
Expand Down
1 change: 1 addition & 0 deletions src/models/choice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export enum UniversalChoiceValue {
CODE_OF_CONDUCT = 'CODE_OF_CONDUCT',
TODO = 'TODO',
README = 'README',
CHANGELOG = 'CHANGELOG',
}

export enum GithubChoiceValue {
Expand Down
7 changes: 7 additions & 0 deletions src/models/commit-data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export interface CommitData {
hash: string;
author: string;
message: string;
date: Date;
mail: string;
}
1 change: 1 addition & 0 deletions src/models/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export enum FileName {
LICENSE = 'LICENSE',
README = 'README.md',
TODO = 'TODO.md',
CHANGELOG = 'CHANGELOG.md',
}
3 changes: 2 additions & 1 deletion src/questions/bitbucket-file.question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { Answer, UniversalChoiceValue, Choice } from '../models/choice';

export async function bitbucketFileQuestion(): Promise<Answer> {
const listOfFiles: Choice[] = [
{name: 'All main files (without license, todo and readme)', value: UniversalChoiceValue.ALL},
{name: 'All main files (without license, changelog, todo and readme)', value: UniversalChoiceValue.ALL},
{name: 'License', value: UniversalChoiceValue.LICENSE},
{name: 'Changelog', value: UniversalChoiceValue.CHANGELOG},
{name: 'Contributing', value: UniversalChoiceValue.CONTRIBUTING},
{name: 'Code of conduct', value: UniversalChoiceValue.CODE_OF_CONDUCT},
{name: 'Todo', value: UniversalChoiceValue.TODO},
Expand Down
3 changes: 2 additions & 1 deletion src/questions/github-file.question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { Answer, UniversalChoiceValue, GithubChoiceValue, Choice } from '../mode

export async function githubFileQuestion(): Promise<Answer> {
const listOfFiles: Choice[] = [
{name: 'All main files (without license, todo and readme)', value: UniversalChoiceValue.ALL},
{name: 'All main files (without license, changelog, todo and readme)', value: UniversalChoiceValue.ALL},
{name: 'License', value: UniversalChoiceValue.LICENSE},
{name: 'Changelog', value: UniversalChoiceValue.CHANGELOG},
{name: 'Contributing', value: UniversalChoiceValue.CONTRIBUTING},
{name: 'Code of conduct', value: UniversalChoiceValue.CODE_OF_CONDUCT},
{name: 'Todo', value: UniversalChoiceValue.TODO},
Expand Down
3 changes: 2 additions & 1 deletion src/questions/gitlab-file.question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { Answer, UniversalChoiceValue, GitlabChoiceValue, Choice } from '../mode

export async function gitlabFileQuestion(): Promise<Answer> {
const listOfFiles: Choice[] = [
{name: 'All main files (without license, todo and readme)', value: UniversalChoiceValue.ALL},
{name: 'All main files (without license, changelog, todo and readme)', value: UniversalChoiceValue.ALL},
{name: 'License', value: UniversalChoiceValue.LICENSE},
{name: 'Changelog', value: UniversalChoiceValue.CHANGELOG},
{name: 'Contributing', value: UniversalChoiceValue.CONTRIBUTING},
{name: 'Code of conduct', value: UniversalChoiceValue.CODE_OF_CONDUCT},
{name: 'Todo', value: UniversalChoiceValue.TODO},
Expand Down
Loading

0 comments on commit af43f6a

Please sign in to comment.