typicode / Pinst
Licence: mit
🍺 dev only postinstall hooks (package.json)
Stars: ✭ 162
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Pinst
Yerna
A Lerna-like tool for managing Javascript monorepos using Yarn
Stars: ✭ 140 (-13.58%)
Mutual labels: npm, yarn
Yarn
The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
Stars: ✭ 40,325 (+24791.98%)
Mutual labels: npm, yarn
Cheatsheets
A curated list of everything I look up more than twice
Stars: ✭ 109 (-32.72%)
Mutual labels: npm, yarn
Foxy
A fast, reliable, and secure NPM/Yarn bridge for Composer
Stars: ✭ 137 (-15.43%)
Mutual labels: npm, yarn
React Anime
✨ (ノ´ヮ´)ノ*:・゚✧ A super easy animation library for React!
Stars: ✭ 1,313 (+710.49%)
Mutual labels: hooks, npm
React Universal Hooks
🎉 React Universal Hooks : just use****** everywhere (Functional or Class Component). Support React DevTools!
Stars: ✭ 148 (-8.64%)
Mutual labels: hooks, hook
Verdaccio
📦🔐 A lightweight Node.js private proxy registry
Stars: ✭ 12,667 (+7719.14%)
Mutual labels: npm, yarn
Sass Recipes
Sass things that I do all the time or should remember to do because googling tutorials gets old
Stars: ✭ 156 (-3.7%)
Mutual labels: npm, yarn
Hooks
Async middleware for JavaScript and TypeScript
Stars: ✭ 117 (-27.78%)
Mutual labels: hooks, hook
Swifthook
A library to hook methods in Swift and Objective-C.
Stars: ✭ 93 (-42.59%)
Mutual labels: hooks, hook
Vscode Deploy Reloaded
Recoded version of Visual Studio Code extension 'vs-deploy', which provides commands to deploy files to one or more destinations.
Stars: ✭ 129 (-20.37%)
Mutual labels: npm, yarn
React Selector Hooks
Collection of hook-based memoized selector factories for declarations outside of render.
Stars: ✭ 84 (-48.15%)
Mutual labels: hooks, hook
Postinstall Build
Helper for conditionally building your npm package on postinstall
Stars: ✭ 87 (-46.3%)
Mutual labels: hooks, npm
Klap
zero config, zero dependency bundler for tiny javascript packages
Stars: ✭ 143 (-11.73%)
Mutual labels: npm, yarn
React Intersection Observer
React implementation of the Intersection Observer API to tell you when an element enters or leaves the viewport.
Stars: ✭ 2,689 (+1559.88%)
Mutual labels: hooks, hook
pinst
lets you havepostinstall
hook that runs only in dev 🍺
This can be useful if you want to automatically run commands just after npm install
, but don't want your package users to be affected.
Usage
$ npm install pinst --save-dev
// package.json
{
"scripts": {
"postinstall": "<some dev only command>",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable"
}
}
$ npm publish
On prepublishOnly
, postinstall
will be renamed to _postinstall
(disabled)
On postpublish
, it will be renamed back to postinstall
(enabled)
CLI
pinst
accepts the following flags:
--enable, -e Enable postinstall hook
--disable, -d Disable postinstall hook
--silent, -s
Try it
To test that everything works without actually publishing your package, you can manually run the following commands:
$ npm run prepublishOnly
$ npm run postpublish
Tips
By inverting commands, you can also use pinst
to enable postinstall
for your users only and not yourself.
pinst
also supports install
alias.
License
MIT - Typicode 🌵
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].