mm_statics 1.5.7 → 1.5.8

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 (2) hide show
  1. package/index.js +6 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -324,12 +324,12 @@ export default {
324
324
  /**
325
325
  * 编译Vue组件
326
326
  * @param {string} code Vue组件代码
327
- * @returns {string} 可直接调用的JavaScript组件代码
327
+ * @returns {Promise<string>} 可直接调用的JavaScript组件代码
328
328
  */
329
- Static.prototype._compileVue = function (code) {
329
+ Static.prototype._compileVue = async function (code) {
330
330
  let desc = parse(code).descriptor;
331
331
  let render_function = this._processTemplate(desc);
332
- return this._processScript(desc, render_function);
332
+ return await this._processScript(desc, render_function);
333
333
  };
334
334
 
335
335
  /**
@@ -361,14 +361,14 @@ Static.prototype._runAmd = async function (path, file_type) {
361
361
  /**
362
362
  * 运行Vue组件
363
363
  * @param {string} path 文件路径
364
- * @returns {string} 编译后的代码
364
+ * @returns {Promise<string>} 编译后的代码
365
365
  */
366
- Static.prototype._runVue = function (path) {
366
+ Static.prototype._runVue = async function (path) {
367
367
  let code = null;
368
368
  let file = `.${path}`.fullname(this.config.root);
369
369
  let text = file.loadText();
370
370
  if (text) {
371
- code = this._compileVue(text);
371
+ code = await this._compileVue(text);
372
372
  }
373
373
  return code;
374
374
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_statics",
3
- "version": "1.5.7",
3
+ "version": "1.5.8",
4
4
  "description": "这是超级美眉statics函数模块,用于web服务端statics缓存",
5
5
  "main": "index.js",
6
6
  "scripts": {