1.2.8 • Published 2 years ago

pathsfilter v1.2.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

pathsfilter

CI/CD MIT typescript npm github

npm.io npm.io npm.io npm.io npm.io

table of contents

About

A library for nodejs to filter paths like a .gitignore, .dockerignore or .npmignore file.

Example

import {
    matchPathSelector,
    parsePathSelector,
} from "pathsfilter"

const pathSelectorScript = parsePathSelector(`
    *
    !test/*
    test/logs/*
    !**/keep
    **/nkeep
`)
const toFilter = [
    "qwe",
    "znhghngh.test",
    "keep",
    "nkeep",
    "test.asdd",
    "test/asdasd",
    "test/znhghngh.test",
    "test/test.asdd",
    "test/keep",
    "test/nkeep",
    "test/logs/asdasd",
    "test/logs/znhghngh.test",
    "test/logs/test.asdd",
    "test/logs/keep",
    "test/logs/nkeep",
]
const result = toFilter.filter(
    (v) => !matchPathSelector(v, pathSelectorScript)
)
/* this is the result:
result = [
  "keep",
  "test/asdasd",
  "test/znhghngh.test",
  "test/test.asdd",
  "test/keep",
  "test/logs/keep",
]
*/

npm scripts

The npm scripts are made for linux but can also work on mac and windows.

use

You can run npm scripts in the project folder like this:

npm run <scriptname>

Here is an example:

npm run test

base scripts

You can find all npm scripts in the package.json file. This is a list of the most important npm scripts:

  • test // test the app
  • build // build the app
  • exec // run the app
  • start // build and run the app

watch mode

Like this example you can run all npm scripts in watch mode:

npm run start:watch

contribution

    1. fork the project
    1. implement your idea
    1. create a pull/merge request
// please create seperated forks for different kind of featues/ideas/structure changes/implementations

cya ;3
by majo418

1.2.8

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.2

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago