From 7f234269a583d4efd2fbcd4ba43d53e90e7fa245 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Fri, 21 Sep 2018 13:06:02 +0100 Subject: [PATCH 01/18] =?UTF-8?q?=E2=9C=A8=20Pretty=20CLI=20-=20provide=20?= =?UTF-8?q?a=20styled=20sywac=20instance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Initial commit - Added a mini module to style sywac (http://sywac.io) - Makes really pretty, easy to read, CLI instances --- ghost/pretty-cli/.eslintrc.js | 6 ++++ ghost/pretty-cli/LICENSE | 21 ++++++++++++ ghost/pretty-cli/README.md | 41 +++++++++++++++++++++++ ghost/pretty-cli/index.js | 1 + ghost/pretty-cli/package.json | 27 +++++++++++++++ ghost/pretty-cli/pretty-cli.js | 27 +++++++++++++++ ghost/pretty-cli/styles.js | 21 ++++++++++++ ghost/pretty-cli/test/.eslintrc.js | 6 ++++ ghost/pretty-cli/test/pretty-cli.test.js | 32 ++++++++++++++++++ ghost/pretty-cli/test/utils/assertions.js | 11 ++++++ ghost/pretty-cli/test/utils/index.js | 11 ++++++ ghost/pretty-cli/test/utils/overrides.js | 10 ++++++ 12 files changed, 214 insertions(+) create mode 100644 ghost/pretty-cli/.eslintrc.js create mode 100644 ghost/pretty-cli/LICENSE create mode 100644 ghost/pretty-cli/README.md create mode 100644 ghost/pretty-cli/index.js create mode 100644 ghost/pretty-cli/package.json create mode 100644 ghost/pretty-cli/pretty-cli.js create mode 100644 ghost/pretty-cli/styles.js create mode 100644 ghost/pretty-cli/test/.eslintrc.js create mode 100644 ghost/pretty-cli/test/pretty-cli.test.js create mode 100644 ghost/pretty-cli/test/utils/assertions.js create mode 100644 ghost/pretty-cli/test/utils/index.js create mode 100644 ghost/pretty-cli/test/utils/overrides.js diff --git a/ghost/pretty-cli/.eslintrc.js b/ghost/pretty-cli/.eslintrc.js new file mode 100644 index 0000000000..6a5eab530d --- /dev/null +++ b/ghost/pretty-cli/.eslintrc.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: ['ghost'], + extends: [ + 'plugin:ghost/node', + ] +}; diff --git a/ghost/pretty-cli/LICENSE b/ghost/pretty-cli/LICENSE new file mode 100644 index 0000000000..97c52a346d --- /dev/null +++ b/ghost/pretty-cli/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Ghost Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/ghost/pretty-cli/README.md b/ghost/pretty-cli/README.md new file mode 100644 index 0000000000..4ee285cb4f --- /dev/null +++ b/ghost/pretty-cli/README.md @@ -0,0 +1,41 @@ +# Pretty CLI + +A mini-module to style a [sywac](http://sywac.io/) instance in a standard way + +## Install + +Either: `npm i @tryghost/pretty-cli --save` + +Or: `yarn add @tryghost/pretty-cli` + +## Usage + +E.g. `const prettyCLI = require('@tryghost/pretty-cli');` + +`prettyCLI` is a pre-styled instance of the [sywac](http://sywac.io/) API. + +See the [sywac quickstart](http://sywac.io/docs/) and [config guide](http://sywac.io/docs/sync-config.html) for full usage. + +Example: + +``` +#!/usr/bin/env node +const prettyCLI = require('@tryghost/pretty-cli'); + + +prettyCLI + .command({ + flags: 'myTask [option]', + desc: 'Run myTask', + run: (argv) => { ... do something here } + }) + .parseAndExit(); +``` + +You can also grab a fresh instance of the api with `prettyCLI.Api.get()`. + +The style rules used are available at `prettyCLI.styles`. + +# Copyright & License + +Copyright (c) 2018 Ghost Foundation - Released under the [MIT license](LICENSE). diff --git a/ghost/pretty-cli/index.js b/ghost/pretty-cli/index.js new file mode 100644 index 0000000000..b1fd8b2b6f --- /dev/null +++ b/ghost/pretty-cli/index.js @@ -0,0 +1 @@ +module.exports = require('./pretty-cli'); diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json new file mode 100644 index 0000000000..a168925213 --- /dev/null +++ b/ghost/pretty-cli/package.json @@ -0,0 +1,27 @@ +{ + "name": "@tryghost/pretty-cli", + "version": "0.0.0", + "description": "A mini-module to style a sywac instance in a standard way", + "repository": "https://github.com/TryGhost/slimer/tree/master/packages/pretty-cli", + "author": "Ghost Foundation", + "license": "MIT", + "main": "index.js", + "scripts": { + "dev": "echo \"Implement me!\"", + "test": "NODE_ENV=testing mocha ./test/**/*.test.js", + "lint": "eslint . --ext .js --cache", + "posttest": "yarn lint" + }, + "publishConfig": { + "access": "public" + }, + "devDependencies": { + "mocha": "5.2.0", + "should": "13.2.3", + "sinon": "6.3.4" + }, + "dependencies": { + "chalk": "^2.4.1", + "sywac": "^1.2.1" + } +} diff --git a/ghost/pretty-cli/pretty-cli.js b/ghost/pretty-cli/pretty-cli.js new file mode 100644 index 0000000000..80063c3fc6 --- /dev/null +++ b/ghost/pretty-cli/pretty-cli.js @@ -0,0 +1,27 @@ +const Api = require('sywac/api'); +const styles = require('./styles'); + +/** + * Pretty CLI + * + * A mini-module to style a sywac instance in a standard way + */ + +// Exports a pre-configured version of sywac +module.exports = Api.get() +// Use help & version with short forms AND +// group them into a Global Options group to keep them separate from per-command options + .help('-h, --help', {group: 'Global Options:'}) + .version('-v, --version', {group: 'Global Options:'}) + // Load our style rules + .style(styles) + // Add some padding at the end + .epilogue(' ') + // If no command is passed, output the help menu + .showHelpByDefault(); + +// Expose a clean version, just in case +module.exports.Api = Api; + +// Export the styles +module.exports.styles = styles; diff --git a/ghost/pretty-cli/styles.js b/ghost/pretty-cli/styles.js new file mode 100644 index 0000000000..f7204c5e88 --- /dev/null +++ b/ghost/pretty-cli/styles.js @@ -0,0 +1,21 @@ +const chalk = require('chalk'); + +module.exports = { + // Usage: script [options] etc + usagePrefix: (str) => { + return chalk.yellow(str.slice(0, 6)) + '\n ' + str.slice(7); + }, + // Options: Arguments: etc + group: str => chalk.yellow(str), + // --help etc + flags: str => chalk.green(str), + // [required] [boolean] etc + hints: str => chalk.dim(str), + // Use different style when a type is invalid + groupError: str => chalk.red(str), + flagsError: str => chalk.red(str), + descError: str => chalk.yellow(str), + hintsError: str => chalk.red(str), + // style error messages + messages: str => chalk.red(str) +}; diff --git a/ghost/pretty-cli/test/.eslintrc.js b/ghost/pretty-cli/test/.eslintrc.js new file mode 100644 index 0000000000..edb3308632 --- /dev/null +++ b/ghost/pretty-cli/test/.eslintrc.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: ['ghost'], + extends: [ + 'plugin:ghost/test', + ] +}; diff --git a/ghost/pretty-cli/test/pretty-cli.test.js b/ghost/pretty-cli/test/pretty-cli.test.js new file mode 100644 index 0000000000..fb0b959a53 --- /dev/null +++ b/ghost/pretty-cli/test/pretty-cli.test.js @@ -0,0 +1,32 @@ +// Switch these lines once there are useful utils +// const testUtils = require('./utils'); +require('./utils'); + +const prettyCLI = require('../pretty-cli'); + +// Check the API is as we depend on in other modules; +describe('API', function () { + it('Exposes styled-sywac, styles & the sywac API', function () { + // Detect a basic prestyled sywac instance + prettyCLI.should.be.an.Object().with.property('types'); + prettyCLI.parseAndExit.should.be.a.Function(); + + // Detect the basic sywac Api + prettyCLI.Api.should.be.a.Function(); + prettyCLI.Api.get.should.be.a.Function(); + + // Detect style rules + prettyCLI.styles.should.be.an.Object(); + prettyCLI.styles.should.have.properties([ + 'usagePrefix', + 'group', + 'flags', + 'hints', + 'groupError', + 'flagsError', + 'descError', + 'hintsError', + 'messages' + ]); + }); +}); diff --git a/ghost/pretty-cli/test/utils/assertions.js b/ghost/pretty-cli/test/utils/assertions.js new file mode 100644 index 0000000000..7364ee8aa1 --- /dev/null +++ b/ghost/pretty-cli/test/utils/assertions.js @@ -0,0 +1,11 @@ +/** + * Custom Should Assertions + * + * Add any custom assertions to this file. + */ + +// Example Assertion +// should.Assertion.add('ExampleAssertion', function () { +// this.params = {operator: 'to be a valid Example Assertion'}; +// this.obj.should.be.an.Object; +// }); diff --git a/ghost/pretty-cli/test/utils/index.js b/ghost/pretty-cli/test/utils/index.js new file mode 100644 index 0000000000..0d67d86ff8 --- /dev/null +++ b/ghost/pretty-cli/test/utils/index.js @@ -0,0 +1,11 @@ +/** + * Test Utilities + * + * Shared utils for writing tests + */ + +// Require overrides - these add globals for tests +require('./overrides'); + +// Require assertions - adds custom should assertions +require('./assertions'); diff --git a/ghost/pretty-cli/test/utils/overrides.js b/ghost/pretty-cli/test/utils/overrides.js new file mode 100644 index 0000000000..90203424ee --- /dev/null +++ b/ghost/pretty-cli/test/utils/overrides.js @@ -0,0 +1,10 @@ +// This file is required before any test is run + +// Taken from the should wiki, this is how to make should global +// Should is a global in our eslint test config +global.should = require('should').noConflict(); +should.extend(); + +// Sinon is a simple case +// Sinon is a global in our eslint test config +global.sinon = require('sinon'); From b305b8582cd6987c2ab292b48113c78e5e349374 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Fri, 21 Sep 2018 13:21:25 +0100 Subject: [PATCH 02/18] Published new versions - @tryghost/pretty-cli@1.0.0 --- ghost/pretty-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json index a168925213..2760f4c4fe 100644 --- a/ghost/pretty-cli/package.json +++ b/ghost/pretty-cli/package.json @@ -1,6 +1,6 @@ { "name": "@tryghost/pretty-cli", - "version": "0.0.0", + "version": "1.0.0", "description": "A mini-module to style a sywac instance in a standard way", "repository": "https://github.com/TryGhost/slimer/tree/master/packages/pretty-cli", "author": "Ghost Foundation", From c52b095955f9119251fab887e8a019c6b5d92a7e Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Fri, 21 Sep 2018 13:45:33 +0100 Subject: [PATCH 03/18] =?UTF-8?q?=F0=9F=93=96=20Updated=20READMEs=20with?= =?UTF-8?q?=20more=20clarity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Getting used to developing in the monorepo structure - Add more instructions that are relevant, push people to the top level repo - Make READMEs as consistent as possible - PROFIT! --- ghost/pretty-cli/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ghost/pretty-cli/README.md b/ghost/pretty-cli/README.md index 4ee285cb4f..7ba67d1af3 100644 --- a/ghost/pretty-cli/README.md +++ b/ghost/pretty-cli/README.md @@ -36,6 +36,11 @@ You can also grab a fresh instance of the api with `prettyCLI.Api.get()`. The style rules used are available at `prettyCLI.styles`. +## Test + +- `yarn lint` run just eslint +- `yarn test` run lint && tests + # Copyright & License Copyright (c) 2018 Ghost Foundation - Released under the [MIT license](LICENSE). From 8c1b5cd38312506efb79a4375bf954fdd9e9c4f9 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Fri, 21 Sep 2018 14:15:45 +0100 Subject: [PATCH 04/18] Published new versions - generator-slimer@0.0.2 - @tryghost/pretty-cli@1.0.1 - @tryghost/slimer-cli@0.0.2 - @tryghost/slimer@0.0.2 --- ghost/pretty-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json index 2760f4c4fe..81d3cd11b5 100644 --- a/ghost/pretty-cli/package.json +++ b/ghost/pretty-cli/package.json @@ -1,6 +1,6 @@ { "name": "@tryghost/pretty-cli", - "version": "1.0.0", + "version": "1.0.1", "description": "A mini-module to style a sywac instance in a standard way", "repository": "https://github.com/TryGhost/slimer/tree/master/packages/pretty-cli", "author": "Ghost Foundation", From e7bc545b36beceb1bcee16734cb2e98d197182bb Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Fri, 28 Sep 2018 15:25:45 +0100 Subject: [PATCH 05/18] =?UTF-8?q?=E2=9C=A8=20Add=20support=20for=20public?= =?UTF-8?q?=20vs=20private?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Projects can be public or private -> they are either oss or not. - With flags like this, there is no default. We either want to pass a flag or be prompted later if we forget - To achieve this: added a custom sywac type of Switch, that is able to handle this concept - We may want to change this to a proper boolean that defaults to true - That would be easier, and possibly more sensible for the public tool --- ghost/pretty-cli/pretty-cli.js | 1 - 1 file changed, 1 deletion(-) diff --git a/ghost/pretty-cli/pretty-cli.js b/ghost/pretty-cli/pretty-cli.js index 80063c3fc6..92c08d7da9 100644 --- a/ghost/pretty-cli/pretty-cli.js +++ b/ghost/pretty-cli/pretty-cli.js @@ -1,6 +1,5 @@ const Api = require('sywac/api'); const styles = require('./styles'); - /** * Pretty CLI * From e80f4e93f2b1fd69fd12cb1a277c03e05e78cbfc Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Mon, 1 Oct 2018 12:01:30 +0100 Subject: [PATCH 06/18] Published new versions - @tryghost/generator-slimer@1.0.0 - @tryghost/pretty-cli@1.0.2 - @tryghost/slimer-cli@0.1.0 - @tryghost/slimer@0.1.0 --- ghost/pretty-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json index 81d3cd11b5..ca2230a371 100644 --- a/ghost/pretty-cli/package.json +++ b/ghost/pretty-cli/package.json @@ -1,6 +1,6 @@ { "name": "@tryghost/pretty-cli", - "version": "1.0.1", + "version": "1.0.2", "description": "A mini-module to style a sywac instance in a standard way", "repository": "https://github.com/TryGhost/slimer/tree/master/packages/pretty-cli", "author": "Ghost Foundation", From dfe1610a475c0750efc7aae42b3079df4ab69438 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Thu, 4 Oct 2018 13:30:59 +0100 Subject: [PATCH 07/18] =?UTF-8?q?=F0=9F=8E=A8=20Move=20Slimer=20UI=20into?= =?UTF-8?q?=20Pretty=20CLI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - We'll want these log utils in other cli tools --- ghost/pretty-cli/pretty-cli.js | 4 ++++ ghost/pretty-cli/ui.js | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 ghost/pretty-cli/ui.js diff --git a/ghost/pretty-cli/pretty-cli.js b/ghost/pretty-cli/pretty-cli.js index 92c08d7da9..7811943277 100644 --- a/ghost/pretty-cli/pretty-cli.js +++ b/ghost/pretty-cli/pretty-cli.js @@ -1,5 +1,6 @@ const Api = require('sywac/api'); const styles = require('./styles'); +const ui = require('./ui'); /** * Pretty CLI * @@ -24,3 +25,6 @@ module.exports.Api = Api; // Export the styles module.exports.styles = styles; + +// Export our ui tools +module.exports.ui = ui; diff --git a/ghost/pretty-cli/ui.js b/ghost/pretty-cli/ui.js new file mode 100644 index 0000000000..90014a225d --- /dev/null +++ b/ghost/pretty-cli/ui.js @@ -0,0 +1,15 @@ +const chalk = require('chalk'); +const log = (...args) => console.log(...args); // eslint-disable-line no-console + +module.exports.log = log; +module.exports.log.error = (...args) => { + log(chalk.red('error'), ...args); +}; + +module.exports.log.info = (...args) => { + log(chalk.cyan('info'), ...args); +}; + +module.exports.log.ok = (...args) => { + log(chalk.green('ok'), ...args); +}; From 8bbfaf578ca226013ea7bf407dc69dfff50df53a Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Thu, 4 Oct 2018 13:37:38 +0100 Subject: [PATCH 08/18] Published new versions - @tryghost/generator-slimer@1.0.6 - @tryghost/pretty-cli@1.1.0 - @tryghost/slimer-cli@0.1.7 - @tryghost/slimer@0.2.0 --- ghost/pretty-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json index ca2230a371..bd39ec71fb 100644 --- a/ghost/pretty-cli/package.json +++ b/ghost/pretty-cli/package.json @@ -1,6 +1,6 @@ { "name": "@tryghost/pretty-cli", - "version": "1.0.2", + "version": "1.1.0", "description": "A mini-module to style a sywac instance in a standard way", "repository": "https://github.com/TryGhost/slimer/tree/master/packages/pretty-cli", "author": "Ghost Foundation", From 45763f92678d09d1f28bd0c144fd00f7830b2b10 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Thu, 4 Oct 2018 14:45:02 +0100 Subject: [PATCH 09/18] =?UTF-8?q?=F0=9F=93=96=20Update=20all=20README.md?= =?UTF-8?q?=20files=20to=20use=20full=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - We don't use aliases in docs, to be as clear as possible --- ghost/pretty-cli/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghost/pretty-cli/README.md b/ghost/pretty-cli/README.md index 7ba67d1af3..e8473b10ba 100644 --- a/ghost/pretty-cli/README.md +++ b/ghost/pretty-cli/README.md @@ -4,7 +4,7 @@ A mini-module to style a [sywac](http://sywac.io/) instance in a standard way ## Install -Either: `npm i @tryghost/pretty-cli --save` +Either: `npm install @tryghost/pretty-cli --save` Or: `yarn add @tryghost/pretty-cli` @@ -12,7 +12,7 @@ Or: `yarn add @tryghost/pretty-cli` E.g. `const prettyCLI = require('@tryghost/pretty-cli');` -`prettyCLI` is a pre-styled instance of the [sywac](http://sywac.io/) API. +`prettyCLI` is a pre-styled instance of the [sywac](http://sywac.io/) API. See the [sywac quickstart](http://sywac.io/docs/) and [config guide](http://sywac.io/docs/sync-config.html) for full usage. From d715596b5096a9051d63ec9a45a06a7fe7195eb8 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Thu, 4 Oct 2018 20:14:39 +0100 Subject: [PATCH 10/18] Published new versions - @tryghost/generator-slimer@1.0.7 - @tryghost/pretty-cli@1.1.1 - @tryghost/slimer-cli@0.1.8 - @tryghost/slimer@0.2.1 --- ghost/pretty-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json index bd39ec71fb..63b3a41e9b 100644 --- a/ghost/pretty-cli/package.json +++ b/ghost/pretty-cli/package.json @@ -1,6 +1,6 @@ { "name": "@tryghost/pretty-cli", - "version": "1.1.0", + "version": "1.1.1", "description": "A mini-module to style a sywac instance in a standard way", "repository": "https://github.com/TryGhost/slimer/tree/master/packages/pretty-cli", "author": "Ghost Foundation", From 66f1ddcbe96623a9653137f91a871191ec45bc2f Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Thu, 29 Nov 2018 16:00:18 +0000 Subject: [PATCH 11/18] =?UTF-8?q?=F0=9F=8E=A8=20Update=20to=20use=20files?= =?UTF-8?q?=20array=20in=20package.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - run `slimer fix package.json` to add a files array everywhere - manually update slimer-cli to have a files array for bin - manually update slimer to include commands or else this will break!! - update pretty-cli to use our standard /lib/ pattern - this means we only publish what we need to npm, and keeps things cleaner and safer --- ghost/pretty-cli/index.js | 2 +- ghost/pretty-cli/{ => lib}/pretty-cli.js | 0 ghost/pretty-cli/{ => lib}/styles.js | 0 ghost/pretty-cli/{ => lib}/ui.js | 0 ghost/pretty-cli/package.json | 4 ++++ ghost/pretty-cli/test/pretty-cli.test.js | 2 +- 6 files changed, 6 insertions(+), 2 deletions(-) rename ghost/pretty-cli/{ => lib}/pretty-cli.js (100%) rename ghost/pretty-cli/{ => lib}/styles.js (100%) rename ghost/pretty-cli/{ => lib}/ui.js (100%) diff --git a/ghost/pretty-cli/index.js b/ghost/pretty-cli/index.js index b1fd8b2b6f..e9fd56a9f9 100644 --- a/ghost/pretty-cli/index.js +++ b/ghost/pretty-cli/index.js @@ -1 +1 @@ -module.exports = require('./pretty-cli'); +module.exports = require('./lib/pretty-cli'); diff --git a/ghost/pretty-cli/pretty-cli.js b/ghost/pretty-cli/lib/pretty-cli.js similarity index 100% rename from ghost/pretty-cli/pretty-cli.js rename to ghost/pretty-cli/lib/pretty-cli.js diff --git a/ghost/pretty-cli/styles.js b/ghost/pretty-cli/lib/styles.js similarity index 100% rename from ghost/pretty-cli/styles.js rename to ghost/pretty-cli/lib/styles.js diff --git a/ghost/pretty-cli/ui.js b/ghost/pretty-cli/lib/ui.js similarity index 100% rename from ghost/pretty-cli/ui.js rename to ghost/pretty-cli/lib/ui.js diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json index 63b3a41e9b..8c1ec25fbd 100644 --- a/ghost/pretty-cli/package.json +++ b/ghost/pretty-cli/package.json @@ -12,6 +12,10 @@ "lint": "eslint . --ext .js --cache", "posttest": "yarn lint" }, + "files": [ + "index.js", + "lib" + ], "publishConfig": { "access": "public" }, diff --git a/ghost/pretty-cli/test/pretty-cli.test.js b/ghost/pretty-cli/test/pretty-cli.test.js index fb0b959a53..e303cde15a 100644 --- a/ghost/pretty-cli/test/pretty-cli.test.js +++ b/ghost/pretty-cli/test/pretty-cli.test.js @@ -2,7 +2,7 @@ // const testUtils = require('./utils'); require('./utils'); -const prettyCLI = require('../pretty-cli'); +const prettyCLI = require('../lib/pretty-cli'); // Check the API is as we depend on in other modules; describe('API', function () { From 2315781eb73e9f882a0512c3c105abe257789b85 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Thu, 29 Nov 2018 16:06:15 +0000 Subject: [PATCH 12/18] Published new versions - @tryghost/pretty-cli@1.1.2 - @tryghost/slimer-cli@0.2.1 - @tryghost/slimer@0.3.1 --- ghost/pretty-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json index 8c1ec25fbd..931a825dcd 100644 --- a/ghost/pretty-cli/package.json +++ b/ghost/pretty-cli/package.json @@ -1,6 +1,6 @@ { "name": "@tryghost/pretty-cli", - "version": "1.1.1", + "version": "1.1.2", "description": "A mini-module to style a sywac instance in a standard way", "repository": "https://github.com/TryGhost/slimer/tree/master/packages/pretty-cli", "author": "Ghost Foundation", From 50e83faccd1c8d3d13bfaaee16848aeb600b748c Mon Sep 17 00:00:00 2001 From: John O'Nolan Date: Tue, 1 Jan 2019 14:27:50 +0000 Subject: [PATCH 13/18] 2019 --- ghost/pretty-cli/LICENSE | 2 +- ghost/pretty-cli/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ghost/pretty-cli/LICENSE b/ghost/pretty-cli/LICENSE index 97c52a346d..e511320823 100644 --- a/ghost/pretty-cli/LICENSE +++ b/ghost/pretty-cli/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 Ghost Foundation +Copyright (c) 2018-2019 Ghost Foundation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/ghost/pretty-cli/README.md b/ghost/pretty-cli/README.md index e8473b10ba..060c09d506 100644 --- a/ghost/pretty-cli/README.md +++ b/ghost/pretty-cli/README.md @@ -43,4 +43,4 @@ The style rules used are available at `prettyCLI.styles`. # Copyright & License -Copyright (c) 2018 Ghost Foundation - Released under the [MIT license](LICENSE). +Copyright (c) 2018-2019 Ghost Foundation - Released under the [MIT license](LICENSE). From aa6971f82f15fcfbb40acdc21e964d1e86c66733 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Tue, 5 Mar 2019 16:15:41 +0000 Subject: [PATCH 14/18] Published new versions - @tryghost/generator-slimer@1.2.0 - @tryghost/pretty-cli@1.1.3 - @tryghost/slimer-cli@0.2.2 - @tryghost/slimer@0.4.0 --- ghost/pretty-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json index 931a825dcd..839b786924 100644 --- a/ghost/pretty-cli/package.json +++ b/ghost/pretty-cli/package.json @@ -1,6 +1,6 @@ { "name": "@tryghost/pretty-cli", - "version": "1.1.2", + "version": "1.1.3", "description": "A mini-module to style a sywac instance in a standard way", "repository": "https://github.com/TryGhost/slimer/tree/master/packages/pretty-cli", "author": "Ghost Foundation", From d7861f390ebc442b93cb6e7626ac8d7424c39ff2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 5 Mar 2019 16:54:19 +0000 Subject: [PATCH 15/18] Update dependency sinon to v6.3.5 (#5) --- ghost/pretty-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json index 839b786924..aa57ecd5e5 100644 --- a/ghost/pretty-cli/package.json +++ b/ghost/pretty-cli/package.json @@ -22,7 +22,7 @@ "devDependencies": { "mocha": "5.2.0", "should": "13.2.3", - "sinon": "6.3.4" + "sinon": "6.3.5" }, "dependencies": { "chalk": "^2.4.1", From 24898228b63414a28cd1405710790b163c9563fe Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 5 Mar 2019 17:22:08 +0000 Subject: [PATCH 16/18] Update dependency mocha to v6 (#8) --- ghost/pretty-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json index aa57ecd5e5..e88827156e 100644 --- a/ghost/pretty-cli/package.json +++ b/ghost/pretty-cli/package.json @@ -20,7 +20,7 @@ "access": "public" }, "devDependencies": { - "mocha": "5.2.0", + "mocha": "6.0.2", "should": "13.2.3", "sinon": "6.3.5" }, From d0b1331c51e4d8fc790636b4bf0c6bc5b69e9e4c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 5 Mar 2019 17:25:41 +0000 Subject: [PATCH 17/18] Update dependency sinon to v7 (#9) --- ghost/pretty-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json index e88827156e..10ad2e8489 100644 --- a/ghost/pretty-cli/package.json +++ b/ghost/pretty-cli/package.json @@ -22,7 +22,7 @@ "devDependencies": { "mocha": "6.0.2", "should": "13.2.3", - "sinon": "6.3.5" + "sinon": "7.2.7" }, "dependencies": { "chalk": "^2.4.1", From 2eb39e6c2bf4da95ce8c9de7da0f6376e024b48e Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Tue, 5 Mar 2019 17:27:33 +0000 Subject: [PATCH 18/18] Published new versions - @tryghost/generator-slimer@1.3.0 - @tryghost/pretty-cli@1.1.4 - @tryghost/slimer-cli@0.2.3 - @tryghost/slimer@0.5.0 --- ghost/pretty-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json index 10ad2e8489..21db9ef0b2 100644 --- a/ghost/pretty-cli/package.json +++ b/ghost/pretty-cli/package.json @@ -1,6 +1,6 @@ { "name": "@tryghost/pretty-cli", - "version": "1.1.3", + "version": "1.1.4", "description": "A mini-module to style a sywac instance in a standard way", "repository": "https://github.com/TryGhost/slimer/tree/master/packages/pretty-cli", "author": "Ghost Foundation",