-
Notifications
You must be signed in to change notification settings - Fork 3
How to handle dist
artefacts in commits logs
#11
Comments
Is it possible to .gitignore the dist files, let travis generate them and output them to some http server? Then we can link to those dist versions from our README. |
Alright, let's go that route!
Regarding the hosted files, we could upload them to an S3 bucket from within travis linked to a domain:
For amd/umd/browser/cjs Steps are:
|
Changed the output of the `dist` folder so all output files are in the same folder, and now have the type (umd, amd, commonjs, system) in their filename. The es6 target still has its own folder. Updated the webpack output to only create a minified version of files that are used in the browser (normal and umd), because other files will only be used in a build system that can do the minification. Added a `package-dist.js` script that prepares the dist for deploys to s3 and GitHub release. It moves the files in the dist folder to a name + version folder to mimic the s3 folder structure. It also packages the es6 folder into a zip file so it can be linked. For the GitHub release it creates a .zip and .tar.gz file with the contents of the original dist folder. Updated the `.travis.yml` to run the `build-dist` and `package-dist` scripts before the deploy, and added configurations and tokens for the s3 and Github Release deploys. Updated the `npm run clean`, `.gitignore` and `.npmignore` to also clean/ignore the two dist archives in the root. re #11
In the readme I wanted to add links to the latest linkable version, but that's not really possible:
Or we need a rewrite rule that dynamically points latest to the latest version on the server, but S3 is static and we can't support that.
We could use a npm package that can bump major/minor/patch via the CLI, or even define a standard where each commit message should define if it's major/minor/patch, which can be used to update the version. |
Commented out the part that links to the s3 sources, as there is no way to link to a specific version yet without updating this readme manually after each new version. re #11
We currently generate different output versions of the code in the
dist
folder, and commit them with every source change, so people that don't consume our module via NPM can grab the dist bundles from github (browser, amd, umd, commonjs, systemjs and es6).Doing this, gives an enormous overhead in all the commits, where every change in the source results in 6 additional (large) bundle files being changed as well. This makes reviewing commits and PRs more overwhelming.
Ideally, we only want them in releases (tags), so I was wondering if we could find a better way to manage this?
Or should we skip generating them altogether (by default), and 1) only run them (manually) when upping the
package.json
version and creating a tag/release, or 2) let the consumer clone/build them and add them to the.gitignore
?We've chosen for option 2, and will add two additional methods of downloading them, via a hosted link and as a binary from the GitHub release.
/dist/
to.gitignore
(Ignore/dist
folder in git and update readme #17)after_script
(Change build-dist output and support S3 and Github Release deploys #22)README.md
or add alatest
version on S3README.md
to explain this new workflow (Ignore/dist
folder in git and update readme #17, Change build-dist output and support S3 and Github Release deploys #22)The text was updated successfully, but these errors were encountered: