@messageflow/clean

Quick clean with del

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@messageflow/clean
000.0.66 years ago6 years agoMinified + gzip package size for @messageflow/clean in KB

Readme

@messageflow/clean

Quick clean with del




!NPMnodei-badgenodei-url
!Versionversion-badgeversion-url !Downloadsdownloads-badgedownloads-url !MIT Licensemit-license-badgemit-license-url !Code of Conductcoc-badgecoc-url
!Build Statustravis-badgetravis-url !Dependency Statusdaviddm-badgedaviddm-url !NSP Statusnsp-badgensp-url !codecovcodecov-badgecodecov-url !Coverage Statuscoveralls-badgecoveralls-url
!codebeat-badgecodebeat-url !codacy-badgecodacy-url
Yet another opinionated cleaning tool to reset a working directory by deleting files/ folders that are ignored by default via .gitignore.

Table of contents

- Install - Usage
- [Node.js](#nodejs)
- [Native ES modules or TypeScript](#native-es-modules-or-typescript)
- IGNOREPATH - clean(options)

Pre-requisites

Setup

Install

# Install via NPM
$ npm install --save @messageflow/clean

Usage

Node.js

const {
  clean,
  // IGNORE_PATH,
} = require('@messageflow/clean');

void async function main() {
  const d = await clean();

  console.log(d);
  // The output might vary as it depends on the files/ folders that have been actually deleted from your system.
  // [
  //   'coverage',
  //   'dist',
  //   'index.d.ts',
  //   'index.js',
  //   'json.d.ts',
  //   'node_modules',
  //   'test',
  // ]
}();

Native ES modules or TypeScript

// @ts-check

import {
  clean,
  // IGNORE_PATH,
} from '@messageflow/clean';

void async function main() {
  const d = await clean();

  console.log(d);
  // The output might vary as it depends on the files/ folders that have been actually deleted from your system.
  // [
  //   'coverage',
  //   'dist',
  //   'index.d.ts',
  //   'index.js',
  //   'json.d.ts',
  //   'node_modules',
  //   'test',
  // ]
}();

API Reference

IGNOREPATH

.build/,
.DS_Store,
.esm-cache,
.nyc_output,
.tmp/,
.vscode,
npm-debug.log*,
yarn-error.log*,
coverage*/,
dist*/,
node_modules/,
test*/,
**/*.d.ts*,
**/*.js,
**/*.jsx,
!gulpfile*.js,
!src/demo/*.*,
!src/json.d.ts,
!src/test*/,

clean(options)

- gitConfig <string
string-mdn-url> Optional path to .gitignore. Defaults to ./.gitignore. - path <stringstring-mdn-url|stringstring-mdn-url> Optional glob pattern(s) to delete files/ folders. Defaults to IGNOREPATHignore-path-url. - options <Objectobject-mdn-url> Optional configuration from the NPMnpm-url package deldel-url. See del optionsdel-options-url.

License

MIT License © Rong Sen Ng