@cilix/lightjs 0.0.2 → 0.0.4

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.
Files changed (3) hide show
  1. package/core.js +2 -2
  2. package/index.js +6 -1
  3. package/package.json +1 -1
package/core.js CHANGED
@@ -1802,9 +1802,9 @@ module.exports = (config) => {
1802
1802
  const val = evaluate(node.data[1]);
1803
1803
  const t = getType(val);
1804
1804
  if (t === 'object' || t === 'null' || t === 'array') {
1805
- return JSON.stringify(val);
1805
+ stack.push(JSON.stringify(val));
1806
1806
  } else {
1807
- return e.toString();
1807
+ stack.push(e.toString());
1808
1808
  }
1809
1809
  } break;
1810
1810
  case 'join': {
package/index.js CHANGED
@@ -143,7 +143,12 @@ Light.compile = async (name, opts) => {
143
143
  }
144
144
  }
145
145
  if (e.origin === 'light') {
146
- msg = `<pre>${light.printError(e)}</pre>`;
146
+ if (opts.cache) {
147
+ console.log(`${e.file}: ${e.msg}`);
148
+ msg = 'Server error';
149
+ } else {
150
+ msg = `<pre>${light.printError(e)}</pre>`;
151
+ }
147
152
  } else {
148
153
  console.log(e);
149
154
  msg = `<pre>${e.message}</pre>`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cilix/lightjs",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "A new kind of JavaScript framework",
5
5
  "main": "index.js",
6
6
  "scripts": {