
This is context for the previous post in the series, for areas I know of in programming where it makes sense to create an output distribution file.
Compiled languages
For C, C++, Rust and Go, one might want to distribute a pre-built executable binary. I want to get into Go and so want to see a good approach for sharing my projects.
FromHello world example:
$go build hello-world.go$lshello-world hello-world.go
For C:
$cc-O-c main.c
Rust:
$cargo build
Zip a package
In the case of a VS Code extension (typically made in TypeScript) or a Ruby gem, one creates a zipped archive like.vsix
or.gem
which contains selected files to be distributed.
Then this file could be uploaded to GitHub or a provider (like VS Code Marketplace or RubyGems), so others can install your project.
For example, I create a local archive of my VS Code extension and add it to a release underAssets.
https://github.com/MichaelCurrin/auto-commit-msg/releases
Dist directory for JS
For JavaScript projects, one might have asrc
directory of source code (e.g. TypeScript) and adist
directory of compiled JavaScript (vanilla JS, possible minified and bundled as a single JS file or a multiple files). This directory might be versioned or not in the repo. It might be available on the NPM registry or a CDN.
For example, here are some Vue JS files available in adist
oncdn.jsdelivr.net
.
https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/
That seems to match the versioneddist
directory on GitHub.
https://github.com/vuejs/vue/tree/dev/dist
Or you can use a single Production CDN JS file:
Top comments(0)
For further actions, you may consider blocking this person and/orreporting abuse