運行g(shù)runt buddha報錯如下:
Running "buddha:dist" (buddha) task
Warning: testExistRegexMap[who].test is not a function Use --force to continue.
說這個檢測重復(fù)的代碼不是一個fun怎么辦呀,刪除
if(testExistRegexMap[who].test(originalFileContent)){
? ? ? ? ? return;
}
就可以運行了,但是可以重復(fù)在js文件里打出佛祖和圣獸
2018-03-14
通過我這樣的方法 ?就實現(xiàn)了 在同一文件下 只可以添加一個 神獸保佑/佛祖保佑 的注釋~~
2018-03-14
你在命令行里console.log(originalFileContent),就會發(fā)現(xiàn),他返回的值是一個佛祖圖樣也就是說originalFileContent = 00888800,而.test()的用法只能匹配 ' 00888800 ' ,這個''號決定了test能否匹配,所以老師的方式已經(jīng)不行了,采用其他方式去判斷是否繼續(xù)下一步吧。 我用的是
if(originalFileContent.split(';')[0].length > 0){
? ? ? ? ? return;
? ? ? ? }
2017-09-24
看看你的testExistRegexMap,準(zhǔn)確來說應(yīng)該是