Socket
Socket
Sign inDemoInstall

create-webpage

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-webpage - npm Package Compare versions

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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc