2016-03-02 105 views
0

我對JavaScript和gulp非常陌生,我需要使用從GitHub獲取的使用gulp構建特定版本的外部庫。構建gulp子項目

假如庫位於.\chart.js\並且命令行構建命令看起來像gulp build --types=Line,那麼從gulp構建它的方法是什麼?

項目結構:

main_project\ 
    | chart.js\ - fetched from github 
    | | gulpfile.js - gulp builds library using this file 
    | | *other files from library* 
    | *main project files and folders* 
    | gulpfile.js - I want to build library from here while building my project 

回答

0

轉到該文件夾​​內,並確保它具有Gulpfile.jsgulpfile.js

現在你的終端內嘗試cd到該文件夾​​

> cd path_to_that_folder 
> gulp 

默認的gulp命令會嘗試運行default任務, 所以確保吞噬文件有一個。

這裏是:gulp documentation

+0

我知道如何從殼蓋了,但我想打造'從parrent項目gulpfile.js'。 – Pavlus

+0

''gulpfile.js''在父文件夾內? – Ismail

+0

Parrent項目有它自己的'gulpfile.js',我想從具有它自己的'gulpfile.js'的github庫中構建。有沒有正確的方法來做到這一點,而不需要直接從parrent項目的吞嚥任務調用shell命令來運行另一個吞嚥實例? – Pavlus