fis-smarty的-map.json里资源定位符的namespace特征丢失了吗?

2026-04-06 11:381阅读0评论SEO问题
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计199个文字,预计阅读时间需要1分钟。

fis-smarty的-map.json里资源定位符的namespace特征丢失了吗?

javascriptvalidate-fis-map.js 检查 fis-smarty 模块的 -map.json 中资源定位符是否丢失了 namespace 特征 + @用法 node validate.js -map.json

fis-smarty的-map.json里资源定位符的namespace特征丢失了吗?

使用说明:严格模式:var fs=require('fs')var file=process.argv.slice(2)if (!file) { console.log()

validate-fis-map.js

/** * 检查 fis-smarty 模块的 -map.json 中资源定位符是否丢失了 namespace 特征 * @用法 node valide.js -map.json */ "use strict" var fs = require('fs') var file = process.argv.slice(2) if( !file ){ console.log('指定 -map.json 文件!') return } console.log( `file name:${file}`) var content = fs.readFileSync( file.toString() ) if( !content ){ console.log('文件内容为空!') return } var json = JSON.parse( content ) var bad = Object.keys( json.res ).filter( res => { // console.log( res ) return res.indexOf(':') < 0 }) if( bad.length ){ console.log( '发现丢失 namespace 的资源:') console.log( bad ) } else{ console.log( '没有发现丢失 namespace 的资源。') }

标签:mapjson

本文共计199个文字,预计阅读时间需要1分钟。

fis-smarty的-map.json里资源定位符的namespace特征丢失了吗?

javascriptvalidate-fis-map.js 检查 fis-smarty 模块的 -map.json 中资源定位符是否丢失了 namespace 特征 + @用法 node validate.js -map.json

fis-smarty的-map.json里资源定位符的namespace特征丢失了吗?

使用说明:严格模式:var fs=require('fs')var file=process.argv.slice(2)if (!file) { console.log()

validate-fis-map.js

/** * 检查 fis-smarty 模块的 -map.json 中资源定位符是否丢失了 namespace 特征 * @用法 node valide.js -map.json */ "use strict" var fs = require('fs') var file = process.argv.slice(2) if( !file ){ console.log('指定 -map.json 文件!') return } console.log( `file name:${file}`) var content = fs.readFileSync( file.toString() ) if( !content ){ console.log('文件内容为空!') return } var json = JSON.parse( content ) var bad = Object.keys( json.res ).filter( res => { // console.log( res ) return res.indexOf(':') < 0 }) if( bad.length ){ console.log( '发现丢失 namespace 的资源:') console.log( bad ) } else{ console.log( '没有发现丢失 namespace 的资源。') }

标签:mapjson