Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docusaurus-init

Package Overview
Dependencies
Maintainers
3
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docusaurus-init - npm Package Compare versions

Comparing version 1.0.2 to 1.9.0

38

initialize.js

@@ -10,5 +10,5 @@ #!/usr/bin/env node

const shell = require("shelljs");
const chalk = require("chalk");
const fs = require("fs");
const shell = require('shelljs');
const chalk = require('chalk');
const fs = require('fs');

@@ -18,10 +18,10 @@ const CWD = process.cwd();

let useYarn = false;
if (shell.which("yarn")) {
if (shell.which('yarn')) {
useYarn = true;
}
if (fs.existsSync(CWD + "/website")) {
console.error(chalk.yellow("Website folder already exists.\n"));
if (fs.existsSync(`${CWD}/website`)) {
console.error(chalk.yellow('Website folder already exists.\n'));
console.log(
"In order for Docusaurus to get set up as your static site generator, you will need to remove any existing 'website' folder from your root directory. If you are migrating from another static site generator, you may want to move your old website folder to a different location."
"In order for Docusaurus to get set up as your static site generator, you will need to remove any existing 'website' folder from your root directory. If you are migrating from another static site generator, you may want to move your old website folder to a different location.",
);

@@ -33,30 +33,30 @@ process.exit(1);

shell.mkdir("website");
shell.mkdir('website');
console.log(chalk.green("Website folder created!\n"));
console.log(chalk.green('Website folder created!\n'));
shell.cd("website");
shell.cd('website');
console.log(
chalk.yellow("Installing latest version of Docusaurus in website.\n")
chalk.yellow('Installing latest version of Docusaurus in website.\n'),
);
const packageContent = { scripts: { examples: "docusaurus-examples" } };
const packageContent = {scripts: {examples: 'docusaurus-examples'}};
fs.writeFileSync(
CWD + "/website/package.json",
JSON.stringify(packageContent, null, 2) + "\n"
`${CWD}/website/package.json`,
`${JSON.stringify(packageContent, null, 2)}\n`,
);
if (useYarn) {
shell.exec("yarn add docusaurus --dev");
shell.exec('yarn add docusaurus --dev');
} else {
shell.exec("npm install docusaurus --save-dev");
shell.exec('npm install docusaurus --save-dev');
}
console.log(chalk.green("Docusaurus installed in website folder!\n"));
console.log(chalk.green('Docusaurus installed in website folder!\n'));
if (useYarn) {
shell.exec("yarn run examples");
shell.exec('yarn run examples');
} else {
shell.exec("npm run examples");
shell.exec('npm run examples');
}
{
"name": "docusaurus-init",
"description": "Initialization script for Docusaurus",
"version": "1.0.2",
"version": "1.9.0",
"license": "MIT",

@@ -6,0 +6,0 @@ "preferGlobal": true,

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