diff --git a/meta.js b/meta.js index fb0508d..70a0472 100644 --- a/meta.js +++ b/meta.js @@ -38,11 +38,31 @@ module.exports = { logger.log("To get started:"); if (!data.inPlace) logger.log("cd " + data.destDirName); + + const logFiles = { + component: path.relative( + data.destDirName, + path.resolve(data.destDirName, 'src', data.name, data.name + '.vue') + ), + componentDoc: path.relative( + data.destDirName, + path.resolve(data.destDirName, 'src', data.name, data.name + '.md') + ), + usage: path.relative( + data.destDirName, + path.resolve(data.destDirName, 'docs/*.md') + ) + } logger.log("1. Install dependencies: npm install"); - logger.log("2. Write your component in src/Component.vue"); - logger.log("3. Write a demo in docs docs/Usage.md"); - logger.log("4. Access demo and docs with npm run serve"); - logger.log("5. Build with: npm run build"); - logger.log("6. Build docs with: npm run build:doc"); + logger.log("2. Write your component in " + logFiles.component); + logger.log( + "3. Write the component doc in " + + logFiles.componentDoc + + ' or in the component itself using jsdoc' + ); + logger.log("4. Write the demo and usage instructions in " + logFiles.usage); + logger.log("5. Access demo and docs with npm run serve"); + logger.log("6. Build with: npm run build"); + logger.log("7. Build docs with: npm run build:doc"); } }; diff --git a/template/docs/Introduction.md b/template/docs/Introduction.md index d598469..d024b8d 100644 --- a/template/docs/Introduction.md +++ b/template/docs/Introduction.md @@ -1 +1 @@ -> {{ description }}, below are all components created under src +> {{ description }}, below are the docs of every component created under src diff --git a/template/docs/UseCase1.md b/template/docs/UseCase1.md index 96acc7d..76db0ee 100644 --- a/template/docs/UseCase1.md +++ b/template/docs/UseCase1.md @@ -1,3 +1,3 @@ -Just a example contained in a single doc file +Just an example contained in a single doc file <{{ name }} text="Hello World!" style="color: red;"> diff --git a/template/src/Component/Component.md b/template/src/Component/Component.md index 54a01c8..060b76e 100644 --- a/template/src/Component/Component.md +++ b/template/src/Component/Component.md @@ -1,3 +1,3 @@ -Put here the general component usage instructions +Put here the {{ name }} component usage instructions <{{ name }} text="Hello World!">