File: make-deps.sh

package info (click to toggle)
node-lru-cache 10.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 944 kB
  • sloc: javascript: 546; sh: 90; makefile: 15
file content (39 lines) | stat: -rw-r--r-- 842 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash

deps=""
install=()
for name in $(cat impls.txt); do
  if [ "$name" = "lru-cache_CURRENT" ]; then
    continue
  fi
  dep=${name/_/@}
  deps="${deps}"'    "'"$name"'": "'"npm:$dep"$'",\n'
done

cat >package.json <<PJ
{
  "//": "Note: this file is programmatically generated, do not edit",
  "name": "bench-lru",
  "author": {
    "email": "dominic.tarr@gmail.com",
    "name": "Dominic Tarr",
    "url": "https://dominictarr.com"
  },
  "dependencies": {
    "lru-cache_CURRENT": "file:../",
${deps}    "tiny-worker": "^2.1.2",
    "ora": "^2.0.0",
    "keysort": "^1.0.2",
    "markdown-tables": "1.1",
    "retsu": "^3.0.1",
    "precise": "^1.1.0"
  },
  "scripts": {
    "benchmark": "NODE_ENV=production node index.js"
  },
  "license": "MIT"
}
PJ
rm package-lock.json
rm -rf node_modules
npm install "${install[@]}"