Javascript grunt jade-如何编译单个jade文件而不是所有文件
我的jade.js文件中有以下内容Javascript grunt jade-如何编译单个jade文件而不是所有文件,javascript,node.js,express,gruntjs,pug,Javascript,Node.js,Express,Gruntjs,Pug,我的jade.js文件中有以下内容 'use strict'; var config = require('../config'); module.exports = { dist: { options: { pretty: true, debug: false, timestamp: '<%= new Date().getTime() %>' }, files: [{ expand: true, cwd: 'html_
'use strict';
var config = require('../config');
module.exports = {
dist: {
options: {
pretty: true,
debug: false,
timestamp: '<%= new Date().getTime() %>'
},
files: [{
expand: true,
cwd: 'html_templates/views/',
src: '**/*.jade',
dest: 'html_templates/html/',
ext: '.html'
}]
}
};
我只想编译:
html_templates/html/module/landingpage1.html
请帮助使用
grunt更新的
只需安装它并以“更新的:jade”的形式运行您的任务,就可以了
它也适用于手表等。使用grunt-newer
只需安装它并以“更新的:jade”的形式运行您的任务,就可以了
它也适用于手表等。有解决此问题的方法。在我看来,“grunt更新版”通过检查哪些文件被更新并只处理这些文件来处理这个问题。我还想把它添加到grunt watch中。你用手表测试过这个吗?是的,我用手表。您可以使用“watch”事件来标识更改的文件,然后在grunt jade配置中动态设置该路径。(这在grunt contrib watch自述中有描述。)我正在使用“watch”事件来完成自定义任务。看这里:正是我要找的!谢谢。这个问题有解决办法。在我看来,“grunt更新版”通过检查哪些文件被更新并只处理这些文件来处理这个问题。我还想把它添加到grunt watch中。你用手表测试过这个吗?是的,我用手表。您可以使用“watch”事件来标识更改的文件,然后在grunt jade配置中动态设置该路径。(这在grunt contrib watch自述中有描述。)我正在使用“watch”事件来完成自定义任务。看这里:正是我要找的!(任何想法或建议都会受到赞赏)它对继承的玉器文件有效吗?我试过了,但没有效果:(任何想法或建议都会受到赞赏)它对继承的玉器文件有效吗
html_templates/html/module/landingpage1.html