mm_statics 1.7.4 → 1.7.5

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 +4 -5
  2. package/package.json +7 -9
package/index.js CHANGED
@@ -614,14 +614,14 @@ Static.prototype._handleCache = async function (url, ctx) {
614
614
  * @returns {string|null} 编译后的内容
615
615
  */
616
616
  Static.prototype._handleFileCompile = async function (path) {
617
- if (this.config.compile_md && path.extname() === '.md') {
617
+ let { src_path, compile_md, files, compile_vue, convert_amd } = this.config;
618
+ if (compile_md && path.extname() === '.md') {
618
619
  return await this._runMarkdown(path);
619
- } else if (!path.startsWith(this.config.src_path)) return null;
620
+ } else if (!path.startsWith(src_path)) return null;
620
621
 
621
622
  let file_type = this._getType(path);
622
- let { compile_vue, convert_amd } = this.config;
623
623
 
624
- if (convert_amd && this.config.files.includes('.' + file_type)) {
624
+ if (convert_amd && files.includes('.' + file_type)) {
625
625
  return await this._runAmd(path, file_type);
626
626
  }
627
627
  else if (compile_vue && file_type === 'vue') {
@@ -681,7 +681,6 @@ Static.prototype.main = async function (ctx, next) {
681
681
  await next();
682
682
  return '';
683
683
  }
684
-
685
684
  let path = this._getRealPath(ctx.path);
686
685
 
687
686
  // 检查缓存
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_statics",
3
- "version": "1.7.4",
3
+ "version": "1.7.5",
4
4
  "description": "这是超级美眉statics函数模块,用于web服务端statics缓存",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -37,20 +37,18 @@
37
37
  "static/"
38
38
  ],
39
39
  "dependencies": {
40
- "@vue/compiler-sfc": "^3.5.27",
40
+ "@vue/compiler-sfc": "^3.5.33",
41
41
  "abstract-syntax-tree": "^2.22.0",
42
42
  "chokidar": "^5.0.0",
43
- "koa": "^3.1.1",
44
- "koa-send": "^5.0.1",
45
- "marked": "^17.0.1",
43
+ "marked": "^18.0.2",
46
44
  "mm_cache": "^1.4.8",
47
45
  "mm_es6_to_amd": "^1.4.7",
48
- "prettier": "^3.8.1"
46
+ "prettier": "^3.8.3"
49
47
  },
50
48
  "devDependencies": {
51
- "eslint": "^9.39.2",
52
- "eslint-plugin-jsdoc": "^62.5.0",
53
- "mm_eslint": "^1.6.3",
49
+ "eslint": "^10.2.1",
50
+ "eslint-plugin-jsdoc": "^62.9.0",
51
+ "mm_eslint": "^1.7.1",
54
52
  "mocha": "^11.7.5",
55
53
  "supertest": "^7.2.2"
56
54
  }