2

私たちは、いくつかの共有レイアウトといくつかのカスタム レイアウトを必要とするアセンブル プロジェクトに取り組んでいます。

当初、デフォルト ページの宛先は 1 つでした。現在、各ブランド/サイトが独自の配布フォルダーを取得できるように、これを分割しています。

私の質問は、物事を分解する前に、すべてが正しく組み立てられていたことです。複数のディストリビューションがあるので、少し混乱しています:)

現在のセットアップ:

テンプレート

  |-- templates
  |  |-- _default
  |  |  |--includes
  |  |  |--layouts
  |  |  |--pages
  |  |-- brand 1
  |  |  |--includes
  |  |  |--layouts
  |  |  |--pages
  |  |-- brand 2
  |  |  |--includes
  |  |  |--layouts
  |  |  |--pages

組み立てるタスク:

    assemble: {
        options: {
        flatten: true,
        production: false,
        postprocess: require('pretty'),

    // Metadata
    pkg: '<%= pkg %>',
    site: '<%= site %>',

    // Templates
    // partials: '<%= site.includes %>',
    // layoutdir: '<%= site.layouts %>',
    // layout: '<%= site.layout %>'
  },
    brand1: {
      files: {'<%= site.justin %>/': ['<%= site.templates %>/justin/**/*.hbs']}
    },
    brand2: {
      files: {'<%= site.jow %>/': ['<%= site.templates %>/jow/**/*.hbs']}
    },
    tonylama: {
      files: {'<%= site.tonylama %>/': ['<%= site.templates %>/tonylama/**/*.hbs']}
    },
    brand3: {
      files: {'<%= site.nocona %>/': ['<%= site.templates %>/nocona/**/*.hbs']}
    },
    brand4: {
      files: {'<%= site.chippewa %>/': ['<%= site.templates %>/chippewa/**/*.hbs']}
    }
}

問題は、複数のディストリビューションをうまくアセンブルするにはどうすればよいかということです。optionsそれぞれのレイアウトとインクルードを配置してポイントできますか?

grunt assemble:brandname を実行すると、エラーが発生しますWarning: Layout file (forgot-password.hbs) not found

4

2 に答える 2

0

ターゲット内のオプションを使用して、エラーを修正し、複数の dist フォルダーにプッシュすることができました。

assemble: {
  options: {
    flatten: true,
    production: false,
    postprocess: require('pretty'),

    // Metadata
    pkg: '<%= pkg %>',
    site: '<%= site %>',
  },
    brand: {
      options: {
        //Template Config
        partials: '<%= site.brandIncl %>',
        layoutdir: '<%= site.brandLayouts %>',
        layout: '<%= site.brandLayout %>'
      },
      files: {'<%= site.brand %>/': ['<%= site.templates %>/brand/pages/*.hbs']}
    }
于 2014-06-23T18:04:29.597 に答える