robwebdev / ember-cli-staticboot

MIT License
31 stars 6 forks source link

ember-cli-deploy middleware? #25

Open lolmaus opened 7 years ago

lolmaus commented 7 years ago

Hi!

One of the primary uses of ember-cli-staticboot is to host a static webapp on GitHub Pages.

But the fact that ember-cli-staticboot builds into the dist/staticboot/ folder prevents ember-cli-deploy from deploying the distro properly to GitHub Pages.

mike183 commented 7 years ago

Could this not be resolved using the destDir option to change where the build is outputted?

lolmaus commented 7 years ago

No, unfortunately, because destDir cannot be /, i. e. the root of the dist folder. In other words, you can choose the name of a subfolder, but you can't replace the main folder with its content.

lolmaus commented 7 years ago

Here's a proof of concept: https://github.com/lolmaus/lolma.us/blob/b7c1163dccab5d21c4bc4245b0483da5f698fa4a/lib/ember-cli-deploy-manipulate/index.js

This thing took so much time and effort that I almost lost hope.

I had to monkey patch ember-cli-deploy, so this is not ready to become an addon yet. Gonna try contributing to ember-cli-deploy.