create-webpage
Advanced tools
Comparing version 0.2.5 to 0.2.6
16
index.js
#!/usr/bin/env node | ||
const path = require('path'); | ||
const fs = require('fs-extra'); | ||
const inquirer = require('inquirer'); | ||
@@ -43,10 +42,13 @@ const inquirerQuestions = require(path.join(__dirname, 'src/inquirer-questions')); | ||
// write pages/readme.html from README.md | ||
const readmePath = user && repoName ? | ||
`https://raw.githubusercontent.com/${user}/${repoName}/main/README.md` : | ||
path.join(process.cwd(), 'README.md'); | ||
const readmeHtmlPath = path.join(answers.out_dir, 'pages', 'readme.html'); | ||
const readmeHtml = await getHTMLFromMarkdown(readmePath);; | ||
fs.outputFileSync(readmeHtmlPath, readmeHtml ); | ||
const readmePath = | ||
user && repoName ? `https://raw.githubusercontent.com/${user}/${repoName}/main/README.md` : | ||
path.existsSync(path.join(answers.out_dir, 'README.md')) ? path.join(answers.out_dir, 'README.md') : | ||
null; | ||
if (readmePath) { | ||
const readmeHtmlPath = path.join(answers.out_dir, 'pages', 'readme.html'); | ||
const readmeHtml = await getHTMLFromMarkdown(readmePath);; | ||
fs.outputFileSync(readmeHtmlPath, readmeHtml ); | ||
} | ||
console.log(`Done. To open pages run "cd ${answers.out_dir} && npx http-server -o"`); | ||
} |
{ | ||
"name": "create-webpage", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "VanillarJS Single Page Web Application Template Generator", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/elements-x/genpage", |
{ | ||
"name": "my-spa-site", | ||
"name": "{{name}}", | ||
"scripts": { | ||
@@ -4,0 +4,0 @@ "start": "bojagi serve", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1945534
2938
10