mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-21 05:59:35 +01:00
setup: add support for offline bootstrapping
This commit is contained in:
@@ -24,7 +24,7 @@ import parser from "yargs-parser";
|
|||||||
import glob from "fast-glob";
|
import glob from "fast-glob";
|
||||||
import Listr from "listr";
|
import Listr from "listr";
|
||||||
|
|
||||||
const args = parser(process.argv, { alias: { scope: ["s"] } });
|
const args = parser(process.argv, { alias: { scope: ["s"], offline: ["o"] } });
|
||||||
const IS_CI = process.env.CI;
|
const IS_CI = process.env.CI;
|
||||||
const scopes = {
|
const scopes = {
|
||||||
mobile: "apps/mobile",
|
mobile: "apps/mobile",
|
||||||
@@ -85,9 +85,9 @@ async function bootstrapPackages(dependencies) {
|
|||||||
function bootstrapPackage(cwd, outputs) {
|
function bootstrapPackage(cwd, outputs) {
|
||||||
return new Promise((resolve, reject) =>
|
return new Promise((resolve, reject) =>
|
||||||
exec(
|
exec(
|
||||||
`npm ${
|
`npm ${IS_CI ? "ci" : "i"} --legacy-peer-deps --no-audit --no-fund ${
|
||||||
IS_CI ? "ci" : "i"
|
args.offline ? "--offline" : "--prefer-offline"
|
||||||
} --legacy-peer-deps --no-audit --no-fund --prefer-offline --progress=false`,
|
} --progress=false`,
|
||||||
{
|
{
|
||||||
cwd,
|
cwd,
|
||||||
env: process.env,
|
env: process.env,
|
||||||
|
|||||||
Reference in New Issue
Block a user