文件操作 - lifecycle-cmd.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/nodejs/npm/lib/lifecycle-cmd.js
编辑文件内容
// The implementation of commands that are just "run a script" // restart, start, stop, test const BaseCommand = require('./base-command.js') class LifecycleCmd extends BaseCommand { static usage = ['[-- <args>]'] static isShellout = true async exec (args, cb) { return this.npm.exec('run-script', [this.constructor.name, ...args]) } async execWorkspaces (args, filters, cb) { return this.npm.exec('run-script', [this.constructor.name, ...args]) } } module.exports = LifecycleCmd
修改文件时间
将文件时间修改为当前时间的前一年
删除文件