awesome-npm-scripts

授权协议 CC0-1.0 License
开发语言 JavaScript
所属分类 Web应用开发、 常用JavaScript包
软件类型 开源软件
地区 不详
投 递 者 澹台正业
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Awesome npm scripts

Everything awesome for using npm as a build tool.

You might also like awesome-npm.

Notice: I'm currently too busy to actively expand this list; therefore, I've decided to make this an OPEN Open Source Project. Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit.

Contents

Articles

Videos/Talks

Task Runners

Tools for running multiple commands or npm scripts in parallel or sequentially.

  • script-runner - Simple task runner with a terse syntax.
  • npm-run-all - Fully featured task runner.
  • redrun - Expand scripts from package.json to improve execution speed.

File Watchers

Tools to watch your source files and run a build command whenever any of the files change.

  • onchange - onchange <glob> -- <command>.
  • watch - watch <command> <directory>.

Dev Servers

  • http-server - Simple zero-configuration command-line http server.
  • live-server - Simple development http server with live reload capability.

Cross-platform Utilities

Utilities to perform common command-line tasks without worrying about cross-platform compatibility.

  • rimraf - Delete files or directories; like rm -rf.
  • del-cli - Safer file and folder deletion.
  • mkdirp - Create a directory, creating parent directories if needed; like mkdir -p.
  • cpr - cp -r for Node.js.
  • cpy-cli - File/directory copying/renaming.
  • copyfiles - Copy a list of files into a directory.
  • sync-files - rsync-like directory syncing with watch mode.
  • echo-cli - Cross-platform echo with JS escape sequence support.
  • clear-cli - Clear the terminal.
  • cross-env - Set environment variables for scripts, unix-style.
  • cross-os - Run platform-specific npm scripts.
  • ntee - Utility that reads from standard input and writes to standard output and files; like Unix tee.
  • catw - Print a file to stdout, with optional watch mode; sorta like Unix cat.

Utility Packs

  • shx - Collection of common Unix utilities implemented in Node.js; example usage: shx rm somefile.

Other Utilities

  • hashmark - Take contents of a file and output as new file with a hash in the name.
  • gzip-size-cli - Get the gzipped size of a file or stdin.
  • opn-cli - Open websites, files, executables, etc. with the user's preferred application.
  • headr - Add header / banner info to a file.
  • Bower files CLI - Get main bower files on the command line.
  • cli-error-notifier - Send native desktop notifications when npm scripts fail.

Miscellaneous

  • screwy - The npm scripts GUI.
  • Forrest - npm scripts desktop client.
  • run-npm - Run locally-installed node module executables. Useful for debugging npm scripts.
  • npm-quick-run - Quickly run npm scripts by prefix without typing the full name.
  • edit-script - Edit npm scripts from the command line without worrying about JSON escaping.
  • ntl - Interactive cli menu to list and run npm scripts.

Cross-platform Shell Reference

A quick reference of the shell operators & commands that work the same on Unix and Windows.

  • Use && to run commands in sequence. If a command fails, the script exits.
  • Use | to pipe the stdout of one command into the stdin of the next. (do-something | something else)
  • Use > to write the stdout of a command to a file. (do-something > file)
  • Use < to send the contents of a file to a command's stdin. (command < file)
  • Use cd <dir> to change the current working directory to <dir>. Note that cd alone prints the current working directory on windows, but changes the working directory to ~ on *nix.

npm run Reference

You can use npm run-script or npm run; they both do the same thing, but npm run is shorter.

  • Run just npm run to print a list of scripts.
  • Running npm run script (where script is the name of your script) will run prescript, script, and postscript; in that order.
    • You can't nest pre and post hooks (i.e. preprescript won't work).
  • You can pass arguments to your scripts by passing -- to npm run, followed by the arguments. Example: Given the script "mocha": "mocha", you can run npm run mocha -- --reporter xunit. This effectively runs mocha --reporter xunit.
  • Running npm test is the same as running npm run test. The same applies to npm start and npm stop.
  • You can run npm run <script> -s to silence the default npm output (useful for calling a script within another script).

Contributing

See CONTRIBUTING.md.

License

CC0

  •   NPM Scripts Part 2 Objectives and Outcomes In this exercise you will learn to build a distribution folder containing the files that can be deployed on a web server hosting your project. This distrib

  • 一、什么是 npm 脚本? npm 允许在package.json文件里面,使用scripts字段定义脚本命令。 { // ... "scripts": { "build": "node build.js" } } 上面代码是package.json文件的一个片段,里面的scripts字段是一个对象。它的每一个属性,对应一段脚本。比如,build命令对应的脚本是node b

  • Specifics of npm's package.json handling DESCRIPTION§ This document is all you need to know about what’s required in your package.json file. It must be actual JSON, not just a JavaScript object litera

  • by Colby Miller 通过Colby Miller 如何将React Native组件发布到NPM-比您想象的要容易 (How to publish a React Native component to NPM — it’s easier than you think) So you want to contribute to the open source community? Th

  • 本文来源于我在InfoQ中文站翻译的文章,原文地址是:http://www.infoq.com/cn/news/2016/02/earlgrey-ios-functional-ui-test Cory House是“Building Applications with React and Flux”与“Clean Code: Writing Code for Humans”的作者,同时也是Plur

  • 测试环境有一个需要SonarQube扫描的前端项目一直打包都是好好的,但是今天突然无法使用cnpm run build进行打包,上去服务器上面看看究竟报了什么样的错误。 既然本来打包的环境有问题,那么先干掉node_modules和package-lock.json再重新用cnpm install试试,得出如下结果。 [root@node6 yunlu-portals-sonar]# cnpm i

  • npm构建脚本 by Mohammed Ajmal Siddiqui 由Mohammed Ajmal Siddiqui NPM脚本简介 (Introduction to NPM Scripts) NPM scripts are among my favorite features of NPM. They are simple. They reduce the need for tools. He

 相关资料
  • Awesome npm Awesome npm resources and tips npm is a package manager for the JavaScript programming language and comes bundled in the Node.js runtime. Please read the contribution guidelines before con

  • Awesome Awesome Node.js A curated list of awesome lists that are about or related to Node.js. Inspired by the awesome list thing, going deeper down the rabbit hole. �� Meta stuff about this awesome li

  • Guidelines for Hacktoberfest 2021: About Hacktoberfest: Hacktoberfest is organised by DigitalOcean in partnership with Dev, Intel, DeepSource & Appwrite. It is a month-long celebration of open-source

  • A curated list of awesome things related to Vite.js This awesome list is for Vite 2.x and onward. Vite 1.x's list is archived. Resources Official Resources 文档 GitHub Repo Release Notes Vue 3 Docs Awes

  • Awesome Python 是一个资源整理集合,由 vinta 发起和维护。内容包括:Web框架、网络爬虫、网络内容提取、模板引擎、数据库、数据可视化、图片处理、文本处理、自然语言处理、机器学习、日志、代码分析等。 这个系列没有推荐 Python 书籍、经典博文、交互教程,所以另外推荐:《25本免费的Python电子书》、《学习Python编程的11个(教程)资源》、《PythonMonk:Py

  • Font Awesome 是一个图标工具包。其已经被重新设计并从头构建。除此之外,还增加了一些功能,比如 icon font ligature、SVG 框架、流行的前端库(如 React)的官方 NPM 包,以及对新 CDN 的访问。Font Awesome 已扩展至 7,865 个图标。