pull-sparse
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

pull-sparse

从git/npm远程仓库中,指定要拉取的目录,而不是整个项目拉取

usage

import { gitPull, npmPull } from 'pull-sparse';

gitPull('you repository url', {
  outputDir: path.resolve('.'), // 默认为'.'
  targetDir: 'packages/project-a', // 默认为''
  renameTargetDir: '', // 默认不修改目录名
  // withDotGit: true, // 默认为false,即不附带.git目录
  branch: 'v1.0.0', // 默认为master
});

npmPull('you package name', {
  registryUrl: 'https://registry.npmjs.org/', // 默认为'https://registry.npmjs.org/'
  outputDir: '/Volumes/dev/demo-demo-demo', // 默认为'.'
  targetDir: 'src/utils', // 默认为''
  renameTargetDir: 'my-utils', // 默认不修改目录名
  tag: 'latest', // 默认为latest
});

/pull-sparse/

    Package Sidebar

    Install

    npm i pull-sparse

    Weekly Downloads

    3

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    9.97 kB

    Total Files

    5

    Last publish

    Collaborators

    • juln