# lerna-script-preset-wix-npm

> preset for wix npm projects

Latest version **0.9.3** (published 2018-08-13) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install lerna-script-preset-wix-npm
pnpm add lerna-script-preset-wix-npm
yarn add lerna-script-preset-wix-npm
bun add lerna-script-preset-wix-npm
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.9.3 |
| Published | 2018-08-13 |
| First published | 2017-09-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 163 |
| Author | Vilius Lukosius |
| Maintainers | viliusl |

## Links

- npm: https://www.npmjs.com/package/lerna-script-preset-wix-npm
- Repository: https://github.com/wix/lerna-script/tree/master/presets/wix-npm
- npm.io page: https://npm.io/package/lerna-script-preset-wix-npm

## Dependencies (5)

- [lerna-script-tasks-idea](https://npm.io/package/lerna-script-tasks-idea.md) ^0.9.3
- [lerna-script-tasks-npmfix](https://npm.io/package/lerna-script-tasks-npmfix.md) ^0.9.3
- [lerna-script-tasks-modules](https://npm.io/package/lerna-script-tasks-modules.md) ^0.9.3
- [lerna-script-tasks-depcheck](https://npm.io/package/lerna-script-tasks-depcheck.md) ^0.9.3
- [lerna-script-tasks-dependencies](https://npm.io/package/lerna-script-tasks-dependencies.md) ^0.9.3

## Recent versions

- 0.9.3 (latest) — 2018-08-13
- 0.9.2 — 2018-07-30
- 0.9.1 — 2018-06-05
- 0.9.0 — 2018-05-18
- 0.8.8 — 2018-05-16
- 0.8.7 — 2018-04-18
- 0.8.6 — 2018-04-06
- 0.8.5 — 2018-03-27
- 0.8.4 — 2018-03-22
- 0.8.3 — 2018-03-02
- 0.8.2 — 2018-02-27
- 0.8.0 — 2018-02-23
- 0.7.0 — 2018-02-23
- 0.6.0 — 2018-01-03
- 0.5.8 — 2017-12-01
- … 7 more at https://npm.io/package/lerna-script-preset-wix-npm/versions

## README

# 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](../../tasks/idea);
 - depcheck - [depcheck](../../tasks/depcheck);
 - deps:extraneous, deps:unmanaged, deps:latest, deps:sync - [depcheck](../../tasks/depcheck); 

## Usage

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

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

init lerna:
```bash
node_modules/.bin/lerna init
```

add lerna.js to root of repo like:
```js
module.exports = require('lerna-script-preset-wix-npm')();
```

setup your package.json
```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:

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

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

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

---
_Source: https://npm.io/package/lerna-script-preset-wix-npm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
