6.46.8 • Published 5 days ago

@gasket/utils v6.46.8

Weekly downloads
41
License
MIT
Repository
github
Last release
5 days ago

@gasket/utils

Reusable utilities for Gasket internals

Installation

npm i @gasket/utils

Functions

tryRequire

Tries to require a module, but ignores if it is not found. If not found, result will be null.

const { tryRequire } = require('@gasket/utils');

let someConfig = tryRequire('../might/be/a/path/to/some/file');

if(!someConfig) {
  someConfig = require('./default-config')
}

applyEnvironmentOverrides

Normalize the config by applying any environment or local overrides.

runShellCommand

Promise friendly wrapper to running a shell command (eg: git, npm, ls).

  • runShellCommand(command[, args][, options])
const { runShellCommand } = require('@gasket/utils');

async function helloWorld() {
  await runShellCommand('echo', ['hello world']);
}

License

MIT

7.0.0-next.21

5 days ago

7.0.0-next.9

10 days ago

7.0.0-next.10

10 days ago

7.0.0-next.7

10 days ago

7.0.0-next.11

10 days ago

7.0.0-next.8

10 days ago

7.0.0-next.12

10 days ago

7.0.0-next.13

10 days ago

7.0.0-next.6

10 days ago

7.0.0-next.20

10 days ago

7.0.0-next.5

11 days ago

6.46.8

12 days ago

7.0.0-next.4

13 days ago

7.0.0-next.3

17 days ago

7.0.0-next.2

24 days ago

7.0.0-next.1

25 days ago

7.0.0-next.0

25 days ago

7.0.0-cli.7

2 months ago

7.0.0-cli.6

2 months ago

6.46.1-cli.0

2 months ago

7.0.0-cli.5

2 months ago

7.0.0-cli.4

2 months ago

7.0.0-cli.1

2 months ago

7.0.0-cli.0

2 months ago

7.0.0-cli.3

2 months ago

7.0.0-cli.2

2 months ago

6.46.3-cli.0

2 months ago

6.46.2

2 months ago

7.0.0-canary.1

2 months ago

6.46.2-esm.0

3 months ago

6.45.2

3 months ago

6.45.0

4 months ago

6.43.0

7 months ago

6.41.0

10 months ago

6.39.3

11 months ago

6.39.0

12 months ago

6.38.8

12 months ago

6.38.5

1 year ago

6.38.2

1 year ago

6.38.1

1 year ago

6.36.1

1 year ago

6.38.0

1 year ago

6.34.6

2 years ago

6.35.2

1 year ago

6.36.0

1 year ago

6.34.3

2 years ago

6.34.4

2 years ago

6.34.2

2 years ago

6.26.1

2 years ago

6.21.0

2 years ago

6.24.2

2 years ago

6.24.0

2 years ago

6.20.4

2 years ago

6.20.3

2 years ago

6.20.2

2 years ago

6.20.0

2 years ago

6.10.1

2 years ago

6.10.0

2 years ago

6.15.0

2 years ago

6.14.0

2 years ago

6.17.0

2 years ago

6.2.0

3 years ago

6.0.13

3 years ago

6.0.12

3 years ago

6.0.0

3 years ago

6.0.0-canary.13

3 years ago

6.0.0-canary.0

4 years ago

5.6.0

4 years ago

5.1.1

4 years ago

5.1.0

4 years ago

5.0.2

4 years ago

5.0.0

4 years ago

5.0.0-canary.4

4 years ago

5.0.0-canary.3

4 years ago

5.0.0-canary.2

4 years ago

5.0.0-canary.1

4 years ago

5.0.0-canary.0

4 years ago