GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — ast_tools/main.js at main · sml2h3/ast_tools Expand file tree/ Copy pathmain.jsMore file actions 39 lines (25 loc) · 996 Bytes / Copy pathmain.jsFile metadata and controls39 lines (25 loc) · 996 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 /***************************************************** * * * Author: sml2h3 * Date: 2021-03-12 * File: main * Project: ast_tools *****************************************************/ const fs = require("fs"); const iconv = require('iconv-lite'); const common_fix = require('./pro/demo1_fix') const source_path = './demos/demo1/source.js' const output_path = './demos/demo1/output.js' const content = fs.readFileSync(source_path, {encoding: 'binary'}); const buf = new Buffer.from(content, 'binary'); const source_code = iconv.decode(buf, 'utf-8'); const start_time = new Date().getTime() const output_ast = common_fix.fix(source_code) fs.writeFile(output_path, output_ast, {flag: 'w', encoding: 'utf-8', mode: '0666'}, function (err) { if (err) { console.log(output_path, new Date().getTime() - start_time, 'ms', "文件写入失败") } else { console.log(output_path, new Date().getTime() - start_time, 'ms', "文件写入成功"); } }); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |