Skip to content

Commit

Permalink
Adjusting version (#5)
Browse files Browse the repository at this point in the history
* refactor: getting package version

Retrieving the version of the json package, to show the information of the same

* chore: merge master
  • Loading branch information
Lucas Eduardo Santos da Silva authored Mar 29, 2020
1 parent 8fe15a9 commit 77314c7
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 247 deletions.
6 changes: 0 additions & 6 deletions bin/app/constants/instructions.constant.d.ts

This file was deleted.

7 changes: 0 additions & 7 deletions bin/app/constants/instructions.constant.js

This file was deleted.

5 changes: 0 additions & 5 deletions bin/app/controllers/copyTemplate.controller.d.ts

This file was deleted.

67 changes: 0 additions & 67 deletions bin/app/controllers/copyTemplate.controller.js

This file was deleted.

6 changes: 0 additions & 6 deletions bin/app/controllers/verifyArgs.controller.d.ts

This file was deleted.

19 changes: 0 additions & 19 deletions bin/app/controllers/verifyArgs.controller.js

This file was deleted.

8 changes: 0 additions & 8 deletions bin/app/interfaces/commands.interfaces.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion bin/app/interfaces/commands.interfaces.js

This file was deleted.

3 changes: 0 additions & 3 deletions bin/app/interfaces/parametersList.interface.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion bin/app/interfaces/parametersList.interface.js

This file was deleted.

2 changes: 0 additions & 2 deletions bin/index.d.ts

This file was deleted.

112 changes: 0 additions & 112 deletions bin/index.js

This file was deleted.

22 changes: 19 additions & 3 deletions bin/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
{
"name": "tarvos-express",
"version": "1.0.2",
"main": "./bin/index.js",
"version": "1.0.4",
"main": "./src/index.js",
"repository": "[email protected]:lucas-eduardo/tarvos-express.git",
"author": "Lucas Eduardo <[email protected]>",
"license": "MIT",
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true"
}
},
"scripts": {
"build": "tsc -p ."
},
"bin": {
"tarvos-express": "./bin/index.js"
"tarvos-express": "./src/index.js"
},
"prettier": {
"singleQuote": true,
Expand All @@ -20,6 +26,8 @@
"arrowParens": "always"
},
"devDependencies": {
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@types/chalk": "^2.2.0",
"@types/clear": "^0.1.0",
"@types/clui": "^0.3.0",
Expand All @@ -29,11 +37,14 @@
"@types/minimist": "^1.2.0",
"@typescript-eslint/eslint-plugin": "^2.25.0",
"@typescript-eslint/parser": "^2.25.0",
"commitizen": "^4.0.3",
"cz-conventional-changelog": "3.1.0",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-prettier": "^3.1.2",
"husky": "^4.2.3",
"prettier": "^2.0.2",
"ts-node": "^8.8.1",
"ts-node-dev": "^1.0.0-pre.44",
Expand All @@ -47,5 +58,10 @@
"figures": "^3.2.0",
"fs-extra": "^9.0.0",
"minimist": "^1.2.5"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
3 changes: 1 addition & 2 deletions bin/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ var package_json_1 = require("../package.json");
switch (_a.label) {
case 0:
args = minimist_1.default(process.argv.slice(2));
console.log(package_json_1.version);
isCommandValid = verifyArgs_controller_1.default.initialize(args);
if (!isCommandValid) return [3, 7];
if (!(args.projet || args.p)) return [3, 5];
Expand Down Expand Up @@ -100,7 +99,7 @@ var package_json_1 = require("../package.json");
_a.label = 6;
case 6:
if (args.version || args.v) {
console_1.log(chalk_1.default.hex('#F38E36').bold("Version 1.0.2 \n"));
console_1.log(chalk_1.default.hex('#F38E36').bold("Version " + package_json_1.version + " \n"));
console_1.log(chalk_1.default.hex('#F38E36').bold("Created by Lucas Eduardo"));
}
return [3, 8];
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tarvos-express",
"version": "1.0.3",
"main": "./bin/index.js",
"version": "1.0.4",
"main": "./src/index.js",
"repository": "[email protected]:lucas-eduardo/tarvos-express.git",
"author": "Lucas Eduardo <[email protected]>",
"license": "MIT",
Expand All @@ -15,7 +15,7 @@
"build": "tsc -p ."
},
"bin": {
"tarvos-express": "./bin/index.js"
"tarvos-express": "./src/index.js"
},
"prettier": {
"singleQuote": true,
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import VerifyArgsController from './app/controllers/verifyArgs.controller';
import CopyTemplateController from './app/controllers/copyTemplate.controller';
import instructions from './app/constants/instructions.constant';

import { version } from '../package.json';

(async () => {
const args: minimist.ParsedArgs = minimist(process.argv.slice(2));

Expand Down Expand Up @@ -68,7 +70,7 @@ import instructions from './app/constants/instructions.constant';
process.exit();
}
if (args.version || args.v) {
log(chalk.hex('#F38E36').bold(`Version 1.0.3 \n`));
log(chalk.hex('#F38E36').bold(`Version ${version} \n`));
log(chalk.hex('#F38E36').bold(`Created by Lucas Eduardo`));
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"lib": ["DOM", "ES2015", "ES6"], /* Specify library files to be included in the compilation. */
"declaration": true, /* Generates corresponding '.d.ts' file. */
"outDir": "./bin", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
"rootDir": ".", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
"removeComments": true, /* Do not emit comments to output. */
"strict": true, /* Enable all strict type-checking options. */
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
Expand Down

0 comments on commit 77314c7

Please sign in to comment.