
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
ez-publish
Advanced tools
Opinionated command line tool for publishing javascript libraries
Publishing javascript libraries to bower can be very difficult. Bower expects that distribution files (babelified, uglified, webpackyfied, blubberyfied, ..) are present in the tagged commits. At least our users expect that. Having distribution files in the commit history sucks. This is why some projects (e.g. quill) don't even publish distribution files in the tagged commits. This sucks for the user (not everyone wants to use 99 transpilation tools). Other projects (e.g. ace) have a dedicated project for publishing distribution files. This sucks for the developer. I think this approach sucks less.
We use a nifty trick to tag distribution files without fucking up our commit history:
git checkout --detach
We detach the head. This means we no longer track any branchgit add -f ./dist project-name*
We force to add all distribution filesgit commit -am 'Publish vX.Y.Z -- with dist files'
Commit dist filesgit tag vX.Y.Z
Tag release with dist filesgit push origin vX.Y.Z
Push taggit checkout master
Revert to tracking master branch (dist files are no longer tracked / in the git history)./CHANGELOG.md
, and to the tag description./.releaseMessage
before you publish using ez-publish
This tool is for you if.. (all of the following must be true)
package.json
../dist
or match ./PROJECTNAME*
.Where PROJECTNAME
is given by require(package.json).name
$ npm i -g ez-publish
$ publish
It is a good idea to write a prepublish
script in your package.json
(overwrites default behavior of npm publish
)
..
"scripts": {
..
"prepublish": "npm run dist && npm run lint",
"postpublish": "publish"
}
Then you can just run npm publish
, and automatically create tags etc..
FAQs
Command line tool for publishing js libraries
The npm package ez-publish receives a total of 0 weekly downloads. As such, ez-publish popularity was classified as not popular.
We found that ez-publish demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.