Skip to content

Commit

Permalink
refactor(all): start migrating to oclif
Browse files Browse the repository at this point in the history
BREAKING CHANGE: this begins a series of commits that break everything
  • Loading branch information
ianwremmel committed Apr 18, 2018
1 parent 8ae0385 commit a30755b
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 95 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto
*.js text eol=lf
*.ts text eol=lf
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
*-debug.log
*-error.log
.nyc_output
coverage
.oclif.manifest.json
/dist
/lib
/node_modules

/tmp
/yarn.lock
coverage
node_modules
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Clark is a toolkit for interacting with [alle-inspired](https://github.com/boenn

## Table of Contents

<!-- toc -->
* [Install](#install)
* [Usage](#usage)
* [Alle](#alle)
Expand All @@ -38,6 +39,7 @@ Clark is a toolkit for interacting with [alle-inspired](https://github.com/boenn
* [Contribute](#contribute)
* [Development](#development)
* [License](#license)
<!-- tocstop -->

## Install

Expand Down Expand Up @@ -89,6 +91,11 @@ Simply add your package directories the `include` section of `.clarkrc`.

### Commands

<!-- usage -->
<!-- usagestop -->

<!-- commands -->

#### List all commands

```bash
Expand Down Expand Up @@ -169,6 +176,7 @@ but if one of the packages in your monorepo is a React project, you might need t
}
}
```
<!-- commandsstop -->

## Maintainer

Expand Down
47 changes: 0 additions & 47 deletions bin/clark

This file was deleted.

7 changes: 7 additions & 0 deletions bin/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env node

'use strict';

require('@oclif/command')
.run()
.catch(require('@oclif/errors/handle'));
3 changes: 3 additions & 0 deletions bin/run.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node "%~dp0\run" %*
66 changes: 38 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ianwremmel/clark",
"version": "0.0.0-development",
"version": "0.0.0",
"description": "Monorepo tools",
"bin": {
"clark": "bin/clark"
Expand All @@ -17,7 +17,7 @@
"lint": "npm run --silent lint:js && npm run --silent lint:ts && npm run --silent lint:changelog",
"lint:changelog": "commitlint --from origin/master --to HEAD",
"lint:commitmsg": "commitlint -e",
"lint:eslint": "eslint --ignore --ignore-path .gitignore",
"lint:eslint": "eslint --ignore-pattern bin/run.cmd --ignore-path .gitignore",
"lint:js": "npm run --silent lint:eslint -- .",
"lint:tslint": "tslint --project tsconfig.json -t stylish",
"lint:ts": "npm run --slient lint:tslint -- './src/**/*.ts' && tsc --noemit",
Expand All @@ -26,35 +26,48 @@
"precommit": "npm run --silent lint:staged",
"presemantic-release": "npm run build",
"semantic-release": "semantic-release",
"test": "CLARK_ENV=development mocha -r ts-node/register $(npm run --silent mocha-reporter-options) './src/**/*.spec.[jt]s' './test/*/spec/**/*.[jt]s'"
"postpack": "rm -f .oclif.manifest.json",
"prepack": "rm -rf lib && tsc && oclif-dev manifest && oclif-dev readme",
"test": "mocha $(npm run --silent mocha-reporter-options) --forbid-only 'test/**/*.test.ts' './src/**/*.spec.[jt]s' './test/*/spec/**/*.[jt]s'",
"posttest": "tsc -p test --noEmit && tslint -p test -t stylish",
"version": "oclif-dev readme && git add README.md"
},
"engines": {
"node": ">=8"
"dependencies": {
"@oclif/command": "^1.4.13",
"@oclif/config": "^1.6.3",
"@oclif/errors": "^1.0.4",
"@oclif/plugin-help": "^1.2.4",
"chalk": "^2.3.2",
"debug": "^3.1.0",
"find-root": "^1.1.0",
"glob": "^7.1.2",
"invariant": "^2.2.4",
"mz": "^2.7.0",
"pkg-up": "^2.0.0",
"rc": "^1.2.6",
"semver": "^5.5.0",
"supports-color": "^5.3.0"
},
"keywords": [],
"author": "Ian Remmel <1182361+ianwremmel@users.noreply.github.com>",
"license": "MIT",
"devDependencies": {
"@commitlint/cli": "^6.1.3",
"@commitlint/config-angular": "^6.1.3",
"@ianwremmel/eslint-config-base": "^1.0.0",
"@ianwremmel/eslint-config-standard": "^1.2.0",
"@oclif/dev-cli": "^1.13.0",
"@oclif/test": "^1.0.4",
"@oclif/tslint": "^1.1.0",
"@types/chai": "^4.1.2",
"@types/chai-as-promised": "^7.1.0",
"@types/debug": "0.0.30",
"@types/find-root": "^1.1.0",
"@types/glob": "^5.0.35",
"@types/invariant": "^2.2.29",
"@types/mocha": "^5.0.0",
"@types/mz": "0.0.32",
"@types/node": "^9.4.7",
"@types/node": "^9.6.2",
"@types/rc": "0.0.1",
"@types/semver": "^5.5.0",
"@types/supports-color": "^5.3.0",
"@types/yargs": "^11.0.0",
"@urbandoor/lint": "0.0.6",
"chai": "^4.1.2",
"chai-as-promised": "^7.1.1",
"condition-circle": "^2.0.1",
"eslint": "^4.18.2",
"eslint-config-prettier": "^2.9.0",
Expand All @@ -63,37 +76,34 @@
"eslint-plugin-prettier": "^2.6.0",
"husky": "^0.14.3",
"lint-staged": "^7.0.0",
"globby": "^8.0.1",
"mocha": "^5.1.0",
"prettier": "^1.11.1",
"rimraf": "^2.6.2",
"semantic-release": "^15.0.3",
"ts-node": "^6.0.0",
"tslib": "^1.9.0",
"tslint": "^5.9.1",
"tslint-config-prettier": "^1.10.0",
"tslint-language-service": "^0.9.8",
"tslint-plugin-prettier": "^1.3.0",
"typescript": "^2.7.2"
"typescript": "^2.8.1"
},
"engines": {
"node": ">=8.0.0"
},
"lint-staged": {
"**/*.js": "npm run lint:eslint -- ",
"**/*.ts": "tslint",
"bin/**": "npm run lint:eslint -- "
},
"oclif": {
"commands": "./lib/commands",
"bin": "clark",
"plugins": ["@oclif/plugin-help"]
},
"types": "lib/index.d.ts",
"release": {
"verifyConditions": "condition-circle"
},
"dependencies": {
"chalk": "^2.3.2",
"debug": "^3.1.0",
"find-root": "^1.1.0",
"glob": "^7.1.2",
"invariant": "^2.2.4",
"mz": "^2.7.0",
"pkg-up": "^2.0.0",
"rc": "^1.2.6",
"semver": "^5.5.0",
"supports-color": "^5.3.0",
"tslib": "^1.9.0",
"yargs": "^11.0.0"
}
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {run} from '@oclif/command';
21 changes: 4 additions & 17 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,20 @@
{
"compilerOptions": {
"alwaysStrict": true,
"baseUrl": ".",
"declaration": true,
"experimentalDecorators": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"pretty": true,
"lib": ["es2017"],
"module": "commonjs",
"noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "./lib",
"plugins": [
{
"name": "tslint-language-service"
}
],
"rootDir": "./src",
"pretty": true,
"rootDirs": ["./src"],
"sourceMap": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"strict": true,
"target": "es2017"
},
"exclude": ["node_modules"],
"include": ["./src/**/*.ts"]
"include": ["./src/**/*"]
}
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["@urbandoor/lint", "tslint-config-prettier"],
"extends": ["@oclif/tslint", "tslint-config-prettier"],
"rules": {
"completed-docs": [
true,
Expand Down

0 comments on commit a30755b

Please sign in to comment.