Skip to content

Commit

Permalink
update stub with caveat message
Browse files Browse the repository at this point in the history
  • Loading branch information
AidasPa committed Mar 15, 2021
1 parent 3b76ec8 commit 10640ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
9 changes: 8 additions & 1 deletion cli/stubs/actor.stub
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,11 @@ class __CLASSNAME__ extends Actor
}
}

export default __CLASSNAME__;
// NOTE: If you're going to be targetting this file directly via the editor, you are not allowed to export things.
// Seems like nothing breaks apart from the scary error message.

new __CLASSNAME__(GWorld);

// However, if this is a class you're going to be extending, then feel free to export it and remove the new instance

// export default __CLASSNAME__;
12 changes: 1 addition & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,8 @@
/* eslint-disable no-console */
const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
const utils = require('./utils');
const compiler = require('./compiler');
const cli = require('./cli');

const { argv } = yargs(hideBin(process.argv));

if (argv.file) {
(async () => {
const code = await utils.readCode(argv.file);
const compiled = compiler(code);
console.log(compiled);
})();
} else {
cli(argv._);
}
cli(argv._);

0 comments on commit 10640ac

Please sign in to comment.