@celo/dev-cli
Advanced tools
Comparing version 2.0.1 to 2.0.2
"use strict"; | ||
// tslint:disable no-implicit-dependencies | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const command_1 = require("@oclif/command"); | ||
const Config = require("@oclif/config"); | ||
const plugin_help_1 = require("@oclif/plugin-help"); | ||
const fs = require("fs-extra"); | ||
@@ -11,2 +8,5 @@ const _ = require("lodash"); | ||
const url_1 = require("url"); | ||
const command_1 = require("@oclif/command"); | ||
const Config = require("@oclif/config"); | ||
const plugin_help_1 = require("@oclif/plugin-help"); | ||
const util_1 = require("../util"); | ||
@@ -29,3 +29,3 @@ const normalize = require('normalize-package-data'); | ||
await config.runHook('init', { id: 'readme', argv: this.argv }); | ||
let readme = await fs.readFile('README.md', 'utf8'); | ||
// let readme = await fs.readFile('README.md', 'utf8') | ||
let commands = config.commands; | ||
@@ -37,8 +37,11 @@ commands = commands.filter(c => !c.hidden); | ||
commands = util_1.sortBy(commands, c => c.id); | ||
readme = this.replaceTag(readme, 'usage', this.usage(config)); | ||
readme = this.replaceTag(readme, 'commands', flags.multi ? this.multiCommands(config, commands, flags.dir) : this.commands(config, commands)); | ||
readme = this.replaceTag(readme, 'toc', this.toc(config, readme)); | ||
readme = readme.trimRight(); | ||
readme += '\n'; | ||
await fs.outputFile('README.md', readme); | ||
// readme = this.replaceTag(readme, 'usage', this.usage(config)) | ||
if (flags.multi) { | ||
this.multiCommands(config, commands, flags.dir); | ||
} | ||
// readme = this.replaceTag(readme, 'commands', flags.multi ? this.multiCommands(config, commands, flags.dir) : this.commands(config, commands)) | ||
// readme = this.replaceTag(readme, 'toc', this.toc(config, readme)) | ||
// readme = readme.trimRight() | ||
// readme += '\n' | ||
// await fs.outputFile('README.md', readme) | ||
} | ||
@@ -45,0 +48,0 @@ replaceTag(readme, tag, body) { |
@@ -1,1 +0,1 @@ | ||
{"version":"2.0.1","commands":{"manifest":{"id":"manifest","description":"generates plugin manifest json","pluginName":"@celo/dev-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"path to plugin","default":"."}]},"readme":{"id":"readme","description":"adds commands to README.md in current directory\nThe readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:\n# Usage\n<!-- usage -->\n# Commands\n<!-- commands -->\n\nCustomize the code URL prefix by setting oclif.repositoryPrefix in package.json.\n","pluginName":"@celo/dev-cli","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"output directory for multi docs","required":true,"default":"docs"},"multi":{"name":"multi","type":"boolean","description":"create a different markdown page for each topic","allowNo":false}},"args":[]}}} | ||
{"version":"2.0.2","commands":{"manifest":{"id":"manifest","description":"generates plugin manifest json","pluginName":"@celo/dev-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"path to plugin","default":"."}]},"readme":{"id":"readme","description":"adds commands to README.md in current directory\nThe readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:\n# Usage\n<!-- usage -->\n# Commands\n<!-- commands -->\n\nCustomize the code URL prefix by setting oclif.repositoryPrefix in package.json.\n","pluginName":"@celo/dev-cli","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"output directory for multi docs","required":true,"default":"docs"},"multi":{"name":"multi","type":"boolean","description":"create a different markdown page for each topic","allowNo":false}},"args":[]}}} |
{ | ||
"name": "@celo/dev-cli", | ||
"description": "Celo fork of @oclif/dev-cli", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"author": "Jeff Dickey @jdxcode", | ||
@@ -6,0 +6,0 @@ "bin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82082
898