fis-parser-w3c-sm
Advanced tools
Comparing version 0.1.0 to 0.1.1
23
index.js
'use strict'; | ||
var W3cAPIConverter = require('w3c-sm'); | ||
var logPath = fis.project.getProjectPath() + '/w3c-sm-change-' + (new Date).toLocaleDateString() + '.log'; | ||
var logPath = fis.project.getProjectPath() + '/w3c-sm-change-' + (new Date()).toLocaleDateString() + '.log'; | ||
@@ -9,3 +9,3 @@ module.exports = function (content, file, conf) { | ||
result, | ||
logContent, | ||
logContent = (new Date()).toLocaleTimeString() + '\n', | ||
@@ -19,13 +19,16 @@ exclude = conf.exclude; | ||
if (result.isReplaced) { | ||
logContent = file.subpath + '\n'; | ||
if (conf.log) { | ||
for (var k in result.loc) { | ||
logContent += '\t"' + k + '" in line '; | ||
for (var i = 0, loc = result.loc[k], len = loc.length; i < len; i++) { | ||
logContent += '\t' + '[' + loc[i].start.line + ':' + loc[i].start.column + ']'; | ||
logContent += file.subpath + '\n'; | ||
for (var k in result.loc) { | ||
logContent += '\t"' + k + '" in line '; | ||
for (var i = 0, loc = result.loc[k], len = loc.length; i < len; i++) { | ||
logContent += '\t' + '[' + loc[i].start.line + ':' + loc[i].start.column + ']'; | ||
} | ||
} | ||
logContent += '\n'; | ||
fis.util.write(logPath, logContent, 'utf-8', true); | ||
} | ||
logContent += '\n'; | ||
fis.util.write(logPath, logContent, 'utf-8', true); | ||
return result.content; | ||
@@ -32,0 +35,0 @@ } |
{ | ||
"name": "fis-parser-w3c-sm", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "fis插件,用于将w3c标准API替换为神马封装的 API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5430
72