diff --git a/.gitignore b/.gitignore index d5f19d89b3..01b1635a96 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules package-lock.json +tmp diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..c713e415f2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +sudo: false +language: node_js +node_js: + - "8" + - "10" + +notifications: + disabled: true + +script: script/test diff --git a/README.md b/README.md index 4562757542..ad7a1aed31 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,18 @@ # Create Probot App -This project will generate a new [Probot](https://github.com/probot/probot) app -with everything you need to get started and run your app in production. +This project will generate a new [Probot](https://github.com/probot/probot) app +with everything you need to get started building. 👷🏽‍ -> use the --typescript flag to generate a new TypeScript project - -If you're using npm < 6: - -```sh -npx create-probot-app [--typescript] my-first-app -``` - -If you're using npm > 6: +In particular, this command line interface allows you to select from our pre-defined blue prints to choose a basic working example to start from. ```sh -npm init probot-app [--typescript] my-first-app +npx create-probot-app my-first-app ``` -If you're using Yarn: +If you're using Yarn: ```sh -yarn create probot-app [--typescript] my-first-app +yarn create probot-app my-first-app ``` -See the [Probot docs](https://probot.github.io/docs/development/) to get started. \ No newline at end of file +See the [Probot docs](https://probot.github.io/docs/development/#running-the-app-locally) to get started running your app locally. diff --git a/bin/create-probot-app.js b/bin/create-probot-app.js index 8c02c93f6b..ac17a0dff8 100755 --- a/bin/create-probot-app.js +++ b/bin/create-probot-app.js @@ -5,7 +5,7 @@ const path = require('path') const inquirer = require('inquirer') const program = require('commander') -const {scaffold} = require('egad') +const {generate} = require('egad') const kebabCase = require('lodash.kebabcase') const camelCase = require('lodash.camelcase') const chalk = require('chalk') @@ -14,8 +14,6 @@ const stringifyAuthor = require('stringify-author') const {guessEmail, guessAuthor, guessGitHubUsername} = require('conjecture') const validatePackageName = require('validate-npm-package-name') -const DEFAULT_TEMPLATE = 'https://github.com/probot/template.git' - program .usage('[options] [destination]') .option('-n, --appName ', 'App name') @@ -27,24 +25,16 @@ program .option('-h, --homepage ', 'Author\'s homepage') .option('-u, --user ', 'GitHub username or org (repo owner)') .option('-r, --repo ', 'Repository name') - .option('-b, --branch ', 'Specify a branch', 'master') .option('--overwrite', 'Overwrite existing files', false) - .option('--template ', 'URL or name of custom template', getTemplateRepository, DEFAULT_TEMPLATE) - .option('--typescript', 'Use the TypeScript template', () => program.emit('option:template', 'typescript')) + .option('-t, --template