reimertz / lagom

🖼 simplistic presentation generator
https://lagom.re.im
MIT License
199 stars 19 forks source link

implement lagom deploy #6

Closed reimertz closed 8 years ago

reimertz commented 8 years ago

probably just going to wrap this: https://github.com/zeit/now-serve

Haroenv commented 8 years ago

https://github.com/zeit/now-client is what will be needed to used, however this asks for an api key (which you can get here.

However it seems that ns doesn't depend on now-client. Maybe it uses some other way?

Simply having ns as a peer dependency or install it when needed would also work, since running ns in the created directory works flawless.

reimertz commented 8 years ago

@Haroenv I also created this a while back that deploys static content as a gist. http://github.com/reimertz/gistploy

I just need to iterate on since it doesn't work anymore, probably due to rawgit/github changing something in their api.

Also, gistploy would be better since it's free and to be honest, zeit/now-serve is actually booting up a node service for each individual deployment, which I think would be a huge waste of energy since lagom is strictly static.

reimertz commented 8 years ago

@Haroenv deploy should work in 0.3.0. please let me know if you find any issues. <3

Haroenv commented 8 years ago

Nice. I'll check it out

reimertz commented 8 years ago

I will close this now, feel like it's legit now. :)

Haroenv commented 8 years ago
$ lagom deploy
â—©         lagom: deploy
â—©         status: loading index.html
â—©         status: loading lagom.js
â—©         status: processing external css lagom.css
â—©         status: loading lagom.css
â—©         status: creating gist
â—©         status: shortening url
â—©         error: code is not defined
$ lagom deploy index.html 
â—©         lagom: deploy
â—©         status: loading index.html
â—©         status: loading lagom.js
â—©         status: processing external css lagom.css
â—©         status: loading lagom.css
â—©         status: creating gist
â—©         status: shortening url
â—©         error: code is not defined
$ lagom deploy qsdf
â—©         lagom: deploy
â—©         error: qsdf doesn't exist

How do I enter a code, and what is it?

reimertz commented 8 years ago

fuck

Haroenv commented 8 years ago

in https://github.com/reimertz/lagom/blob/master/src/bin/lagom-deploy.js#L52 you're printing code, but that's not defined. Maybe it's shortenedURL instead?

reimertz commented 8 years ago

@Haroenv fixed now in v0.4.0. Sorry about that. refactored some code and forgot to fix variable rename at one spo..... exaclty! 💯

reimertz commented 8 years ago
$ lagom deploy
â—©         lagom: deploy
â—©         status: loading index.html
â—©         status: loading lagom.js
â—©         status: processing external css lagom.css
â—©         status: loading lagom.css
â—©         status: creating gist
â—©         status: shortening url
â—©         deployed: http://lagom.hook.io/?c=vPRgE
Haroenv commented 8 years ago
lagom deploy
â—©         lagom: deploy
â—©         status: loading index.html
â—©         status: loading lagom.js
â—©         status: processing external css lagom.css
â—©         status: loading lagom.css
â—©         status: creating gist
â—©         status: shortening url
â—©         deployed: http://lagom.hook.io/?c=vPR2p

perfect now!