sptc 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/sptcd.js CHANGED
@@ -57,10 +57,10 @@ const program=new Command()
57
57
  const {getLocalIpv4Addresses}=require('../utils')
58
58
  console.log('`sptc-http-server` has been launched with the following option:')
59
59
  const o={
60
+ debug,
60
61
  workdir,
61
62
  routerEntry: router || null,
62
63
  }
63
- o.debug=debug? true: false
64
64
  o.traverse=traverse? true: false
65
65
  if(locally) {
66
66
  o.serve='127.0.0.1:'+port
@@ -1,4 +1,5 @@
1
1
  const {compileSptcMacroFile, MACRO_TYPES}=require('./compiler-macro')
2
+ const path=require('path')
2
3
 
3
4
  const {
4
5
  O_IFDEF,
@@ -58,7 +59,7 @@ function execute(ctx, ast) {
58
59
  }else if(p.type===O_INCLUDE) {
59
60
  const filename=path.resolve(ctx.filename+'/..', p.include)
60
61
  const nctx=Object.assign({}, ctx, {filename})
61
- ret+=executeContext(nctx)
62
+ ret+=executeMacroContext(nctx)
62
63
  }else{
63
64
  throw new Error('unsupported node: '+JSON.stringify(p))
64
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sptc",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "Simple Pretreat Toolkit CLI",
5
5
  "main": "engine/index.js",
6
6
  "engines": {