mm_tpl 2.2.2 → 2.2.3

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 +7 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- require('mm_expand');
1
+ require('mm_expand');
2
2
  const template = require('art-template');
3
3
  const Hook = require('./hook.js');
4
4
  const {
@@ -35,8 +35,8 @@ class Tpl {
35
35
  */
36
36
  this.config = {
37
37
  root: $.runPath + '',
38
- defualt_dir: "./template/",
39
- defualt_theme: 'defualt',
38
+ default_dir: "./template/",
39
+ default_theme: 'default',
40
40
  extname: ".html",
41
41
  rules: [nativeRule, artRule, htmlRule, jsRule, pyRule, pyRule2],
42
42
  cache_root: './cache'.fullname(),
@@ -64,7 +64,7 @@ class Tpl {
64
64
  /**
65
65
  * 当前主题
66
66
  */
67
- this.current_theme = this.config.defualt_theme;
67
+ this.current_theme = this.config.default_theme;
68
68
 
69
69
  /**
70
70
  * 错误提示
@@ -248,11 +248,11 @@ Tpl.prototype.view = function(file, model, options) {
248
248
  }
249
249
  var f = file.fullname(this.dir + this.current_theme);
250
250
  if (!f.hasFile()) {
251
- f = file.fullname(this.dir + this.config.defualt_theme);
251
+ f = file.fullname(this.dir + this.config.default_theme);
252
252
  if (!f.hasFile()) {
253
- f = file.fullname(this.config.defualt_dir + this.current_theme);
253
+ f = file.fullname(this.config.default_dir + this.current_theme);
254
254
  if (!f.hasFile()) {
255
- f = file.fullname(this.config.defualt_dir + this.config.defualt_theme);
255
+ f = file.fullname(this.config.default_dir + this.config.default_theme);
256
256
  }
257
257
  }
258
258
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_tpl",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "这是超级美眉模板帮助类模块,用于MVC模式下的视图渲染",
5
5
  "main": "index.js",
6
6
  "scripts": {