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

lerna-script-tasks-idea

Package Overview
Dependencies
Maintainers
3
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lerna-script-tasks-idea

task for start that generates intellij project for repo

  • 1.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
increased by133.33%
Maintainers
3
Weekly downloads
 
Created
Source

lerna-script-tasks-idea

lerna-script task to generate WebStorm project for a Lerna managed project with hardcoded conventions:

  • mark node_modules as ignored so 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 run configurations for all modules.

Note: given this task generates WebStorm project files manually, you must close all instances of WebStorm before generating and open afterwards.

install

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

Usage

Add lerna-script launcher to package.json scripts:

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

Add export to lerna.js:

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

module.exports.idea = idea();

To generate WebStorm project run:

npm start idea

API

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

Returns a function that generates 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.

FAQs

Package last updated on 11 Apr 2021

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