🚧 Added verdaccio as mock local registry
This commit is contained in:
parent
d5ff7ce9d9
commit
daf65326ae
104 changed files with 1325 additions and 164 deletions
|
@ -111,6 +111,11 @@ function keywords(pkg, config, type) {
|
|||
*/
|
||||
function scripts(pkg, config, type) {
|
||||
let runScripts = {};
|
||||
for (let key of Object.keys(config.scripts._)) {
|
||||
runScripts[key] = Mustache.render(config.scripts._[key], {
|
||||
name: pkg
|
||||
});
|
||||
}
|
||||
if (typeof config.scripts._types[type] !== "undefined") {
|
||||
for (let key of Object.keys(config.scripts._types[type])) {
|
||||
runScripts[key] = Mustache.render(config.scripts._types[type][key], {
|
||||
|
|
16
scripts/verdaccio.sh
Executable file
16
scripts/verdaccio.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
# This requires: yarn global add verdaccio
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
set -e
|
||||
|
||||
# start local registry
|
||||
tmp_registry_log=`mktemp`
|
||||
rm -rf $DIR/../.registry
|
||||
mkdir -p $DIR/../.registry
|
||||
cp $DIR/../config/verdaccio.yaml $DIR/../.registry/config.yaml
|
||||
cp $DIR/../media/logo-emblem-dark.svg $DIR/../node_modules/verdaccio/static/logo.svg
|
||||
sh -c "npx verdaccio -c $DIR/../.registry/config.yaml &>$tmp_registry_log"
|
||||
# wait for `verdaccio` to boot
|
||||
grep -q 'http address' <(tail -f $tmp_registry_log)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue