前后脚本
要为 package.json
的 "scripts"
部分中定义的任何脚本创建 "pre" 或 "post" 脚本,只需创建另一个具有匹配名称的脚本并将 "pre" 或 "post" 添加到它们的开头。
To create "pre" or "post" scripts for any scripts defined in the "scripts"
section of the package.json
, simply create another script with a matching name and add "pre" or "post" to the beginning of them.
{
"scripts": {
"precompress": "{{ executes BEFORE the `compress` script }}",
"compress": "{{ run command to compress files }}",
"postcompress": "{{ executes AFTER `compress` script }}"
}
}
iwsud4xeICY/M9YeOa0HojIOapfXOFaUo8xJrG9XU15CHbitqKWgZ1HhlmeidV8m27KxQJ0mqq48NPJvWJCv8NSc+Ml9fdSjWJ3WdZQ4V4+a0/U1W5cM6BJenTKPvFesl5wSaQcIfMVIWR5YMJfkenudE6ZbmBUfxpuWbSLmq3JEUhlhV4PXrhkqIgMHT9XGvn+eEx3kyhUJ0XvTJcbwVzFgobumZ4KDoJGRmlJQkrzI9TqNckzH+U6I8LaHdGqGWO/nONLMEqTnDBP2B8ViFw==