File: hlb.actual

package info (click to toggle)
golang-github-alecthomas-chroma 0.10.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports
  • size: 6,264 kB
  • sloc: python: 426; javascript: 79; sh: 32; makefile: 32
file content (29 lines) | stat: -rw-r--r-- 650 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Run `npm test` for the node project `left-pad`.
fs default() {
	npmRun leftPad fs { nodeModules leftPad; } "test"
}

fs leftPad() {
	git "https://github.com/left-pad/left-pad.git" "master"
}

fs npmInstall(fs src) {
	image "node:alpine" with option {
		resolve
	}
	run "npm install" with option {
		dir "/src"
		mount src "/src"
		# Name the mounted filesystem as nodeModules
		mount fs { scratch; } "/src/node_modules" as nodeModules
	}
}

fs npmRun(fs src, fs nodeModules, string script) {
	image "node:alpine"
	run string { format "npm run %s" script; } with option {
		dir "/src"
		mount src "/src"
		mount nodeModules "/src/node_modules"
	}
}