# lerna-script-tasks-idea

> task for start that generates intellij project for repo

Latest version **1.4.0** (published 2021-04-11) · BSD license · 0 weekly downloads

## Install

```sh
npm install lerna-script-tasks-idea
pnpm add lerna-script-tasks-idea
yarn add lerna-script-tasks-idea
bun add lerna-script-tasks-idea
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2021-04-11 |
| First published | 2017-08-22 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 26.5 KB |
| Known vulnerabilities | 0 (+12 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 163 |
| Author | vilius@wix.com |
| Maintainers | viliusl, hugebdu, hugebdu2 |

## Links

- npm: https://www.npmjs.com/package/lerna-script-tasks-idea
- Repository: https://github.com/wix/lerna-script
- Homepage: https://github.com/wix/lerna-script/tree/master/tasks/idea
- Issues: https://github.com/wix/lerna-script/issues
- npm.io page: https://npm.io/package/lerna-script-tasks-idea

## Dependencies (2)

- [shelljs](https://npm.io/package/shelljs.md) 0.8.4
- [handlebars](https://npm.io/package/handlebars.md) 4.7.6

## Recent versions

- 1.4.0 (latest) — 2021-04-11
- 1.3.3 — 2020-11-01
- 1.3.2 — 2020-05-24
- 1.3.1 — 2020-05-24
- 1.3.0 — 2020-05-14
- 1.2.1 — 2020-04-30
- 1.2.0 — 2020-02-18
- 1.1.2 — 2020-01-21
- 1.1.1 — 2019-09-16
- 1.1.0 — 2019-09-16
- 1.0.1-alpha.0 — 2019-08-29
- 1.0.0-0 — 2019-08-29
- 0.10.0 — 2019-08-28
- 0.9.6 — 2019-02-25
- 0.9.5 — 2018-12-12
- … 32 more at https://npm.io/package/lerna-script-tasks-idea/versions

## README

# lerna-script-tasks-idea

[lerna-script](../../lerna-script) task to generate [WebStorm](https://www.jetbrains.com/webstorm/) project for a [Lerna](https://lernajs.io/) managed project with hardcoded conventions:

- mark `node_modules` as ignored so [WebStorm](https://www.jetbrains.com/webstorm/) would not index those. Having >= 20 modules open with `node_modules` indexing pretty much kills it:/
- set source level to `es6`;
- mark `lib`, `src` as source rootps and `test`, `tests` as test roots;
- add [mocha](https://mochajs.org/) run configurations for all modules.

**Note:** given this task generates [WebStorm](https://www.jetbrains.com/webstorm/) project files manually, you must close all instances of [WebStorm](https://www.jetbrains.com/webstorm/) before generating and open afterwards.

## install

```bash
npm install --save-dev lerna-script-tasks-idea
```

## Usage

Add `lerna-script` launcher to `package.json` scripts:

```json
{
  "scripts": {
    "start": "lerna-script"
  }
}
```

Add export to `lerna.js`:

```js
const idea = require('lerna-script-tasks-idea');

module.exports.idea = idea();
```

To generate [WebStorm](https://www.jetbrains.com/webstorm/) project run:

```bash
npm start idea
```

# API

## ({[packages], mochaConfigurations: packageJson => [], excludePatterns, addRoot: boolean = false})(log): Promise

Returns a function that generates [WebStorm](https://www.jetbrains.com/webstorm/) for all modules in repo.

Parameters:

- packages - list of packages to generate idea project for or defaults to ones defined in `lerna.json`;
- mochaConfigurations - function, that, given packageJson object of a module returns a list of mocha configurations in a format:
  - name - configuration name;
  - environmentVariables - key/value pair of environment variables for configuration;
  - extraOptions - extra mocha options;
  - testKind - kind of test, ex. PATTERN;
  - testPattern - pattern expression.
- excludePatterns - array of patterns that will be set as the project exclude patterns. Files\Folders matching that pattern will be marked as "excluded" in Idea
- addRoot - when true, the `root.iml` file will be generated to make all non-modules visible in IDEA (_optional, defaults to false_)
- log - `npmlog` instance.

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