Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 773 Bytes

README.md

File metadata and controls

44 lines (32 loc) · 773 Bytes

Installation

npm install jetbrains-js

Usage

Save a nodejs run configuration

import { WebstormRunConfiguration } from 'jetbrains-js';

WebstormRunConfiguration.saveNodeJsConfig(
{
    name: 'My Node.js project',
    args: ['--some-arg', '--another-arg'],
    filePath: '/path/to/my/project/index.js',
    workingDir: '/path/to/my/project',
    env: {
        NODE_ENV: 'development',
    }
})

Save an NPM run script configuration

import { WebstormRunConfiguration } from 'jetbrains-js';
WebstormRunConfiguration.saveNpmConfig(
    {
        packageJsonPath: '/path/to/my/project/package.json',
        env: {
            NODE_ENV: 'development',
        }
    }
)