Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lerna-script-preset-wix-npm

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lerna-script-preset-wix-npm

preset for wix npm projects

  • 0.9.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

lerna-script-preset-wix-npm

A preset for wix npm-based repos that exposes following tasks:

  • clean - cleans all modules - node_modules, target, *.log...;
  • test - runs tests for all modules with incremental runs - does not run tests for unchanged modules;
  • pullreq - runs build for modules that have changed since origin/master;
  • prepush - syncs .nvmrc from root of repo to all modules, module versions, package.json docs/repo links, etc.
  • idea - idea task;
  • depcheck - depcheck;
  • deps:extraneous, deps:unmanaged, deps:latest, deps:sync - depcheck;

Usage

Given you have non-lerna project, install needed modules:

npm install --save-dev lerna lerna-script lerna-script-preset-wix-npm husky

init lerna:

node_modules/.bin/lerna init

add lerna.js to root of repo like:

module.exports = require('lerna-script-preset-wix-npm')();

setup your package.json

{
  "name": "aggregator",
  "private": true,
  "version": "1.0.0",
  "scripts": {
    "prepush": "lerna-script sync",
    "postinstall": "lerna bootstrap",
    "clean": "lerna-script clean",
    "test": "lerna-script test",
    "ls": "lerna-script",
    "idea": "lerna-script idea"
  },
  "devDependencies": {
    "husky": "^0.14.3",
    "lerna": "^2.0.0",
    "lerna-script": "latest",
    "lerna-script-preset-wix-npm": "latest"
  }
}

Then:

  • upon install of root module all modules will be bootstrapped;
  • prepush task will be executed by husky and all sync actions will be performed;
  • ls - run misc preset tasks like npm run ls deps:latest.

If preset almost works for you, you can reuse most of it but customize a selected task, like:

const preset = require('lerna-script-preset-wix-npm')();

function clean(log) {
  preset.clean(log).then(() => {
    //do your thing
  });
}

module.exports = {
  ...preset,
  clean
}

FAQs

Package last updated on 13 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc