mirror of
https://github.com/primer/css.git
synced 2024-12-26 15:43:59 +03:00
replace chalk with colorette
This commit is contained in:
parent
f9a1946dee
commit
38aee6e7b5
@ -1,4 +1,4 @@
|
||||
const chalk = require("chalk")
|
||||
const {green, red, bold} = require("colorette")
|
||||
const fse = require("fs-extra")
|
||||
const path = require("path")
|
||||
const Generator = require("yeoman-generator")
|
||||
@ -37,7 +37,7 @@ module.exports = class PrimerModule extends Generator {
|
||||
if (this.options.module) {
|
||||
this.log(
|
||||
"Okay, let's get you started with %s...",
|
||||
chalk.green(this.options.module)
|
||||
green(this.options.module)
|
||||
)
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ module.exports = class PrimerModule extends Generator {
|
||||
}
|
||||
|
||||
writing() {
|
||||
this.log("creating: %s", chalk.green(this.basePath))
|
||||
this.log("creating: %s", green(this.basePath))
|
||||
|
||||
const data = {
|
||||
"dependencies": this.dependencies,
|
||||
@ -99,7 +99,7 @@ module.exports = class PrimerModule extends Generator {
|
||||
const debugData = Object.assign({}, data, {
|
||||
"dependencies": Object.keys(data.dependencies),
|
||||
})
|
||||
console.warn(chalk.green("data:"), JSON.stringify(debugData, null, " "))
|
||||
console.warn(green("data:"), JSON.stringify(debugData, null, " "))
|
||||
}
|
||||
|
||||
// for the index.scss import
|
||||
@ -130,7 +130,7 @@ module.exports = class PrimerModule extends Generator {
|
||||
this._addAsDependencyTo(pkg, dependent)
|
||||
})
|
||||
} else {
|
||||
this.log(chalk.red("No dependents!"), dependents)
|
||||
this.log(red("No dependents!"), dependents)
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ module.exports = class PrimerModule extends Generator {
|
||||
if (this.options.todo === true) {
|
||||
this.log(
|
||||
"\n📝 ",
|
||||
chalk.bold("Remember to fill in any remaining TODOs below:"),
|
||||
bold("Remember to fill in any remaining TODOs below:"),
|
||||
"\n"
|
||||
)
|
||||
this.spawnCommandSync("ack", ["TODO", this.basePath], {
|
||||
|
@ -1,4 +1,4 @@
|
||||
const chalk = require("chalk")
|
||||
const {yellow} = require("chalk")
|
||||
const fse = require("fs-extra")
|
||||
|
||||
const capitalize = require("./lib/capitalize")
|
||||
@ -91,7 +91,7 @@ module.exports = {
|
||||
prompt: {
|
||||
message: [
|
||||
"Describe your module in a single sentence.",
|
||||
chalk.yellow("(This will go into the package.json and README.md.)"),
|
||||
yellow("(This will go into the package.json and README.md.)"),
|
||||
].join("\n"),
|
||||
type: "input",
|
||||
default: "TODO: fill in this description later",
|
||||
@ -160,7 +160,7 @@ module.exports = {
|
||||
type: "input",
|
||||
message: [
|
||||
"Where can we find the docs?",
|
||||
chalk.yellow("(We'll read this file from the path you provide.)"),
|
||||
yellow("(We'll read this file from the path you provide.)"),
|
||||
].join("\n"),
|
||||
validate: (filePath) => {
|
||||
if (!filePath) {
|
||||
|
1239
tools/generator-primer-module/package-lock.json
generated
1239
tools/generator-primer-module/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@
|
||||
"watch": "npm run test -- --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^2.1.0",
|
||||
"colorette": "1.0.7",
|
||||
"primer-support": "4.6.1",
|
||||
"yeoman-generator": "^1.1.1"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user