Skip to content

Commit

Permalink
Convert to a cli (#15)
Browse files Browse the repository at this point in the history
* Start the move to a cli instead of an environment

* Add the package command :)

* Add a deploy command

* We are a cli package, so preferGlobal

* Change the packaging done on deploy to packaged

* If the deploymentResult wasn't a success, show the error

* Add the create subcommand with basic items and show it compiles by compiling

* Add the .gitignore to the created files

* Change the main class file to not be so generic

* Generate a readme with some information and links
  • Loading branch information
graywolf336 committed Jun 24, 2018
1 parent d817834 commit 2c94a72
Show file tree
Hide file tree
Showing 78 changed files with 5,578 additions and 6,548 deletions.
65 changes: 65 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,65 @@
---
version: 2
jobs:
node-latest: &test
docker:
- image: node:latest
working_directory: ~/cli
steps:
- checkout
- restore_cache: &restore_cache
keys:
- v1-npm-{{checksum ".circleci/config.yml"}}-{{ checksum "package-lock.json"}}
- v1-npm-{{checksum ".circleci/config.yml"}}
- run:
name: Install dependencies
command: .circleci/greenkeeper
- run: ./bin/run --version
- run: ./bin/run --help
- run:
name: Testing
command: npm test
- run:
name: Submitting code coverage to codecov
command: |
./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov
curl -s https://codecov.io/bash | bash
node-8:
<<: *test
docker:
- image: node:8
release:
<<: *test
steps:
- add_ssh_keys
- checkout
- restore_cache: *restore_cache
- run:
name: Install dependencies
command: |
npm install -g @oclif/semantic-release@3 semantic-release@15
npm install
- run:
name: Cutting release
command: |
semantic-release -e @oclif/semantic-release
- save_cache:
key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
paths:
- ~/cli/node_modules
- ~/.npm
- /usr/local/lib/node_modules

workflows:
version: 2
"@rocket.chat/apps-cli":
jobs:
- node-latest
- node-8
- release:
context: org-global
filters:
branches: {only: master}
requires:
- node-latest
- node-8
25 changes: 25 additions & 0 deletions .circleci/greenkeeper
@@ -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
10 changes: 6 additions & 4 deletions .editorconfig
Expand Up @@ -5,10 +5,12 @@ root = true

# Unix-style newlines with a newline ending every file
[*]
indent_style = space
indent_size = 4
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# 4 space indentation
[**.*]
indent_style = space
indent_size = 4
[*.md]
trim_trailing_whitespace = false
20 changes: 0 additions & 20 deletions .eslintrc.json

This file was deleted.

3 changes: 3 additions & 0 deletions .gitattributes
@@ -0,0 +1,3 @@
* text=auto
*.js text eol=lf
*.ts text eol=lf
15 changes: 5 additions & 10 deletions .gitignore
@@ -1,6 +1,3 @@
# Created by https://www.gitignore.io/api/node

### Node ###
# Logs
logs
*.log
Expand Down Expand Up @@ -40,14 +37,12 @@ jspm_packages
# Optional REPL history
.node_repl_history

### Typings ###
## Ignore downloaded typings
# Ignore downloaded typings
/typings

## Ignore distribution folder
# Ignore distribution folder
dist/

## dev env items
.server-dist/
.server-data/
.tmp/
# Various others
/lib
/tmp
12 changes: 12 additions & 0 deletions .nycrc
@@ -0,0 +1,12 @@
{
"extension": [
".ts"
],
"include": [
"src/**/*.ts"
],
"exclude": [
"**/*.d.ts"
],
"all": true
}
75 changes: 0 additions & 75 deletions app-schema.json

This file was deleted.

2 changes: 0 additions & 2 deletions apps/README.md

This file was deleted.

137 changes: 0 additions & 137 deletions apps/asciiart-commands/AsciiArtCommandsApp.ts

This file was deleted.

0 comments on commit 2c94a72

Please sign in to comment.