Skip to content

Loading…

Support for .tame.js as an extension #35

Open
m1sta opened this Issue · 2 comments

2 participants

@m1sta

I'd like to use the extension 'tame.js' for my tamejs files, since it will mean that I get automatically detected syntax highlighting everywhere. It doesn't appear to be supported in the current version of tame.

@jameskeane

That is a pretty good idea, and it can be done.

require ('tamejs').register({ extension: ['tame.js']});
@m1sta

Are you saying that it can be done 'in theory' or have you tried it?

I've tried the following without any success...

var tame = require ('tamejs').register({ extension: ['tame.js']});
var playground = require('./playground.tame.js');

I get the following error...

    await { setTimeout (defer (), 100); }
          ^
SyntaxError: Unexpected token {
    at Module._compile (module.js:437:25)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (C:\...\server.js:5:18)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.