我正在Windows机器上以角色运行脚本模块。
我正在尝试使用“ args:creates:”参数。该脚本可以运行,但是“创建”的文件应该不会被创建。当我再次运行剧本时,脚本将再次运行。
我尝试更改文件名和目录,尝试使用环境变量将HOME指定为根目录,但从未生成该文件。
var ComponentB = {
template: "<p>This is the Component B</p>",
}
var ComponentA = {
template: '<p>This is the Component A</p><component-b></component-b>',
components: {
'component-b': ComponentB
}
}
new Vue({
el: '#app',
components: {
'component-a': ComponentA,
}
});
答案 0 :(得分:0)
Q:“脚本正在运行,但是“创建”的文件应该不会被创建。”
A:创建文件是脚本的责任。引用自script
创建:远程节点上的文件名,如果该文件名已存在,则将不运行此步骤。
参数creates
的目的是使模块成为幂等,即,如果文件不存在,则运行脚本。一旦文件被脚本创建,任务将被跳过。