npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wecdev/webpack-system-operations

v5.99.8

Published

System operation collection for webpack build. You can attach any of these operations (run process, sleep, wait until) to any webpack hook with webpack-hook-attacher

Downloads

6

Readme

webpack-system-operations

System operation operation collection for webpack build. You can attach any of these operations (run process, sleep, wait until) to any webpack hook before, after and in the middle of the builds with webpack-hook-attacher

Install

npm install @wecdev/webpack-system-operations --save-dev

I know I can do better :)

If you have found bug or need an additional operation don't hesitate to contact me.

Copyright & Support

Copyright (c) 2022, Roland Szikora. You can support this package at https://www.patreon.com/rolandszik

Licensing

See LICENSE.txt

Use Operations

You can run a file operation:

  • onBuildStart (compilation hook)
  • onAfterPlugins (afterPlugins hook)
  • onCompile (watchRun hook)
  • onBuildEnd (afterEmit hook)
  • onBuildExit (done hook)

and more than 100 entry point:

  • Compiler Hooks
  • Compilation Hooks
  • ContextModuleFactory Hooks
  • JavascriptParser Hooks
  • NormalModuleFactory Hooks

in webpack or webpack-dev-server

such as

  • run process
  • wait until
  • sleep

Usage

You can use in typescript and javascript as well. The example is in typescript

Webpack.config.js:

Simple example:


let options: Options = new Options();
options.onBuildStart.addOperations(    
     new RunProcess({        
        commands: [
            {                
                execute: 'echo',
                args: ['Starting'],              
            }
        ]
    })
);   

options.onBuildEnd.addOperations(    
     new RunProcess({        
        commands: [
            {                
                execute: 'python',
                args: ['script.py'],               
            },
            {                
                execute: 'node',
                args: ['script.js'],               
            }
        ]
    }),
    new Sleep( {
        miliseconds: 5000
    }),
    new WaitUntil ({
        repeatCheckMiliseconds: 1000,
        condition: (): boolean => { return fs.pathExists('./anyFileName.txt'); }
    })  
); 

...
//somewhere in the webpack config
...
 plugins: [
    ...
    new WebpackHookAttacherPlugin(options);
    ...
]
...

Complex example:


import {
    WebpackHookAttacherPlugin,
    Options    
} from '@wecdev/webpack-hook-attacher';

public static getAppModuleWebpackHookAttacherPlugin(): WebpackHookAttacherPlugin {

  let options: Options = new Options();
  options.silent = false;
  
  
  //attach to afterEmit hook
  options.onBuildExit.addOperations(    
    new RunProcess({
        additionalName: `runProcess`,
        commands: [
            {
                processCreationType: ProcessCreationType.spawn,
                execute: 'npm.cmd',
                args: ['run', 'copy-files'],
                options: {
                    detached: true
                }
            },
            {
                processCreationType: ProcessCreationType.spawn,
                execute: 'npm.cmd',
                args: ['run', 'start-zipping'],
                options: {
                    detached: true
                }
            },
        ]
    }),
    new Sleep( {
        miliseconds: 5000
    }),
    new WaitUntil ({
        repeatCheckMiliseconds: 1000,
        condition: (): boolean => { return fs.pathExists('./anyFileName.txt'); }
    })         
  );
  
  

  let instance: WebpackHookAttacherPlugin = new WebpackHookAttacherPlugin(options);
  return instance;
}



...
//somewhere in the webpack config
...
 plugins: [
    ...
    getAppModuleWebpackHookAttacherPlugin()
    ...
]
...