Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/utils/platforms/template/bootstrap.js
blob: df03512e5db8cecc155067ba9ebc39284d00a368 (plain)
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
36
37
38
(function (evalGlobal) {

    var read = /*TODO*/; // function(path:string):string

    var isFile = /*TODO*/; // function(path:string):boolean

    var prefix = "/path/to/narwhal"; /*TODO*/
    
    eval(read(prefix + "/narwhal.js"))({
        global: this,
        evalGlobal: evalGlobal,
        platform: '<<<name>>>', /*TODO*/
        platforms: ['<<<name>>>', 'default'], /*TODO*/
        os: "", /* TODO /\bwindows\b/i for Windows FS support */
        // XXX platforms may include any number of
        // prioritized generic platforms like:
        // rhino, java, c, v8, default
        print: print,
        evaluate: function (text) {
            // TODO maybe something better here:
            return eval(
                "(function(require,exports,module,system,print){" +
                text +
                "/**/\n})"
            );
        },
        fs: {
            read: read,
            isFile: isFile
        },
        prefix: prefix,
        debug: false,
        verbose: false
    });

}).call(this, function () {
    return eval(arguments[0]);
});