@@ -307,16 +307,22 @@ function parse_csv(content) {
307
307
var output = { } ;
308
308
var max = 0 ;
309
309
310
- content . split ( '\n' ) . forEach ( function ( line ) {
310
+ content . split ( '\n' ) . forEach ( function ( line , index ) {
311
+
312
+ if ( ! index )
313
+ return ;
314
+
311
315
line = line . trim ( ) ;
316
+
312
317
if ( ! line )
313
318
return ;
319
+
314
320
var arr = line . split ( ';' ) ;
315
321
if ( arr . length <= 1 )
316
322
return ;
317
323
318
- var key = arr [ 0 ] . trim ( ) . replace ( / ( ^ \ ") | ( \ "$ ) / g, '' ) ;
319
- var value = arr [ 1 ] . trim ( ) . replace ( / ( ^ \ ") | ( \ "$ ) / g, '' ) ;
324
+ var key = arr [ 0 ] . trim ( ) . replace ( / ( ^ " ) | ( " $ ) / g, '' ) ;
325
+ var value = arr [ 2 ] . trim ( ) . replace ( / ( ^ " ) | ( " $ ) / g, '' ) ;
320
326
if ( ! key || ! value )
321
327
return ;
322
328
@@ -355,11 +361,11 @@ function main() {
355
361
var port = cmd . parseInt ( ) ;
356
362
if ( port ) {
357
363
358
- F . config [ 'directory-temp' ] = '~' + path . join ( os . tmpdir ( ) , 'totaljs' + dir . hash ( ) ) ;
359
- F . config [ 'directory-public' ] = '~' + dir ;
360
- F . config [ 'allow-compile-html' ] = false ;
361
- F . config [ 'allow-compile-script' ] = false ;
362
- F . config [ 'allow-compile-style' ] = false ;
364
+ CONF . directory_temp = '~' + path . join ( os . tmpdir ( ) , 'totaljs' + dir . hash ( ) ) ;
365
+ CONF . directory_public = '~' + dir ;
366
+ CONF . allow_compile_html = false ;
367
+ CONF . allow_compile_script = false ;
368
+ CONF . allow_compile_style = false ;
363
369
364
370
F . accept ( '.less' , 'text/less' ) ;
365
371
@@ -810,7 +816,7 @@ function git(dir, type) {
810
816
}
811
817
812
818
F . path . mkdir ( dir ) ;
813
- exec ( 'git clone https://github.com/totaljs/{0}.git {1}' . format ( type , dir ) , function ( err ) {
819
+ exec ( 'git clone https://github.com/totaljs/{0}.git {1}' . format ( type , dir ) , function ( ) {
814
820
F . path . mkdir ( path . join ( dir , '/node_modules/' ) ) ;
815
821
F . rmdir ( path . join ( dir , '.git' ) , function ( ) {
816
822
F . unlink ( path . join ( dir , '.gitignore' ) , function ( ) {
0 commit comments