UNPKG

npm-submodules

Version:

Simple way to manage typescipt and angular2 submodules from one repository

27 lines (26 loc) 829 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const del = require('del'); const execa = require('execa'); function npmInstall({ skipCleanup, yarn }) { return yarn ? // if yarn [{ title: 'Clean install dependencies', task: () => execa('yarn', [skipCleanup ? '' : 'upgrade']) }] : [ { title: 'Node modules cleanup', task: () => del('node_modules'), skip: () => skipCleanup }, { // todo: maybe install only dev dependencies title: 'Installing dependencies', task: () => execa('npm', ['install']), skip: () => skipCleanup } ]; } exports.npmInstall = npmInstall;