Skip to content

Commit 4d8aba9

Browse files
authored
Merge pull request #1 from git-stunts/feature/setup-docker-guard
chore: initial docker guard
2 parents 78fe9e1 + c4a5ed4 commit 4d8aba9

7 files changed

Lines changed: 1792 additions & 0 deletions

File tree

.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.git
2+
node_modules/
3+
jspm_packages/
4+
.bun
5+
.bun_modules/
6+
deno.lock
7+
.dist
8+
dist/
9+
build/
10+
.cache/
11+
logs
12+
*.log
13+
npm-debug.log*
14+
yarn-debug.log*
15+
yarn-error.log*
16+
lerna-debug.log*
17+
.pnpm-debug.log*
18+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
19+
pids
20+
*.pid
21+
*.seed
22+
*.pid.lock
23+
lib-cov
24+
coverage
25+
*.lcov
26+
.nyc_output
27+
.grunt
28+
.serverless
29+
.next
30+
.nuxt/
31+
.output/
32+
out/
33+
.parcel-cache
34+
.vscode/
35+
.idea/
36+
.DS_Store
37+
node_modules.bun/
38+
_test

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# @git-stunts/docker-guard
2+
3+
Tiny guard that ensures tests and benchmarks only execute inside Docker. Each git-stunts package can import the guard, then call `ensureDocker()` before any runtime work begins.
4+
5+
## Usage
6+
7+
```javascript
8+
import { ensureDocker } from '@git-stunts/docker-guard';
9+
10+
ensureDocker();
11+
```
12+
13+
You can also pass overrides for testing:
14+
15+
```javascript
16+
import { ensureDocker } from '@git-stunts/docker-guard';
17+
18+
ensureDocker({
19+
env: { GIT_STUNTS_DOCKER: '1' },
20+
logger: () => {},
21+
exit: () => {}
22+
});
23+
```

0 commit comments

Comments
 (0)