Skip to content

Commit

Permalink
fix: rename to oclif
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 13, 2018
1 parent 5995e7f commit cb1ab35
Show file tree
Hide file tree
Showing 35 changed files with 216 additions and 281 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- v2-{{checksum ".circleci/config.yml"}}
- v2
- run: .circleci/greenkeeper
- run: yarn add -D nyc@11 @anycli/nyc-config@0 mocha-junit-reporter@1 @commitlint/cli@6 @commitlint/config-conventional@6
- run: yarn add -D nyc@11 @oclif/nyc-config@0 mocha-junit-reporter@1 @commitlint/cli@6 @commitlint/config-conventional@6
- run: yarn exec commitlint -- -x @commitlint/config-conventional --from origin/master
- run: yarn exec nps lint
- persist_to_workspace: {root: node_modules, paths: ["*"]}
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
keys:
- v2-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
- run: yarn global add greenkeeper-lockfile@1
- run: yarn add -D nyc@11 @anycli/nyc-config@0 mocha-junit-reporter@1 @commitlint/cli@6 @commitlint/config-conventional@6
- run: yarn add -D nyc@11 @oclif/nyc-config@0 mocha-junit-reporter@1 @commitlint/cli@6 @commitlint/config-conventional@6
- run: yarn exec nps test.command
- save_cache:
key: v2-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
Expand All @@ -114,7 +114,7 @@ jobs:

workflows:
version: 2
anycli:
oclif:
jobs:
- lint
- node-latest-base: {requires: [lint] }
Expand Down
4 changes: 2 additions & 2 deletions .circleci/release
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ set -ex

PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH

yarn global add @anycli/semantic-release@1 semantic-release@12
yarn global add @oclif/semantic-release@1 semantic-release@12
yarn install --frozen-lockfile
semantic-release -e @anycli/semantic-release
semantic-release -e @oclif/semantic-release
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "anycli"
"extends": "oclif"
}
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
anycli
oclif
======

anycli: create your own CLI
oclif: create your own CLI

[![Version](https://img.shields.io/npm/v/anycli.svg)](https://npmjs.org/package/anycli)
[![CircleCI](https://circleci.com/gh/anycli/cli/tree/master.svg?style=svg)](https://circleci.com/gh/anycli/cli/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/anycli/cli?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/anycli/branch/master)
[![Codecov](https://codecov.io/gh/anycli/cli/branch/master/graph/badge.svg)](https://codecov.io/gh/anycli/cli)
[![Greenkeeper](https://badges.greenkeeper.io/anycli/cli.svg)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/npm/anycli/badge.svg)](https://snyk.io/test/npm/anycli)
[![Downloads/week](https://img.shields.io/npm/dw/anycli.svg)](https://npmjs.org/package/anycli)
[![License](https://img.shields.io/npm/l/anycli.svg)](https://github.com/anycli/cli/blob/master/package.json)
[![Version](https://img.shields.io/npm/v/oclif.svg)](https://npmjs.org/package/oclif)
[![CircleCI](https://circleci.com/gh/oclif/cli/tree/master.svg?style=svg)](https://circleci.com/gh/oclif/cli/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/cli?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/oclif/branch/master)
[![Codecov](https://codecov.io/gh/oclif/cli/branch/master/graph/badge.svg)](https://codecov.io/gh/oclif/cli)
[![Greenkeeper](https://badges.greenkeeper.io/oclif/cli.svg)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/npm/oclif/badge.svg)](https://snyk.io/test/npm/oclif)
[![Downloads/week](https://img.shields.io/npm/dw/oclif.svg)](https://npmjs.org/package/oclif)
[![License](https://img.shields.io/npm/l/oclif.svg)](https://github.com/oclif/cli/blob/master/package.json)

Useful Repos
------------

**Plugins**

* [@anycli/version](https://github.com/anycli/version) - `mycli -v|--version|version`. Show the current version.
* [@anycli/not-found](https://github.com/anycli/not-found) - Display a friendly "did you mean" message if a command is not found.
* [@anycli/plugins](https://github.com/anycli/plugins) - Allow users to add plugins to extend your CLI.
* [@anycli/autoupdate](https://github.com/anycli/autoupdate) - Add autoupdate support to the CLI.
* [@anycli/autocomplete](https://github.com/anycli/autocomplete) - Add bash/zsh autocomplete.
* [@oclif/version](https://github.com/oclif/version) - `mycli -v|--version|version`. Show the current version.
* [@oclif/not-found](https://github.com/oclif/not-found) - Display a friendly "did you mean" message if a command is not found.
* [@oclif/plugins](https://github.com/oclif/plugins) - Allow users to add plugins to extend your CLI.
* [@oclif/autoupdate](https://github.com/oclif/autoupdate) - Add autoupdate support to the CLI.
* [@oclif/autocomplete](https://github.com/oclif/autocomplete) - Add bash/zsh autocomplete.

Building your own plugin
------------------------

Writing code for plugins is essentially the same as writing within a CLI. They can export 3 different types: commands, hooks, and other plugins.

Run `yarn create anycli plugin mynewplugin` to create a plugin a new directory. This will come with a sample command and hook
Run `yarn create oclif plugin mynewplugin` to create a plugin a new directory. This will come with a sample command and hook
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ cache:

install:
- ps: Install-Product node $env:nodejs_version x64
- git config --global user.email "anycli@example.com"
- git config --global user.name "anycli"
- git config --global user.email "oclif@example.com"
- git config --global user.name "oclif"
- yarn
test_script:
- .\node_modules\.bin\nps lint
Expand Down
2 changes: 1 addition & 1 deletion bin/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node

require('..').run()
.catch(require('@anycli/errors/handle'))
.catch(require('@oclif/errors/handle'))
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"name": "oclif",
"description": "anycli: create your own CLI",
"description": "oclif: create your own CLI",
"version": "0.33.23",
"author": "Jeff Dickey @jdxcode",
"anycli": {
"oclif": {
"commands": "./lib/commands",
"plugins": [
"@anycli/plugin-help",
"@anycli/plugin-not-found"
"@oclif/plugin-help",
"@oclif/plugin-not-found"
],
"bin": "anycli"
"bin": "oclif"
},
"bin": "./bin/run",
"bugs": "https://github.com/anycli/cli/issues",
"bugs": "https://github.com/oclif/cli/issues",
"dependencies": {
"@anycli/command": "^1.2.19",
"@anycli/config": "^1.3.45",
"@anycli/errors": "^0.2.2",
"@anycli/plugin-help": "^0.7.2",
"@anycli/plugin-not-found": "^0.1.20",
"@oclif/command": "^1.2.22",
"@oclif/config": "^1.3.45",
"@oclif/errors": "^1.0.1",
"@oclif/plugin-help": "^0.7.2",
"@oclif/plugin-not-found": "^0.1.20",
"debug": "^3.1.0",
"fixpack": "^2.3.1",
"lodash": "^4.17.5",
Expand All @@ -28,16 +28,16 @@
"yosay": "^2.0.1"
},
"devDependencies": {
"@anycli/dev-cli": "^0.3.10",
"@anycli/tslint": "^0.2.7",
"@oclif/dev-cli": "^0.3.10",
"@oclif/tslint": "^0.2.7",
"@types/lodash": "^4.14.102",
"@types/read-pkg": "^3.0.0",
"@types/shelljs": "^0.7.8",
"@types/yeoman-generator": "^2.0.1",
"@types/yosay": "^0.0.29",
"chai": "^4.1.2",
"eslint": "^4.17.0",
"eslint-config-anycli": "^1.3.2",
"eslint-config-oclif": "^1.3.2",
"execa": "^0.9.0",
"fancy-test": "^1.0.1",
"fs-extra": "^5.0.0",
Expand All @@ -55,24 +55,24 @@
"node": ">=8.0.0"
},
"files": [
".anycli.manifest.json",
".oclif.manifest.json",
"/bin",
"/lib",
"/templates"
],
"homepage": "https://github.com/anycli/cli",
"homepage": "https://github.com/oclif/cli",
"keywords": [
"anycli"
"oclif"
],
"license": "MIT",
"main": "lib/index.js",
"repository": "anycli/cli",
"repository": "oclif/cli",
"scripts": {
"build": "rm -rf lib && tsc",
"lint": "nps lint",
"postpublish": "rm .anycli.manifest.json",
"postpublish": "rm .oclif.manifest.json",
"posttest": "yarn run lint",
"prepublishOnly": "yarn run build && anycli-dev manifest && anycli-dev readme",
"prepublishOnly": "yarn run build && oclif-dev manifest && oclif-dev readme",
"test": "nps test"
},
"types": "lib/index.d.ts"
Expand Down
10 changes: 5 additions & 5 deletions scripts/release_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = (_, options) => {

const d = path.join(__dirname, '../tmp/examples', example)
sh.mkdir('-p', path.dirname(d))
sh.exec(`git clone git@github.com:anycli/${example} ${d}`)
sh.exec(`git clone git@github.com:oclif/${example} ${d}`)
sh.pushd(d)
const pjson = fs.readJSONSync('package.json')

Expand All @@ -40,17 +40,17 @@ module.exports = (_, options) => {
sh.rm('-rf', files)

fs.outputJSONSync('package.json', {
name: `@anycli/${example}`,
repository: `anycli/${example}`,
name: `@oclif/${example}`,
repository: `oclif/${example}`,
author: pjson.author,
version: pjson.version,
description: pjson.description,
})

sh.exec(`anycli ${type} --force --defaults ${options}`)
sh.exec(`oclif ${type} --force --defaults ${options}`)
sh.exec('git add -A')
try {
execa.sync('git', ['commit', '-m', `${releaseType === 'patch' ? 'fix' : 'feat'}: anycli v${version}\n\n${notes}`], {stdio: 'inherit'})
execa.sync('git', ['commit', '-m', `${releaseType === 'patch' ? 'fix' : 'feat'}: oclif v${version}\n\n${notes}`], {stdio: 'inherit'})
sh.exec('git push')
} catch (err) {
console.error(err)
Expand Down
2 changes: 1 addition & 1 deletion src/app_command.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {flags} from '@anycli/command'
import {flags} from '@oclif/command'

import Base from './command_base'

Expand Down
6 changes: 3 additions & 3 deletions src/command_base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Command from '@anycli/command'
import Command from '@oclif/command'
import {createEnv} from 'yeoman-environment'

export default abstract class CommandBase extends Command {
Expand All @@ -7,9 +7,9 @@ export default abstract class CommandBase extends Command {

env.register(
require.resolve(`./generators/${type}`),
`anycli:${type}`
`oclif:${type}`
)

await env.run(`anycli:${type}`, generatorOptions)
await env.run(`oclif:${type}`, generatorOptions)
}
}
2 changes: 1 addition & 1 deletion src/commands/command.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {flags} from '@anycli/command'
import {flags} from '@oclif/command'

import Base from '../command_base'

Expand Down

0 comments on commit cb1ab35

Please sign in to comment.