# Build for PHP framework

**URL:** <https://discuss.emberjs.com/t/build-for-php-framework/11619>\
**Category:** Design\
**Created:** [September 21, 2016, 7:29am UTC](https://discuss.emberjs.com/t/build-for-php-framework/11619 "2016-09-21T07:29:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NicholasJohn16](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/nicholasjohn16/32/4243_2.png) [@NicholasJohn16](https://discuss.emberjs.com/u/NicholasJohn16)\
**Post date:** [September 21, 2016, 7:29am UTC](https://discuss.emberjs.com/t/build-for-php-framework/11619/1 "2016-09-21T07:29:52Z")

</div>

I have an Ember app that’s part of a component for a php framework. Currently, whenever I build a new version, I have to copy all the js and css files over and manually update the checksums in a php file. I’m trying to automate these tasks.

I think I’ve solved my first problem which is building to a php file instead of a html file by changing the index.html to default.php in ember-cli-build.js, but my problem now is that a lot of extra information is included in there that I don’t need. For instance, all the head and body declarations. I just need the script and link tags for the vendor and app assets and some php specific stuff.

If I add the php stuff to the index.html file, it causes issues and I need the head and body tags while I’m developing. Is there anyway to use a different index.html (or a index.php) file when I’m doing a production build? Can anyone give me some ideas on how to approach this? Thanks.

---

<div class="post-metadata">

**Author:** ![nopyronoparty](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@nopyronoparty](https://discuss.emberjs.com/u/nopyronoparty)\
**Post date:** [September 21, 2016, 7:45am UTC](https://discuss.emberjs.com/t/build-for-php-framework/11619/2 "2016-09-21T07:45:18Z")

</div>

Can you provide some details about the structure of your project? Might be helpful

If you want to run the Ember App inside of your PHP project/frame, I dont think you need to change the index.html. You can basically paste the stuff of your index.html to your .php file.

For building/copying I’d recommend a task runner like gruntjs. That should solve the missing vendor css/js files

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [September 22, 2016, 8:52pm UTC](https://discuss.emberjs.com/t/build-for-php-framework/11619/3 "2016-09-22T20:52:30Z")

</div>

Perhaps you can use: [https://github.com/dschmidt/ember-cli-deploy-cp](https://github.com/dschmidt/ember-cli-deploy-cp)

---

<div class="post-metadata">

**Author:** ![NicholasJohn16](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/nicholasjohn16/32/4243_2.png) [@NicholasJohn16](https://discuss.emberjs.com/u/NicholasJohn16)\
**Post date:** [September 23, 2016, 6:46am UTC](https://discuss.emberjs.com/t/build-for-php-framework/11619/4 "2016-09-23T06:46:40Z")

</div>

The copying part isn’t too hard to fix. I’ll just create an in-app addon and hook onto outputReady.

The hard part is figuring out how to have a different index file for just production. The syntax is very different. Like I said about, I don’t need head or body tags; those are taken care of by the framework and template. To do stuff like set the title, I have to do:

`<?= @title('App Title') ?>`

Could anyone help point me in the direction of doing this with broccoli? I’ve tried figuring it out Ember’s build pipeline, but it’s very confusing. I was hoping there’d be an easy way to just build the app separately.
