First, assuming you have stuff built (gulp
or grunt build
), copy the the dist
directory and temporarily store it anywhere outside of the repo
Then execute the following...
git checkout --orphan release
git rm --cached $(git ls-files)
git clean -d -x -f
You should have an empty repo at this point...
Take that dist
directory you put elsewhere and move it back into the now empty repo.
Then execute the following...
git add -A
git commit -m "{Version} release"
git tag {Version}
git push --tags
If you're publishing to npm you'll need to move the package.json file along with the dist...