给doScript 运行的脚本增加几个全局变量,file、cwd、refs_path #110
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
"refs": {
"cp": [
"ver",
"src/html"
],
"sh": "xxxx"
},
使用这种配置时,vm和html里面的环境变量在拷贝到refs文件夹时会自动替换成真实的值,但是在“sh”属性指定的脚本执行时,refs里面的变量还没有被替换;
所以考虑在postmin对应的脚本上做;并给脚本增加全局属性,file,cwd,refs_path