Skip to content

NodeJS Run Configuration Producer for IntelliJ Platform 2017.1+ (IntelliJ IDEA, WebStorm)

Notifications You must be signed in to change notification settings

develar/ij-rc-producer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.idea/rc-producer.yml

NodeJS Run Configuration Producer for IntelliJ Platform (IntelliJ IDEA, WebStorm — 2017.1+).

This repository contains docs and sample configurations for various tools (e.g. Jest, Ava).

Want to share your config? Send a pull request.

Usage

Create file .idea/rc-producer.yml in your project root (where .idea is a IntelliJ Platform project configuration directory).

Sample files for: Jest

In most cases you just need to change files according to your needs.

screen shot 2016-12-06 at 11 20 40

Option object or list of option objects are expected on root level.

Example of option object list:

-
  files: ["test/src/**/*", "!**/helpers/**/*",]
-
  files: ["bar",]

Common Options

YAML allows you to avoid duplication — Merging Options.

You can override:

- &defaults
  files: ["test/src/**/*", "!**/helpers/**/*"]
  script: "node_modules/.bin/jest"
  scriptArgs: ["-i", "--env", "jest-environment-node-debug", &filePattern '/${fileNameWithoutExt}\.\w+$']
  rcName: "${fileNameWithoutExt}"
  beforeRun: typescript

-
  <<: *defaults
  lineRegExp: '^\s*(?:test|it)(?:\.\w+)?\("([^"'']+)'
  scriptArgs: ["-i", "--env", "jest-environment-node-debug", "-t", "${0regExp}", *filePattern]
  rcName: "${fileNameWithoutExt}.${0}"

Or move list of option objects to property rc:

defaults: &defaults
  files: ["test/src/**/*", "!**/helpers/**/*"]
  script: "node_modules/.bin/jest"
  beforeRun: typescript

rc:
  -
    <<: *defaults
    lineRegExp: '^\s*(?:test|it)(?:\.\w+)?\("([^"'']+)'
    scriptArgs: ["-i", "-t", "${0regExp}", "${fileNameWithoutExt}"]
    rcName: "${fileNameWithoutExt}.${0}"

  -
    <<: *defaults
    scriptArgs: ["-i", "${fileNameWithoutExt}"]
    rcName: "${fileNameWithoutExt}"

About

NodeJS Run Configuration Producer for IntelliJ Platform 2017.1+ (IntelliJ IDEA, WebStorm)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published