【发布时间】:2015-03-15 16:54:17
【问题描述】:
我正在寻找一种使用 gulp 从 javascript 文件中删除所有 cmets 的方法。
例如,我有以下代码:
/***
* Comment 1 - This is my javascript header
* @desc comment header to be removed
* @params req, res
*/
(function() {
var helloworld = 'Hello World'; // Comment 2 - this is variable
/* Comment 3 - this is the printing */
console.log(helloworld);
})()
而我的预期结果是:
(function() {
var helloworld = 'Hello World';
console.log(helloworld);
})();
【问题讨论】:
标签: javascript gulp