What would be the best way to actually deploy dart code that has pubspec.yaml dependencies? A common thing I've done in the past was to create demos and deploy to github pages. Now that pub uses symbolic links the dependencies do not get pushed to github. Also wondering if this should be a bug to file for pub, being able to deploy with dependencies.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
We aren't there yet, but pub will in the future support a deploy
command. That will do things like run dart2js and concatenate/minify your code. It will also physically bring in all of your dependencies so you don't have symlinks. The end result will be a single directory that contains everything your package needs to run.
回答2:
I think you have three options:
- If you already have a server-side technology and a deployment strategy, use that.
- If you're just deploying static stuff, I wonder if Google App Engine would work with these symlinks.
- Heroku supports Dart, although I'm not sure how it supports symlinks.
回答3:
You can deploy your Dart application on Heroku cloud hosting. There is a step-by-step tutorial here.
It works nice.