Skip to content

Commit

Permalink
Initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmarcos committed Mar 25, 2018
0 parents commit 169b6db
Show file tree
Hide file tree
Showing 21 changed files with 1,794 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
version: 2
jobs:
node-latest: &test
docker:
- image: node:latest
working_directory: ~/cli
environment:
NYC: "yarn exec nyc -- --nycrc-path node_modules/@oclif/nyc-config/.nycrc"
MOCHA_FILE: "reports/mocha.xml"
steps:
- checkout
- restore_cache: &restore_cache
keys:
- v1-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}}
- v1-yarn-{{checksum ".circleci/config.yml"}}
- run: .circleci/greenkeeper
- run: yarn add -D nyc@11 @oclif/nyc-config@1 mocha-junit-reporter@1
- run: ./bin/run --version
- run: ./bin/run --help
- run: |
mkdir -p reports
$NYC yarn test --reporter mocha-junit-reporter
$NYC report --reporter text-lcov > coverage.lcov
curl -s https://codecov.io/bash | bash
- store_test_results: &store_test_results
path: ~/cli/reports
node-8:
<<: *test
docker:
- image: node:8

workflows:
version: 2
"botonic":
jobs:
- node-latest
- node-8
25 changes: 25 additions & 0 deletions .circleci/greenkeeper
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

set -ex

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

if [[ "$CIRCLE_BRANCH" != greenkeeper/* ]]; then
yarn
# yarn check
exit 0
fi

if [[ ! -z "$GIT_EMAIL" ]] & [[ ! -z "$GIT_USERNAME" ]]; then
git config --global push.default simple
git config --global user.email "$GIT_EMAIL"
git config --global user.name "$GIT_USERNAME"
fi

if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then
yarn global add greenkeeper-lockfile@1
fi

greenkeeper-lockfile-update
yarn
greenkeeper-lockfile-upload
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/lib
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "oclif"
}
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*-debug.log
*-error.log
.oclif.manifest.json
/lib
/node_modules
/tmp
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
botonic
=======

Build chatbots using React

[![Version](https://img.shields.io/npm/v/botonic.svg)](https://npmjs.org/package/botonic)
[![CircleCI](https://circleci.com/gh/ericmarcos/botonic/tree/master.svg?style=shield)](https://circleci.com/gh/ericmarcos/botonic/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/ericmarcos/botonic?branch=master&svg=true)](https://ci.appveyor.com/project/ericmarcos/botonic/branch/master)
[![Codecov](https://codecov.io/gh/ericmarcos/botonic/branch/master/graph/badge.svg)](https://codecov.io/gh/ericmarcos/botonic)
[![Downloads/week](https://img.shields.io/npm/dw/botonic.svg)](https://npmjs.org/package/botonic)
[![License](https://img.shields.io/npm/l/botonic.svg)](https://github.com/ericmarcos/botonic/blob/master/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g botonic
$ botonic COMMAND
running command...
$ botonic (-v|--version|version)
botonic/0.0.0 darwin-x64 node-v9.9.0
$ botonic --help [COMMAND]
USAGE
$ botonic COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [botonic hello [FILE]](#botonic-hello-file)
* [botonic help [COMMAND]](#botonic-help-command)

## botonic hello [FILE]

describe the command here

```
USAGE
$ botonic hello [FILE]
OPTIONS
-f, --force
-n, --name=name name to print
EXAMPLE
$ botonic hello
hello world from ./src/hello.ts!
```

_See code: [src/commands/hello.ts](https://github.com/hubtype/botonic/blob/v0.0.0/src/commands/hello.ts)_

## botonic help [COMMAND]

display help for botonic

```
USAGE
$ botonic help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v1.2.1/src/commands/help.ts)_
<!-- commandsstop -->
22 changes: 22 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
environment:
nodejs_version: "9"
cache:
- '%LOCALAPPDATA%\Yarn -> appveyor.yml'
- node_modules -> yarn.lock

install:
- ps: Install-Product node $env:nodejs_version x64
- yarn add -D nyc@11 @oclif/nyc-config@1
test_script:
- .\bin\run --version
- .\bin\run --help
- .\node_modules\.bin\nyc --nycrc-path node_modules/@oclif/nyc-config/.nycrc yarn test
after_test:
- .\node_modules\.bin\nyc --nycrc-path node_modules/@oclif/nyc-config/.nycrc report --reporter text-lcov > coverage.lcov
- ps: |
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
bash codecov.sh
build: off

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

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" %*
71 changes: 71 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"name": "botonic",
"description": "Build chatbots using React",
"version": "0.0.0",
"author": "ericmarcos @ericmarcos",
"bin": {
"botonic": "./bin/run"
},
"bugs": "https://github.com/hubtype/botonic/issues",
"dependencies": {
"@oclif/command": "^1.4.5",
"@oclif/config": "^1.3.60",
"@oclif/plugin-help": "^1.2.1",
"cheerio": "^1.0.0-rc.2",
"cli-table2": "^0.2.0",
"colors": "^1.2.1",
"inquirer": "^5.1.0",
"next": "^5.0.0",
"react": "^16.2.0",
"react-dom": "^16.2.0"
},
"devDependencies": {
"@oclif/dev-cli": "^1.4.2",
"@oclif/test": "^1.0.1",
"@oclif/tslint": "^1.0.2",
"@types/chai": "^4.1.2",
"@types/mocha": "^5.0.0",
"@types/node": "^9.6.0",
"chai": "^4.1.2",
"globby": "^8.0.1",
"mocha": "^5.0.5",
"ts-node": "5",
"tslib": "^1.9.0",
"tslint": "^5.9.1",
"typescript": "^2.7.2"
},
"engines": {
"node": ">=8.0.0"
},
"files": [
".oclif.manifest.json",
"/bin",
"/lib"
],
"homepage": "https://github.com/hubtype/botonic",
"keywords": [
"oclif"
],
"license": "MIT",
"main": "lib/index.js",
"oclif": {
"commands": "./lib/commands",
"bin": "botonic",
"plugins": [
"@oclif/plugin-help"
]
},
"repository": "hubtype/botonic",
"scripts": {
"build": "rm -rf lib && tsc",
"clean": "rm -f .oclif.manifest.json",
"lint": "tsc -p test --noEmit && tslint -p test -t stylish",
"postpublish": "yarn run clean",
"posttest": "yarn run lint",
"prepublishOnly": "yarn run build && oclif-dev manifest",
"preversion": "yarn run clean",
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
"version": "oclif-dev readme && git add README.md"
},
"types": "lib/index.d.ts"
}
Loading

0 comments on commit 169b6db

Please sign in to comment.