Socket
Socket
Sign inDemoInstall

create-video

Package Overview
Dependencies
36
Maintainers
1
Versions
915
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    create-video


Version published
Weekly downloads
2.5K
increased by76.39%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.patchReadmeMd = void 0; const node_fs_1 = __importDefault(require("node:fs")); const node_path_1 = __importDefault(require("node:path")); const pkg_managers_1 = require("./pkg-managers"); const patchReadmeMd = (projectRoot, packageManager, template) => { const fileName = node_path_1.default.join(projectRoot, 'README.md'); const contents = node_fs_1.default.readFileSync(fileName, 'utf8'); const newContents = contents .split('\n') .map((c) => { if (c.startsWith('npm install') || c.startsWith('npm i')) { return (0, pkg_managers_1.getInstallCommand)(packageManager); } if (c.startsWith('npm start')) { return (0, pkg_managers_1.getDevCommand)(packageManager, template); } if (c.startsWith('npm run build')) { return (0, pkg_managers_1.getRenderCommand)(packageManager); } if (c.startsWith('npm run ')) { return (0, pkg_managers_1.getRunCommand)(packageManager) + c.replace('npm run', ''); } return c; }) .join('\n'); node_fs_1.default.writeFileSync(fileName, newContents); }; exports.patchReadmeMd = patchReadmeMd;

FAQs

Last updated on 27 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc