ember-cli-deploy / ember-cli-deploy/ember-cli-deploy-json-config

Respect outputPaths in ember-cli-build

Đang mở
#34 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
17
Fork
11
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I recently implemented this addon and noticed that the index.json output does not respect the `outputPaths` config setting in `ember-cli-build.js`. Here is a sample of my configuration and the resulting index.json output from `ember deploy production`:

```
// ember-cli-build.js
const isProduction = ( process.env.EMBER_ENV || 'development' ) === 'production';
const assetPath = isProduction ? '' : '/assets';

module.exports = function(defaults) {
var app = new EmberApp(defaults, {
outputPaths: {
app: {
html: 'index.html',
css: {
'app': assetPath + '/app.css'
},
js: assetPath + '/app.js'
},
vendor: {
css: assetPath + '/vendor.css',
js: assetPath + '/vendor.js'
}
}
});
}
```

```
// config/deploy.js
var ENV = {
build: {},
'json-config': {
jsonBlueprint(context, pluginHelper) {
var jsonBlueprint = pluginHelper.readConfigDefault('jsonBlueprint');
jsonBlueprint.script.includeContent = true;
return jsonBlueprint;
}
}
};
```

```
// index.json
{
"base": [],
"meta": [],
"link": [{
"rel": "stylesheet",
"href": "assets/vendor-13455b8fd285c046141dd54ae73890f8.css"
}, {
"rel": "stylesheet",
"href": "assets/app-efe517a8fe179e4392e64c2a9ce8fe05.css"
}],
"script": [{
"src": "assets/vendor-127d2a9b59896b5ddff4de18193179cb.js"
}, {
"src": "assets/app-774827c1c48acfbdb034cbc16d3f5fb7.js"
}]
}
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.