Skip to content

Commit

Permalink
fix: back to single-command CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
prokopsimek committed Jan 28, 2020
1 parent 538ce67 commit 21c539b
Show file tree
Hide file tree
Showing 15 changed files with 154 additions and 361 deletions.
9 changes: 0 additions & 9 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,5 @@
"markdownReleaseNotes": true
}
]
],
"branches": [
"master",
"next",
{ "name": "beta", "prerelease": "beta" },
{ "name": "alpha", "prerelease": "alpha" },
{ "name": "feature/*", "prerelease": '${name.replace(/feature\//, "pre-")}' },
{ "name": "hotfix/*", "prerelease": '${name.replace(/hotfix\//, "pre-")}' },
{ "name": "debug/*", "prerelease": '${name.replace(/debug\//, "pre-")}' }
]
}
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ notifications:
script:
- yarn build
- yarn test --coverage
- bin/run
- bin/run -v
- yarn test:codecov:upload
- bin/run run . --fail=high
- bin/run . --fail=high

jobs:
include:
Expand All @@ -52,11 +52,11 @@ jobs:
- stage: runtime test
if: branch = master
scripts:
- bin/run run
- bin/run run https://github.com/DXHeroes/dx-scanner
- bin/run run https://github.com/moment/luxon
- bin/run run https://github.com/intoli/remote-browser
- bin/run run
- bin/run -v
- bin/run https://github.com/DXHeroes/dx-scanner
- bin/run https://github.com/moment/luxon
- bin/run https://github.com/intoli/remote-browser
- bin/run
os: windows
- os: linux
- stage: release
Expand Down
66 changes: 0 additions & 66 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,3 @@
# [2.0.0](https://github.com/dxheroes/dx-scanner/compare/v1.38.0...v2.0.0) (2020-01-28)


### Bug Fixes

