Publish to CDN
MikeBild opened this issue · 6 comments
Would be nice to use lokka/transport via CDN. cdnjs.com
That'd be great.
I'll try to do it. In case, you did it before me send me a PR.
There is a cdn already https://npmcdn.com/lokka
I didn't know about NPM CDN before.
But, I fear it'll work with the browser directly since this doesn't have all the modules it needs. May be I need to push more stuff to the dist
directory.
Ohh nice, thank you for NPM CDN. That's interesting.
Yes, the current lokka version can't use in the browser directly. I did it manually with
browserify -s Lokka ./lib/index.js -t babelify --outfile lokka.js
browserify -s Transport ./lib/index.js -t babelify --outfile lokka-transport-http.js
Import afterwards:
<script src="lokka.js"></script>
<script src="lokka-transport-http.js"></script>
<script>
var graphQLClient = new Lokka.Lokka({
transport: new Transport.Transport('')
});
</script>
Yes, it would be nice to push the stuff into a dist
directory to import via NPM CDN.
Yeah!
@MikeBild could you work on this?
Put this code into here: https://github.com/kadirahq/lokka/blob/master/scripts/prepublish.sh
yes