@makano/rew 1.2.97 → 1.2.98

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,6 +44,11 @@ function runFileWithArgv(filePath, options = {}, cargv) {
44
44
  }
45
45
  if (argv.includes('--')) {
46
46
  argv = argv.slice(argv.indexOf('--') + 1, argv.length);
47
+ } else {
48
+ const index = argv.find(p => filePath.endsWith(p.replace(/(\.|\.\.)\//, '/')));
49
+ if(index){
50
+ argv = argv.slice(argv.indexOf(index) + 1, argv.length);
51
+ }
47
52
  }
48
53
  runFile(filePath, options, argv);
49
54
  }
@@ -46,7 +46,7 @@ module.exports.imp = function (runPath, context) {
46
46
  if(filename == 'std' || filename == '#std') return {};
47
47
  let type = options.type ? options.type : filename.endsWith('.coffee') ? 'coffee' : (
48
48
  filename.endsWith(REW_FILE_TYPE.EXTENSION) ? REW_FILE_TYPE.TYPE :
49
- path.extname(filename).slice(1)
49
+ 'coffee'
50
50
  );
51
51
  let exports,
52
52
  ispkg = findPackage(filename);
@@ -407,6 +407,20 @@ function compileRewStuff(content, options) {
407
407
  straceLog('APP_PACKAGE_CHANGE()');
408
408
  }
409
409
 
410
+ if (
411
+ token.type === 'OTHER' && token.value === '-' &&
412
+ nextToken.type == 'IDENTIFIER' && nextToken.value === 'wait'
413
+ ) {
414
+ const { token: nextNextToken } = gnextToken(i, 2, tokens) || {};
415
+ if(nextNextToken?.type == 'IDENTIFIER'){
416
+ token.value = '';
417
+ hooks.push({
418
+ index: i + 3,
419
+ value: ','
420
+ });
421
+ }
422
+ }
423
+
410
424
  if (token.type === 'IDENTIFIER' && token.value === 'using' && !options.disableUse) {
411
425
  straceLog('USING()');
412
426
  const next = nextToken.value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makano/rew",
3
- "version": "1.2.97",
3
+ "version": "1.2.98",
4
4
  "description": "A simple coffescript runtime and app manager",
5
5
  "main": "main.js",
6
6
  "directories": {