* allow fail and recursive to be optional ([457eb72](https://github.com/dxheroes/dx-scanner/commit/457eb72426d4f4ccca135f43e599ea577c4f0077))
* inform user if the config file already exists ([569725a](https://github.com/dxheroes/dx-scanner/commit/569725a0e30acb8d03523b70da9db981188d5023))
* parse flags with init subcommand ([3ede8e0](https://github.com/dxheroes/dx-scanner/commit/3ede8e0fd3f02078d91ca85e58d2068bd0d9cf11))
* remove comments a comment ideas ([e604238](https://github.com/dxheroes/dx-scanner/commit/e6042385ab862fac7ea888d155ed23189b5e61eb))
* remove unnecessary code ([bb88dd4](https://github.com/dxheroes/dx-scanner/commit/bb88dd4bd3ab615cd5a9989f63f18c4dc69977ad))
* remove unused commented code and import reflect-metadata ([5ad591a](https://github.com/dxheroes/dx-scanner/commit/5ad591a5d7ffafbc527643d202077c06085a7b6b))
* remove unused flag, aliases and set new examples ([cccdf57](https://github.com/dxheroes/dx-scanner/commit/cccdf574f080db6039cd91f302774f6d6c4159ae))
* rename method ([d8a88cf](https://github.com/dxheroes/dx-scanner/commit/d8a88cfbcabaffb0a8dd48e102e0e91d6c4c24f2))
* rename subcommand ([e939b9e](https://github.com/dxheroes/dx-scanner/commit/e939b9e1f26b7bd14f6bc79ac34a9e67292a21bd))
* revert change ([b4b6497](https://github.com/dxheroes/dx-scanner/commit/b4b6497f2909aa1bbfd45129883af5e4afadb8da))
* set arguments back to be required ([dc8edd6](https://github.com/dxheroes/dx-scanner/commit/dc8edd602f81da53bb14d3891a4c1f73824338ac))
* typo ([19e8bd1](https://github.com/dxheroes/dx-scanner/commit/19e8bd1ecbe785d1c6e47b2e91160742654e101c))


### Features

* **core:** CLI changed to multi-command ([cbf03b0](https://github.com/dxheroes/dx-scanner/commit/cbf03b016d6569c10638c9177a96cfaa962dcc77))
* add two subcommands ([9661d6b](https://github.com/dxheroes/dx-scanner/commit/9661d6b40f348cc66cef7b64fa033e65e851c935))
* convert init flag to subcommand ([9594d3a](https://github.com/dxheroes/dx-scanner/commit/9594d3ae7183d95eca7de2a68784bde27d4084bd))
* implement method to get practices ([871f7f2](https://github.com/dxheroes/dx-scanner/commit/871f7f2bb3ca950c6313afc8b04baed3f2aa3301))
* list practices in a table ([9d8a8f6](https://github.com/dxheroes/dx-scanner/commit/9d8a8f69b0f88f41052e46bd485a6d3c9abd97a1))
* wip - add subcommand ([6c33fc4](https://github.com/dxheroes/dx-scanner/commit/6c33fc4f7fa4761cbbdd00a4a1f668f7aaabb572))


### BREAKING CHANGES

* **core:** now exists commands such as init, practices and run

# [2.0.0-pre-list-practices.1](https://github.com/dxheroes/dx-scanner/compare/v1.38.0...v2.0.0-pre-list-practices.1) (2020-01-28)


### Bug Fixes

* allow fail and recursive to be optional ([457eb72](https://github.com/dxheroes/dx-scanner/commit/457eb72426d4f4ccca135f43e599ea577c4f0077))
* inform user if the config file already exists ([569725a](https://github.com/dxheroes/dx-scanner/commit/569725a0e30acb8d03523b70da9db981188d5023))
* parse flags with init subcommand ([3ede8e0](https://github.com/dxheroes/dx-scanner/commit/3ede8e0fd3f02078d91ca85e58d2068bd0d9cf11))
* remove comments a comment ideas ([e604238](https://github.com/dxheroes/dx-scanner/commit/e6042385ab862fac7ea888d155ed23189b5e61eb))
* remove unnecessary code ([bb88dd4](https://github.com/dxheroes/dx-scanner/commit/bb88dd4bd3ab615cd5a9989f63f18c4dc69977ad))
* remove unused commented code and import reflect-metadata ([5ad591a](https://github.com/dxheroes/dx-scanner/commit/5ad591a5d7ffafbc527643d202077c06085a7b6b))
* remove unused flag, aliases and set new examples ([cccdf57](https://github.com/dxheroes/dx-scanner/commit/cccdf574f080db6039cd91f302774f6d6c4159ae))
* rename method ([d8a88cf](https://github.com/dxheroes/dx-scanner/commit/d8a88cfbcabaffb0a8dd48e102e0e91d6c4c24f2))
* rename subcommand ([e939b9e](https://github.com/dxheroes/dx-scanner/commit/e939b9e1f26b7bd14f6bc79ac34a9e67292a21bd))
* revert change ([b4b6497](https://github.com/dxheroes/dx-scanner/commit/b4b6497f2909aa1bbfd45129883af5e4afadb8da))
* set arguments back to be required ([dc8edd6](https://github.com/dxheroes/dx-scanner/commit/dc8edd602f81da53bb14d3891a4c1f73824338ac))
* typo ([19e8bd1](https://github.com/dxheroes/dx-scanner/commit/19e8bd1ecbe785d1c6e47b2e91160742654e101c))


### Features

* **core:** CLI changed to multi-command ([cbf03b0](https://github.com/dxheroes/dx-scanner/commit/cbf03b016d6569c10638c9177a96cfaa962dcc77))
* add two subcommands ([9661d6b](https://github.com/dxheroes/dx-scanner/commit/9661d6b40f348cc66cef7b64fa033e65e851c935))
* convert init flag to subcommand ([9594d3a](https://github.com/dxheroes/dx-scanner/commit/9594d3ae7183d95eca7de2a68784bde27d4084bd))
* implement method to get practices ([871f7f2](https://github.com/dxheroes/dx-scanner/commit/871f7f2bb3ca950c6313afc8b04baed3f2aa3301))
* list practices in a table ([9d8a8f6](https://github.com/dxheroes/dx-scanner/commit/9d8a8f69b0f88f41052e46bd485a6d3c9abd97a1))
* wip - add subcommand ([6c33fc4](https://github.com/dxheroes/dx-scanner/commit/6c33fc4f7fa4761cbbdd00a4a1f668f7aaabb572))


### BREAKING CHANGES

* **core:** now exists commands such as init, practices and run

# [1.38.0](https://github.com/dxheroes/dx-scanner/compare/v1.37.1...v1.38.0) (2020-01-27)


Expand Down
47 changes: 7 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,43 +62,16 @@ OPTIONS
--ci CI mode
--fail=high|medium|small|off|all [default: high] Run scanner in failure mode. Exits process with code 1 for any non-practicing condition of given level.
ALIASES
$ dx-scanner dxs
$ dx-scanner dxscanner
EXAMPLES
dx-scanner run
dx-scanner run ./ --fail=high
dx-scanner run github.com/DXHeroes/dx-scanner
dx-scanner
dx-scanner ./ --fail=high
dx-scanner github.com/DXHeroes/dx-scanner
```

<details open>
<summary>List of All Practices 🔍</summary>

Practice | Impact | Language Independent | JavaScript/TypeScript | Java
------------- | ------------- | ------------- | ------------- | -------------
Create a Readme File | <span style="color:red">high</span> | ✅ | ✅ | ✅
Create a License File | <span style="color:yellow">medium</span> | ✅ | ✅ | ✅
Create a Lockfile | <span style="color:red">high</span> | ✅ | ✅ | ✅
Create a .gitignore | <span style="color:red">high</span> | ✅ | ✅ | ✅
Write in Typescript | <span style="color:yellow">medium</span> | ❌ | ✅ | ❌
Set .gitignore Correctly | <span style="color:red">high</span> | ❌ | ✅ | ✅
Use Continuous Integration | <span style="color:red">high</span> | ✅ | ✅ | ✅
Use Docker | <span style="color:green">small</span> | ✅ | ✅ | ✅
Use .editorconfig | <span style="color:green">small</span> | ✅ | ✅ | ✅
Format your code automatically | <span style="color:green">small</span> | ❌ | ✅ | ❌
Use ESLint | <span style="color:yellow">medium</span> | ❌ | ✅ | ❌
ESLint Without Errors | <span style="color:yellow">medium</span> | ❌ | ✅ | ❌
Use a different linter | <span style="color:yellow">medium</span> | ❌ | ✅ | ❌
Use JS Frontend Testing Framework | <span style="color:yellow">medium</span> | ❌ | ✅ | ❌
Use JS Frontend Build Tools | <span style="color:yellow">medium</span> | ❌ | ✅ | ❌
Use JS Backend Testing Frameworks | <span style="color:red">high</span> | ❌ | ✅ | ❌
Use a JS Logging Library | <span style="color:green">small</span> | ❌ | ✅ | ❌
Use JS Package Management | <span style="color:red">high</span> | ❌ | ✅ | ❌
Configure Scripts in package.json | <span style="color:yellow">medium</span> | ❌ | ✅ | ❌
Update Dependencies of Major Level | <span style="color:green">small</span> | ❌ | ✅ | ❌
Update Dependencies of Minor and Patch Level | <span style="color:red">high</span> | ❌ | ✅ | ❌
Do PullRequests | <span style="color:yellow">medium</span> | ✅ | ✅ | ✅
Solve Pull Requests Continuously | <span style="color:yellow">medium</span> | ✅ | ✅ | ✅
Write Commit Messages by Convention | <span style="color:green">small</span> | ✅ | ✅ | ✅
</details>

## Configuration ⚙️
Add ```dxscannerrc.*``` config file to change default configuration settings. It can be a ```.json```, ```.yml```, and even a dotfile!

Expand Down Expand Up @@ -196,9 +169,3 @@ Many thanks to these wonderful people ([emoji key](https://allcontributors.org/d
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Any kind of contributions are welcome!
2 changes: 0 additions & 2 deletions bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ const dev = fs.existsSync(project);

if (dev) {
require('ts-node').register({ project });
console.warn("WARNING: You're running DX Scanner in development mode.")
}

require(`../${dev ? 'src' : 'lib'}`)
.run()
.then(require('@oclif/command/flush'))
.catch(require('@oclif/errors/handle'));
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dx-scanner",
"description": "Scan your project for possible DX recommendations.",
"version": "2.0.0",
"version": "1.38.0",
"author": "DX Heroes LTD <info@dxheroes.io> (https://dxheroes.io)",
"homepage": "https://github.com/dxheroes/dx-scanner",
"repository": "ssh://git@github.com/dxheroes/dx-scanner.git",
Expand Down Expand Up @@ -114,8 +114,7 @@
"/lib"
],
"oclif": {
"bin": "dx-scanner",
"commands": "./src/commands"
"bin": "dx-scanner"
},
"keywords": [
"oclif",
Expand Down
30 changes: 0 additions & 30 deletions src/commands/init.ts

This file was deleted.

48 changes: 0 additions & 48 deletions src/commands/practices.ts

This file was deleted.

Loading

0 comments on commit 21c539b

Please sign in to comment.