Paths of the generated pages with assemble

前端 未结 2 1792
被撕碎了的回忆
被撕碎了的回忆 2020-12-31 16:02

I am struggling with the grunt-assemble grunt task configuration which looks like this:

assemble: {
  options: {
    f         


        
2条回答
  •  醉梦人生
    2020-12-31 16:36

    Did you try using the expanded files object for grunt targets with the cwd property?

    assemble: {
      options: {
        flatten: false,
        expand: true,
    
        assets: '',
    
        layout: 'default.hbs',
        layoutdir: 'templates/layouts',
    
        partials: ['templates/includes/*.hbs'],
        helpers: ['templates/helpers/*.js'],
        data: ['templates/data/*.{json,yml}']
      },
    
      dev: {
        files: [
          { cwd: 'templates/pages/', src: '**/*.hbs', dest: 'build/' }
        ]
      }
    }
    

提交回复
热议问题