首先,對不起我的英文。
當我在我的項目中添加grunt-castle時,我有一個問題,grunt-castle的一些依賴關係沒有安裝,因爲這些依賴關係包含在主package.json中,因此不會使用grunt-castle進行安裝。
我的解決方案是用一個小腳本在我的package.json中添加一段「腳本」來強制安裝依賴項。
例的package.json:
grunt-castle:未安裝模塊依賴關係
.....
"scripts": {
"install": "cd node_modules/grunt-castle && npm install"
}
...
這使得安裝咕嚕,城堡的所有依賴安裝項目的主要模塊之後。
有人有更好的解決方案?
在此先感謝