@@ -18,6 +18,7 @@ WebSocketServer = WebSocket.Server
1818Promise = require ' bluebird'
1919which = Promise .promisify require ' which'
2020buildAPI = require ' bongo-api-builder'
21+ bongo = require ' bongo'
2122
2223
2324args =
@@ -87,30 +88,60 @@ class Builder
8788 spriteHelper = helper
8889 @ buildClient options
8990
90- buildFramework : ->
91-
92- uglify = unless process .env .NO_UGLIFYJS then " --uglify" else " "
93-
94- buildLoggedInFramework = " cd client/Framework && npm i && gulp compile #{ uglify} --outputDir=../../website/a/"
95- buildLoggedOutFramework = " cd client/Framework && npm i && gulp compile #{ uglify} --outputDir=../../website/a/out/ --entryPath=../entry.coffee"
96- exec buildLoggedInFramework, (err , stdout , stderr )->
97- console .log """
98- ----------------------------------- KD FRAMEWORK COMPILED -----------------------------------
99- To use watcher for Framework use following command in different tab:
100- $ #{ buildLoggedInFramework .replace ' compile ' , ' ' }
101- ---------------------------------------------------------------------------------------------
102- """
103-
104- # exec buildLoggedOutFramework, (err, stdout, stderr)->
105- # console.log """
106- # ----------------------------- KD FRAMEWORK LOGGEDOUT COMPILED -------------------------------
107- # """
91+ buildExternals : ->
92+
93+ {daisy } = bongo
94+
95+ queue = [
96+ ->
97+ console .log " \n # EXTERNAL BUILDS STARTED\n "
98+ uglify = unless process .env .NO_UGLIFYJS then " --uglify" else " "
99+ buildLoggedInFramework = " cd client/Framework && npm i && gulp compile #{ uglify} --outputDir=../../website/a/"
100+ exec buildLoggedInFramework, (err , stdout , stderr )->
101+ if err
102+ then console .error err
103+ else console .log """
104+ # KD FRAMEWORK COMPILED
105+ To use watcher for Framework use following command in different tab:
106+ $ #{ buildLoggedInFramework .replace ' compile ' , ' ' }
107+ """
108+ queue .next ()
109+ ,
110+ ->
111+ exec ' cd client/landing && npm i' , (err , stdout , stderr )->
112+ if err
113+ then console .error err
114+ else console .log " # LANDING PAGE DEPENDENCIES INSTALLED"
115+ queue .next ()
116+ ,
117+ ->
118+ exec ' cd client/landing && gulp build' , (err , stdout , stderr )->
119+ if err
120+ then console .error err
121+ else console .log """
122+ # LANDING PAGE BUILT
123+ For further development of landing page, clone koding/landing and follow its readme.
124+ """
125+ queue .next ()
126+ ,
127+ ->
128+ exec " cp -Rf #{ __dirname } /client/landing/static/out #{ __dirname } /website/a/out" , (err , stdout , stderr )->
129+ if err
130+ then console .error err
131+ else console .log " # LANDING PAGE EXPORTED"
132+ queue .next ()
133+ ->
134+ console .log " \n # EXTERNAL BUILDS FINISHED!\n "
135+ queue .next ()
136+ ]
137+
138+ daisy queue, ->
108139
109140 buildClient : (options ) ->
110141
111142 try fs .mkdirSync " .build"
112143
113- @ buildFramework ()
144+ @ buildExternals ()
114145
115146 buildAPI
116147 rootDir : __dirname
0 commit comments