Clone README when generating

This commit is contained in:
Sam Carlton 2020-11-17 12:43:06 -06:00
parent 643be6dc21
commit feded332a1
4 changed files with 6 additions and 4 deletions

1
.gitignore vendored
View file

@ -83,3 +83,4 @@ dist
# Other # Other
/app-list.json /app-list.json
/README-temp.md

View file

@ -55,7 +55,7 @@ const getTokenLinks = function ( childTokens ) {
export default async function () { export default async function () {
const readmeContent = await fs.readFile('./README.md', 'utf8') const readmeContent = await fs.readFile('./README-temp.md', 'utf8')
// console.log('readmeContent', readmeContent) // console.log('readmeContent', readmeContent)

View file

@ -2,7 +2,7 @@ import { promises as fs } from 'fs'
import path from 'path' import path from 'path'
import pkg from './package' import pkg from './package'
import buildAppList from './helpers/build-app-list' import buildAppList from './helpers/build-app-list.js'
const storeAppList = async function (builder) { const storeAppList = async function (builder) {

View file

@ -8,10 +8,11 @@
"dev": "nuxt", "dev": "nuxt",
"build": "nuxt build", "build": "nuxt build",
"start": "nuxt start", "start": "nuxt start",
"generate": "nuxt generate", "generate": "rm -f ./app-list.json && npm run clone-readme && nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .", "lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"lint:fix": "eslint --fix --ext .js,.vue --ignore-path .gitignore .", "lint:fix": "eslint --fix --ext .js,.vue --ignore-path .gitignore .",
"precommit": "npm run lint" "precommit": "npm run lint",
"clone-readme": "cp ./README.md README-temp.md"
}, },
"dependencies": { "dependencies": {
"@nuxtjs/sitemap": "^2.4.0", "@nuxtjs/sitemap": "^2.4.0",