Skip to content

Commit

Permalink
v11.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cdimascio committed Nov 27, 2021
1 parent c994c9d commit fa7e2c6
Show file tree
Hide file tree
Showing 5 changed files with 1,033 additions and 5,850 deletions.
15 changes: 7 additions & 8 deletions app/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'use strict';

const Generator = require('yeoman-generator');
const path = require('path');

Expand Down Expand Up @@ -62,7 +61,7 @@ module.exports = class extends Generator {
});
}

return this.prompt(prompts).then(r => {
return this.prompt(prompts).then((r) => {
this.name = r.name || this.name;
this.description = r.description || this.description;
this.version = r.version || this.version;
Expand Down Expand Up @@ -128,7 +127,7 @@ module.exports = class extends Generator {
specification: this.specification,
};

files.forEach(f => {
files.forEach((f) => {
this.fs.copyTpl(
this.templatePath(f),
this.destinationPath(`${this.name}/${f}`),
Expand All @@ -155,19 +154,19 @@ module.exports = class extends Generator {

install() {
const appDir = path.join(process.cwd(), this.name);
process.chdir(appDir);
if (this.useYarn) {
this.yarnInstall();
this.spawnCommandSync('yarn', ['install'], { cwd: appDir });
} else {
this.npmInstall();
this.spawnCommandSync('npm', ['install'], { cwd: appDir });
}
}

end() {
const appDir = path.join(process.cwd(), this.name);
if (this.useYarn) {
this.spawnCommandSync('yarn', ['lint:fix']);
this.spawnCommandSync('yarn', ['lint:fix'], { cwd: appDir });
} else {
this.spawnCommandSync('npm', ['run', 'lint:fix']);
this.spawnCommandSync('npm', ['run', 'lint:fix'], { cwd: appDir });
}
}
};
40 changes: 20 additions & 20 deletions app/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,36 @@
"cookie-parser": "^1.4.5",
"dotenv": "^10.0.0",
"express": "^4.17.1",
"pino": "^6.11.3",
<% if (specification === 'openapi_3') { %>
"express-openapi-validator": "^4.12.11"
"express-openapi-validator": "^4.13.3",
<% } else { %>
"swagger-express-middleware": "^4.0.2"
"swagger-express-middleware": "^4.0.2",
<% } %>
"pino": "^7.4.1"
},
"devDependencies": {
"@types/chai": "^4.2.18",
"@types/chai": "^4.2.22",
"@types/cookie-parser": "^1.4.2",
"@types/express": "^4.17.12",
"@types/mocha": "^8.2.2",
"@types/node": "^15.6.1",
"@types/pino": "^6.3.8",
"@types/shelljs": "^0.8.8",
"@types/express": "^4.17.13",
"@types/mocha": "^9.0.0",
"@types/node": "^16.11.10",
"@types/pino": "^7.0.4",
"@types/shelljs": "^0.8.9",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^4.14.0",
"@typescript-eslint/parser": "^4.14.0",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"chai": "^4.3.4",
"eslint": "^7.27.0",
"eslint": "^8.3.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"mocha": "^8.4.0",
"nodemon": "^2.0.7",
"pino-pretty": "^5.0.1",
"prettier": "^2.3.0",
"eslint-plugin-prettier": "^4.0.0",
"mocha": "^9.1.3",
"nodemon": "^2.0.15",
"pino-pretty": "^7.2.0",
"prettier": "^2.5.0",
"shelljs": "^0.8.4",
"supertest": "^6.1.3",
"ts-node": "^10.0.0",
"typescript": "^4.3.2"
"supertest": "^6.1.6",
"ts-node": "^10.4.0",
"typescript": "^4.5.2"
},
"author": "Carmine DiMascio <[email protected]> (https://github.com/cdimascio)"
}
27 changes: 15 additions & 12 deletions app/templates/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
{
"compileOnSave": false,
"compilerOptions": {
"target":"ES2018",
"module": "commonjs",
"lib": ["es2020"],
"declaration": true,
"target": "ES2019",
"lib": ["ES2020"],
"strict": true,
"noImplicitAny": true,
"module": "commonjs",
"esModuleInterop": true,
"skipLibCheck": true,
"sourceMap": true,
"declaration": true,
"moduleResolution": "node",
"strictNullChecks": true,
"useUnknownInCatchVariables": false,
"noImplicitAny": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": false,
"strictNullChecks": true,
"noUnusedParameters": true,
"noUnusedLocals": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": false,
"skipLibCheck": true,
"sourceMap": true,
"strictPropertyInitialization":false,
"resolveJsonModule": true,
"alwaysStrict": true,
"outDir": "dist",
"typeRoots": ["./node_modules/@types"]
"typeRoots": ["node_modules/@types"],
"resolveJsonModule": true,
"baseUrl": "."

},
"include": ["server/**/*.ts"],
"exclude": ["node_modules"]
Expand Down
Loading

0 comments on commit fa7e2c6

Please sign in to comment.