UNPKG

@randy.tarampi/install-dependencies

Version:

Builds node modules to a spectified path 📦

36 lines • 1.74 kB
#!/usr/bin/env node "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.installDependencies = void 0; const tslib_1 = require("tslib"); const sade_1 = tslib_1.__importDefault(require("sade")); const install_dependencies_1 = require("./install-dependencies"); Object.defineProperty(exports, "installDependencies", { enumerable: true, get: function () { return install_dependencies_1.installDependencies; } }); const pkg = require('../package.json'); // eslint-disable-line /** * @monorepo-utilities/install-dependencies 🧱 * @description installs package.json dependencies to a specificied paths * -------------------------------- * @summary Why? * When using various project managers, like yarn workspaces and lerna * there are drawbacks in the DX vs deployment experience of module installation * by manually providing a way to specifically install node_modules to a specified location * developors can enjoy module hoisting and local package referencing and not have to worry * about confusing nodule module folders when deploying un-bundled apps, node apps */ /** * installDependencies * @description the function that installs dependencies * -------------------------------- * @summary function * This function works on it's own to install dependencies asynchonously */ const prog = sade_1.default('install-dependencies'); prog .version(pkg.version) .command('run <config> <dest>') .describe("installs a package.json's dependencies to a specificied path") .example('run package.json dist') .action((config, dest) => install_dependencies_1.installDependencies({ config, debug: true, dest, process })); prog.parse(process.argv); //# sourceMappingURL=index.js.map