GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Messageflow/clean: Quick clean with del

BranchesTags
Open more actions menu

Latest commit

 

History

23 Commits
23 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.jestrc.json
.jestrc.json
 
 
.npmignore
.npmignore
 
 
.npmrc
.npmrc
 
 
.travis.yml
.travis.yml
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTORS
CONTRIBUTORS
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
gulpfile.js
gulpfile.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
tslint.json
tslint.json
 
 
tslint.prod.json
tslint.prod.json
 
 

Repository files navigation

@messageflow/clean

Quick clean with del


NPM

Version Downloads MIT License Code of Conduct

Build Status Dependency Status NSP Status codecov Coverage Status

codebeat-badge codacy-badge

Yet another opinionated cleaning tool to reset a working directory by deleting files/ folders that are ignored by default via .gitignore.

Table of contents

  • Pre-requisites
  • Setup
    • Install
    • Usage
      • Node.js
      • Native ES modules or TypeScript
  • API Reference
    • IGNORE_PATH
    • clean([options])
  • License

Pre-requisites

  • Node.js >= 8.9.0
  • NPM >= 5.5.1 (NPM comes with Node.js so there is no need to install separately.)

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

IGNORE_PATH

.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])

  • options <Object> Optional configuration to delete files/ folders.
    • gitConfig <string> Optional path to .gitignore. Defaults to ./.gitignore.
    • path <string|string[]> Optional glob pattern(s) to delete files/ folders. Defaults to IGNORE_PATH.
    • options <Object> Optional configuration from the NPM package del. See del options.
  • returns: <Promise<string[]>> Promise which resolves with a list of deleted files/ folders.

License

MIT License © Rong Sen Ng

About

Quick clean with del

www.npmjs.com/package/@messageflow/clean

Topics

cleancleaningdeldelete

Resources

Readme
MIT license

Code of conduct

Code of conduct
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.