Support for .tame.js as an extension
m1sta opened this issue · comments
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.
That is a pretty good idea, and it can be done.
require ('tamejs').register({ extension: ['tame.js']});
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)