New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@valantic/webpack-dependency-hint

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@valantic/webpack-dependency-hint

A webpack plugin to output a reminder for checking the dependencies in the console.

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
2
-93.1%
Maintainers
4
Weekly downloads
 
Created
Source

webpack-dependency-hint

A Webpack plugin that delivers a console output when a dependency check is recommended. The amount of days till the message should appear can be configured per default it's set to 90 days. To handle the date format it uses https://day.js.org/. and the Console output gets styles by https://www.npmjs.com/package/chalk.

image

Documentation

Installation

npm i @valantic/webpack-dependency-hint --save-dev

Usage

// webpack.config.js
const DependencyHint = require('@valantic/webpack-dependency-hint');

module.exports = {
  // ... configuration settings here ...
  plugins: [
    new DependencyHint({
      lastUpdate: '01.01.2020',
    })
  ],
};

Options

NameTypeDefaultDescription
lastUpdate{String}""The date of the last update or check.
daysTillWarning{Number}90The amount of days till the warning should appear.
inputFormat{String}"DD.MM.YYYY"The input date format.
outputFormat{String}"DD.MM.YYYY"The output date format.
warningText{String}"Please consider your project manager to arrange a dependency update."The additional text that appears in the console.
compilerHook{String}"afterEnvironment"The webpack compiler hook (see https://webpack.js.org/api/compiler-hooks/#hooks)

Hints

In case you don't want to store the date manually in the webpack config you can add it to the package.json and import it to the webpack config.

{
  "name": "your-project",
  "version": "1.0.0",
  "description": "Your custom project",
  "lastDependencyUpdate": "01.01.2021"
}
// webpack.config.js
const DependencyHint = require('@valantic/webpack-dependency-hint');
const pkg = require('./package.json');

module.exports = {
  // ... configuration settings here ...
  plugins: [
    new DependencyHint({
      lastUpdate: pkg.lastDependencyUpdate,
    })
  ],
};

Keywords

webpack

FAQs

Package last updated on 29 Dec 2021

Related posts