New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mechanicalrock/node-config

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mechanicalrock/node-config

Mechanical Rock Node Package Config

0.1.0
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
Source

node-config

Mechanical Config for node.js packages

This package captures common configuration for how we configure node modules.

Installation

npm install --save-dev @mechanicalrock/node-config

Setup

Create the following in your new module:

jest.config.ci.js:

const base = require('@mechanicalrock/node-config').jest.config.ci;

const overrides = {
};

module.exports = Object.assign({}, base, overrides);

jest.config.integration.js:

const base = require('@mechanicalrock/node-config').jest.config.ci;

const overrides = {
};

module.exports = Object.assign({}, base, overrides);

jest.config.js:

const base = require('@mechanicalrock/node-config').jest.config.default;

const overrides = {
};

module.exports = Object.assign({}, base, overrides);

tsconfig.js:

const config = require('@mechanicalrock/node-config').tsconfig;

console.log(config);
require('fs').writeFileSync('tsconfig.json', JSON.stringify(config));

Add the following scripts to your package.json:

    "build": "npm run clean && npm run init && tsc",
    "build:watch": "nodemon --watch src --legacy-watch --ext ts --exec npm run build --",
    "clean": "rm -rf .build",
    "init": "node tsconfig.js && node tslint.js",
    "test": "jest",
    "test:watch": "jest --watch",
    "test:security": "snyk test",
    "test:security-monitor": "snyk monitor"

Keywords

nodejs

FAQs

Package last updated on 30 Oct 2019

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