@lihbr/module-docs
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "@lihbr/module-docs", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A demo global module used during my talk: \"An Introduction to Nuxt Global Modules\"", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,3 +6,3 @@ # nuxt-demo-global-modules | ||
- [📖 Nuxt Modules documentation](https://nuxtjs.org/docs/2.x/directory-structure/modules) | ||
- [👩🏫 Talk slides](https://lihbr.com) | ||
- [👩🏫 Talk resources](https://diapositiv.lihbr.com/talk/an-introduction-to-nuxt-global-modules) | ||
- [💐 More from Lucie](https://lihbr.com/?source=nuxt-demo-global-modules) | ||
@@ -9,0 +9,0 @@ |
@@ -35,10 +35,14 @@ import fetch from "node-fetch"; | ||
lines.push(chalk.blueBright("📚 Modules Docs:\n")); | ||
registeredModuleManifests.forEach(manifest => { | ||
lines.push( | ||
`${chalk.yellow(manifest.npm)} (${ | ||
manifest.category | ||
}): ${chalk.cyanBright(manifest.website)}` | ||
); | ||
}); | ||
lines.push("📚 Modules Docs:\n"); | ||
if (registeredModuleManifests.length === 0) { | ||
lines.push(chalk.blackBright("(no modules found)")); | ||
} else { | ||
registeredModuleManifests.forEach(manifest => { | ||
lines.push( | ||
`${chalk.yellow(manifest.npm)} (${ | ||
manifest.category | ||
}): ${chalk.cyanBright(manifest.website)}` | ||
); | ||
}); | ||
} | ||
lines.push(""); | ||
@@ -49,6 +53,6 @@ | ||
// 5. Print modules info at each Nuxt reload | ||
// 4. Print modules info at each Nuxt reload | ||
this.nuxt.hook("bundler:done", printModulesInfo); | ||
// 6. Print modules info once | ||
// 5. Print modules info once | ||
printModulesInfo(); | ||
@@ -55,0 +59,0 @@ } |
5347
79