@vxapp/wxss
Advanced tools
Comparing version 0.0.4 to 0.0.5
14
index.js
@@ -0,6 +1,16 @@ | ||
const fs = require('fs-extra'); | ||
const postcss = require('postcss'); | ||
const wxss = (filename, out) => { | ||
const wxss = (src, out, options = {}) => { | ||
const { plugins = [] } = options; | ||
const parser = postcss(plugins); | ||
return async (input, output) => { | ||
if(!fs.existsSync(input)) | ||
return console.error('[@vxapp/wxss] file does not exists:', input); | ||
const source = await fs.readFile(input); | ||
const result = await parser.process(source); | ||
fs.writeFile(output, result.css); | ||
}; | ||
}; | ||
module.exports = wxss; |
{ | ||
"name": "@vxapp/wxss", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "wechat mini-program wxss parser", | ||
@@ -20,3 +20,6 @@ "keywords": [ | ||
}, | ||
"gitHead": "5afe243750a3f5eaa4650f15312d85f75f3d20d2" | ||
"dependencies": { | ||
"postcss": "^7.0.6" | ||
}, | ||
"gitHead": "15145d4b818de01f331798eca5ec673b8e96a818" | ||
} |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3038
4
13
0
1
1
+ Addedpostcss@^7.0.6
+ Addedpicocolors@0.2.1(transitive)
+ Addedpostcss@7.0.39(transitive)
+ Addedsource-map@0.6.1(transitive)