zl程序教程

npm scripts

  • [NPM] List available npm scripts and support tab completion

    [NPM] List available npm scripts and support tab completion

    In this lesson we will look at different ways you can list the available npm scripts. Whether we want to pipe npm run through less or install an npm package such as completio

    日期 2023-06-12 10:48:40     
  • [NPM] Use package.json variables in npm scripts

    [NPM] Use package.json variables in npm scripts

    In this lesson we will show that you can leverage values that you already have provided in your package.json file such as the name and version keys. You may want to use these in your npm scripts as y

    日期 2023-06-12 10:48:40     
  • [NPM] Run a set of similar npm scripts with a wildcard

    [NPM] Run a set of similar npm scripts with a wildcard

    In this lesson we will run a set of scripts that are grouped together with a wildcard using the npm-run-all node package. Using this technique can help you simplify and organize your scripts.  

    日期 2023-06-12 10:48:40     
  • [NPM] Use a shorthand syntax for running multiple npm scripts with npm-run-all

    [NPM] Use a shorthand syntax for running multiple npm scripts with npm-run-all

    Running multiple scripts in series or in parallel can become very verbose. Using a tool such as npm-run-all can help reduce the amount of overhead you have to type in order to get the same behavior.

    日期 2023-06-12 10:48:40     
  • [NPM] Run npm scripts in series

    [NPM] Run npm scripts in series

    After creating several npm script it becomes useful to run multiple scripts back-to-back in series. This is a nice feature because you can enforce that one script needs to complete before starting an

    日期 2023-06-12 10:48:40     
  • [NPM] List available npm scripts and support tab completion

    [NPM] List available npm scripts and support tab completion

    In this lesson we will look at different ways you can list the available npm scripts. Whether we want to pipe npm run through less or install an npm package such as completio

    日期 2023-06-12 10:48:40     
  • [NPM] Run a set of similar npm scripts with a wildcard

    [NPM] Run a set of similar npm scripts with a wildcard

    In this lesson we will run a set of scripts that are grouped together with a wildcard using the npm-run-all node package. Using this technique can help you simplify and organize your scripts.  

    日期 2023-06-12 10:48:40     
  • [NPM] Run npm scripts when files change with onchange

    [NPM] Run npm scripts when files change with onchange

    In this lesson we will look at how we can setup our npm scripts to execute when the file system has changed. Some common examples of this are automatically linting your code, running unit tests, or u

    日期 2023-06-12 10:48:40     
  • [NPM] Pass arguments to npm scripts

    [NPM] Pass arguments to npm scripts

    Often times you’ll have variations that you’ll want to make to your npm scripts and repeating yourself is inefficient and verbose. Instead you can create a base script and pass arguments into it from

    日期 2023-06-12 10:48:40     
  • npm scripts的生命周期管理

    npm scripts的生命周期管理

    我们平时阅读一些开源项目,可能会发现有些项目的package.json里的scripts区域定义的脚本很复杂,令人眼花缭乱。 其实这些脚本是有规律可循的。让我们从最简单的一个例子开始学习。 新

    日期 2023-06-12 10:48:40