资产文件夹结构

时间:2016-05-12 21:03:54

标签: ember.js

默认情况下,Ember将CSS和(生成的)JS文件复制到dist/assets

是否可以将一些结构添加到assets文件夹,方法是将JS复制到dist/assets/js并将CSS复制到dist/assets/css

1 个答案:

答案 0 :(得分:1)

仔细阅读ember-cli指南的following part。 复制在此以供参考:

// ember-cli-build.js
var app = new EmberApp({
  outputPaths: {
    app: {
      html: 'index.html',
      css: {
        'app': '/assets/application-name.css'
      },
      js: '/assets/application-name.js'
    },
    vendor: {
      css: '/assets/vendor.css',
      js: '/assets/vendor.js'
    }
  }
});

你的意思是这样的:

// ember-cli-build.js
var app = new EmberApp({
  outputPaths: {
    app: {
      html: 'index.html',
      css: {
        'app': '/assets/css/application-name.css'
      },
      js: '/assets/js/application-name.js'
    },
    vendor: {
      css: '/assets/css/vendor.css',
      js: '/assets/js/vendor.js'
    }
  }
});