I tried to reuse as much as possible from bluprint start, which means importing some functions from ../start in the test command. I build a tarball of the given directory, in order to reuse most of those functions. It could probably be refactored to something cleaner, but I didn't attempt that here.
I made a best effort attempt at parsing .gitignore and ignoring those files when building the tarball. Another approach using git archive is available here: https://github.com/jarib/bluprint/tree/test-command-using-git-archive. The downside is that the files then have to be commited in the local bluprint's repo to be picked up by the test command. Seems like it would be easy to forget and a quite frustrating DX, so I prefer the approach in this PR.
I've implemented
bluprint test ../local-dir
as suggested in https://github.com/reuters-graphics/bluprint/issues/21.I tried to reuse as much as possible from
bluprint start
, which means importing some functions from../start
in thetest
command. I build a tarball of the given directory, in order to reuse most of those functions. It could probably be refactored to something cleaner, but I didn't attempt that here.I made a best effort attempt at parsing
.gitignore
and ignoring those files when building the tarball. Another approach usinggit archive
is available here: https://github.com/jarib/bluprint/tree/test-command-using-git-archive. The downside is that the files then have to be commited in the local bluprint's repo to be picked up by thetest
command. Seems like it would be easy to forget and a quite frustrating DX, so I prefer the approach in this PR.