Skip to content

Commit fb18dc3

Browse files
authored
Merge pull request #684 from totaljs/v3.0.1
3.1.0
2 parents 32919b6 + b90209d commit fb18dc3

35 files changed

+4570
-5612
lines changed

503.html

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
50%{ transform:scale(1.5) rotate(180deg); color:gray }
2424
100%{ transform:scale(1); }
2525
}
26-
2726
</style>
2827
</head>
2928
<body>

bin/totaljs

+15-9
Original file line numberDiff line numberDiff line change
@@ -307,16 +307,22 @@ function parse_csv(content) {
307307
var output = {};
308308
var max = 0;
309309

310-
content.split('\n').forEach(function(line) {
310+
content.split('\n').forEach(function(line, index) {
311+
312+
if (!index)
313+
return;
314+
311315
line = line.trim();
316+
312317
if (!line)
313318
return;
319+
314320
var arr = line.split(';');
315321
if (arr.length <= 1)
316322
return;
317323

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, '');
320326
if (!key || !value)
321327
return;
322328

@@ -355,11 +361,11 @@ function main() {
355361
var port = cmd.parseInt();
356362
if (port) {
357363

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;
363369

364370
F.accept('.less', 'text/less');
365371

@@ -810,7 +816,7 @@ function git(dir, type) {
810816
}
811817

812818
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() {
814820
F.path.mkdir(path.join(dir, '/node_modules/'));
815821
F.rmdir(path.join(dir, '.git'), function() {
816822
F.unlink(path.join(dir, '.gitignore'), function() {

0 commit comments

Comments
 (0)