nl_tokens: 构建
pl_tokens: function buildProject ( timer , buildConf , buildManager ) { let { logger , output : outputOpts } = buildConf ; let { onBuildStart , onBuildDone } = buildConf . script || { } ; let hookResult = runBuildStartHook ( buildManager , onBuildStart ) ; let buildResult ; if ( hookResult instanceof Promise ) { buildResult = hookResult . then ( code => { logger . debug ( 'init build start done...' , code ) ; return buildManager . build ( timer ) ; } ) ; } else { buildResult = buildManager . build ( timer ) ; } let doneHandler = buildDone . <mask> ( null , timer , logger , outputOpts . dir ) ; return buildResult . then ( ( ) => buildManager . release ( ) ) . then ( doneHandler ) . then ( ( ) => { runBuildDoneHook ( buildManager , onBuildDone ) ; } ) . catch ( doneHandler ) ; }