我有一个问题,每次我grunt assemble
在终端运行时,任务永远不会完成。这是我assemble
在 gruntfile.js 中的任务,有人可以告诉我它有什么问题吗?
assemble: {
options: {
flatten: true,
assets: '<%= config.tmp %>/assets',
layout: ['<%= config.src %>/templates/layouts/default.hbs'],
//data: '<%= config.src %>/data/*.{json,yml}',
data: ['<%= config.src %>/data/**/*.{json,yml}'],
partials: ['<%= config.src %>/templates/partials/*.hbs'],
plugins: ['assemble-contrib-anchors',
'assemble-contrib-permalinks',
'assemble-contrib-toc',
'assemble-contrib-i18n',
'assemble-contrib-contextual'
], //'assemble-contrib-sitemap'
contextual: {
dest: '<%= config.tmp %>/'
},
i18n: {
// data: ['<%= config.src %>/data/i18n.json'],
// templates: ['<%= config.src %>/templates/*.hbs']
languages: buildLanguages, // buildLanguages = ['en','de','ru']
templates: ['<%= config.src %>/templates/pages/*.hbs']
},
permalinks: {
structure: ':language/:file:ext'
},
files: {
'<%= config.src %>/': ['<%= config.src %>/templates/pages/*.hbs']
}
},
dist: {
files: [
{
src: '<%= config.src %>/templates/pages/*.hbs',
dest: '<%= config.tmp %>/'
}
]
}
},
我使用grunt assemble --verbose
它并输出以下消息:
Assembling pages...
{ _page: 'all',
dirname: '.tmp',
filename: 'products-en.html',
pageName: 'products-en.html',
pagename: 'products-en.html',
basename: 'products-en',
src: 'src/templates/pages/products-en.hbs',
dest: '.tmp/en/products.html',
assets: '../assets',
ext: '.html',
extname: '.html',
page: '\n\n<h1>Products!</h1>',
data: { language: 'en', file: 'products' },
filePair:
{ src: [Getter],
dest: '.tmp/',
orig: { src: [Object], dest: '.tmp/' } },
index: 3,
number: 4,
first: false,
prev: 2,
middle: true,
next: 4,
last: false,
slug: 'products-en',
isCurrentPage: false,
relativeLink: 'products.html' }
Currentpage: [object Object]
Variables loaded
但是当我查看我的 .tmp 文件夹时,没有.tmp/en/product.html
文件。