|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | + <title>pinst</title> |
| 7 | + <meta name="description" content="🍺 dev only postinstall hooks (package.json)"> |
| 8 | + <meta name="author" content="Array"> |
| 9 | + <meta name="robots" content="index, follow"> |
| 10 | + |
| 11 | + <!-- Open Graph Tags (for Social Media) --> |
| 12 | + <meta property="og:title" content="{{og_title}}"> |
| 13 | + <meta property="og:description" content="{{og_description}}"> |
| 14 | + <meta property="og:image" content="{{og_image}}"> |
| 15 | + <meta property="og:url" content="{{og_url}}"> |
| 16 | + <meta property="og:type" content="{{og_type}}"> |
| 17 | + |
| 18 | + <!-- Twitter Cards --> |
| 19 | + <meta name="twitter:card" content="{{twitter_card}}"> |
| 20 | + <meta name="twitter:title" content="{{twitter_title}}"> |
| 21 | + <meta name="twitter:description" content="{{twitter_description}}"> |
| 22 | + <meta name="twitter:image" content="{{twitter_image}}"> |
| 23 | + <meta name="twitter:site" content="{{twitter_site}}"> |
| 24 | + |
| 25 | + <!-- Canonical URL --> |
| 26 | + <link rel="canonical" href="{{canonical_url}}"> |
| 27 | + |
| 28 | + <!-- Favicon --> |
| 29 | + <link rel="icon" href="/favicon.ico" type="image/png"> |
| 30 | + <!-- Bootstrap CSS --> |
| 31 | + <link href=" https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel=" stylesheet" > |
| 32 | + <!-- Bootstrap Icons --> |
| 33 | + <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet"> |
| 34 | + <link rel="stylesheet" href="/css/styles.css"> |
| 35 | + <!-- Custom Styles --> |
| 36 | + <style> |
| 37 | + body { |
| 38 | + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; |
| 39 | + background-color: #f4f4f9; |
| 40 | + color: #343a40; |
| 41 | + padding-top: 56px; |
| 42 | + } |
| 43 | + a{ |
| 44 | + text-decoration: none; |
| 45 | + } |
| 46 | + .site-main, .sidebar{ |
| 47 | + background: #fff; |
| 48 | + |
| 49 | + } |
| 50 | + .sidebar{ |
| 51 | + padding: 12px; |
| 52 | + } |
| 53 | + |
| 54 | + .package-image { |
| 55 | + max-width: 120px; |
| 56 | + max-height: 120px; |
| 57 | + object-fit: contain; |
| 58 | + } |
| 59 | + .stat-row { |
| 60 | + display: flex; |
| 61 | + justify-content: space-between; |
| 62 | + margin: 1rem 0; |
| 63 | + gap: 1rem; |
| 64 | + } |
| 65 | + .stat-box { |
| 66 | + text-align: center; |
| 67 | + flex: 1; |
| 68 | + border: 1px solid #ddd; |
| 69 | + border-radius: 8px; |
| 70 | + padding: 0.5rem; |
| 71 | + font-size: 0.9rem; |
| 72 | + } |
| 73 | + .stat-box i { |
| 74 | + font-size: 1.4rem; |
| 75 | + margin-bottom: 0.25rem; |
| 76 | + display: block; |
| 77 | + } |
| 78 | + .breadcrumbs { |
| 79 | + margin-bottom: 1.5rem; |
| 80 | + background: #fff; |
| 81 | + padding: 0.5rem 1rem; |
| 82 | + border-radius: 5px; |
| 83 | + } |
| 84 | + .metadata-item { |
| 85 | + display: flex; |
| 86 | + align-items: center; |
| 87 | + margin-bottom: 0.5rem; |
| 88 | + } |
| 89 | + .metadata-item i { |
| 90 | + font-size: 1.2rem; |
| 91 | + margin-right: 0.5rem; |
| 92 | + color: #6c757d; |
| 93 | + } |
| 94 | + </style> |
| 95 | +</head> |
| 96 | +<body> |
| 97 | + <!-- Navbar --> |
| 98 | + <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"> |
| 99 | + <div class="container"> |
| 100 | + <a class="navbar-brand" href="https://codehimblog.github.io"> |
| 101 | + <i class="bi bi-box-seam me-2"></i>CodehimBlog |
| 102 | + </a> |
| 103 | + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> |
| 104 | + <span class="navbar-toggler-icon"></span> |
| 105 | + </button> |
| 106 | + <div class="collapse navbar-collapse" id="navbarNav"> |
| 107 | + <ul class="navbar-nav ms-auto"> |
| 108 | + <li class="nav-item"> |
| 109 | + <a class="nav-link" href="https://codehimblog.github.io/"><i class="bi bi-house-door me-1"></i> Home</a> |
| 110 | + </li> |
| 111 | + <li class="nav-item"> |
| 112 | + <a class="nav-link" href="https://codehimblog.github.io/projects/"><i class="bi bi-box me-1"></i> Projects</a> |
| 113 | + </li> |
| 114 | + <li class="nav-item"> |
| 115 | + <a class="nav-link" href="https://codehimblog.github.io/about.html"><i class="bi bi-book me-1"></i> About</a> |
| 116 | + </li> |
| 117 | + <li class="nav-item"> |
| 118 | + <a class="nav-link" href="https://codehimblog.github.io/contact.html"><i class="bi bi-envelope me-1"></i> Contact</a> |
| 119 | + </li> |
| 120 | + </ul> |
| 121 | + </div> |
| 122 | + </div> |
| 123 | + </nav> |
| 124 | + |
| 125 | +<!-- Breadcrumbs --> |
| 126 | +<div class="container mt-4 breadcrumbs"> |
| 127 | + <nav aria-label="breadcrumb"> |
| 128 | + <ol class="breadcrumb mb-0"> |
| 129 | + <li class="breadcrumb-item"><a href="https://codehimblog.github.io/">Home</a></li> |
| 130 | + <li class="breadcrumb-item"><a href="https://codehimblog.github.io/projects/">Projects</a></li> |
| 131 | + <li class="breadcrumb-item active" aria-current="page">pinst</li> |
| 132 | + </ol> |
| 133 | + </nav> |
| 134 | +</div> |
| 135 | + |
| 136 | +<!-- Schema Markup for Breadcrumbs --> |
| 137 | +<script type="application/ld+json"> |
| 138 | +{ |
| 139 | + "@context": "https://schema.org", |
| 140 | + "@type": "BreadcrumbList", |
| 141 | + "itemListElement": [ |
| 142 | + { |
| 143 | + "@type": "ListItem", |
| 144 | + "position": 1, |
| 145 | + "name": "Home", |
| 146 | + "item": "https://codehimblog.github.io/" |
| 147 | + }, |
| 148 | + { |
| 149 | + "@type": "ListItem", |
| 150 | + "position": 2, |
| 151 | + "name": "Projects", |
| 152 | + "item": "https://codehimblog.github.io/projects/" |
| 153 | + }, |
| 154 | + { |
| 155 | + "@type": "ListItem", |
| 156 | + "position": 3, |
| 157 | + "name": "pinst", |
| 158 | + "item": "https://codehimblog.github.io/projects/{{packageSlug}}" |
| 159 | + } |
| 160 | + ] |
| 161 | +} |
| 162 | +</script> |
| 163 | + |
| 164 | + |
| 165 | + <!-- Main Content --> |
| 166 | + <div class="container mt-4"> |
| 167 | + <div class="row"> |
| 168 | + |
| 169 | + |
| 170 | + <!-- Main Details --> |
| 171 | + <main class="col-md-8 site-main"> |
| 172 | + <!-- Project Name & Description --> |
| 173 | + <h1 id="packageName">pinst</h1> |
| 174 | + <p id="packageDescription" class="text-muted">🍺 dev only postinstall hooks (package.json)</p> |
| 175 | + |
| 176 | + <!-- Statistics --> |
| 177 | + <div class="stat-row"> |
| 178 | + <div class="stat-box"> |
| 179 | + <i class="bi bi-star-fill text-warning"></i> |
| 180 | + <span id="stargazersCount">259</span> |
| 181 | + <p>Stars</p> |
| 182 | + </div> |
| 183 | + <div class="stat-box"> |
| 184 | + <i class="bi bi-arrow-repeat text-secondary"></i> |
| 185 | + <span id="forksCount">8</span> |
| 186 | + <p>Forks</p> |
| 187 | + </div> |
| 188 | + <div class="stat-box"> |
| 189 | + <i class="bi bi-exclamation-circle text-danger"></i> |
| 190 | + <span id="openIssuesCount">2</span> |
| 191 | + <p>Open Issues</p> |
| 192 | + </div> |
| 193 | + </div> |
| 194 | + |
| 195 | + <!-- Action Buttons --> |
| 196 | + <div class="mb-4"> |
| 197 | + <a href="#" target="_blank" class="btn btn-success me-2" id="homepageBtn"> |
| 198 | + <i class="bi bi-house-door me-2"></i>Visit Homepage |
| 199 | + </a> |
| 200 | + <a href="https://github.com/typicode/pinst/archive/refs/heads/master.zip" class="btn btn-primary me-2" id="downloadBtn"> |
| 201 | + <i class="bi bi-cloud-download me-2"></i>Download ZIP |
| 202 | + </a> |
| 203 | + <a href="https://github.com/typicode/pinst" target="_blank" class="btn btn-outline-secondary" id="githubBtn"> |
| 204 | + <i class="bi bi-github me-2"></i>Fork on GitHub |
| 205 | + </a> |
| 206 | + </div> |
| 207 | + |
| 208 | + <!-- Tabs --> |
| 209 | + <ul class="nav nav-tabs" id="infoTabs" role="tablist"> |
| 210 | + <li class="nav-item" role="presentation"> |
| 211 | + <button class="nav-link active" id="installation-tab" data-bs-toggle="tab" data-bs-target="#installation" type="button" role="tab" aria-controls="installation" aria-selected="true"> |
| 212 | + <i class="bi bi-file-earmark-text"></i> Readme |
| 213 | + </button> |
| 214 | + </li> |
| 215 | + <li class="nav-item" role="presentation"> |
| 216 | + <button class="nav-link" id="dependencies-tab" data-bs-toggle="tab" data-bs-target="#dependencies" type="button" role="tab" aria-controls="dependencies" aria-selected="false"> |
| 217 | + <i class="bi bi-diagram-2-fill me-2"></i> Dependencies |
| 218 | + </button> |
| 219 | + </li> |
| 220 | + <li class="nav-item" role="presentation"> |
| 221 | + <button class="nav-link" id="changelog-tab" data-bs-toggle="tab" data-bs-target="#changelog" type="button" role="tab" aria-controls="changelog" aria-selected="false"> |
| 222 | + <i class="bi bi-journal-text me-2"></i> Changelog |
| 223 | + </button> |
| 224 | + </li> |
| 225 | + <li class="nav-item" role="presentation"> |
| 226 | + <button class="nav-link" id="contributors-tab" data-bs-toggle="tab" data-bs-target="#contributors" type="button" role="tab" aria-controls="contributors" aria-selected="false"> |
| 227 | + <i class="bi bi-people me-2"></i> Contributors |
| 228 | + </button> |
| 229 | + </li> |
| 230 | + </ul> |
| 231 | + |
| 232 | + <div class="tab-content mt-3" id="infoTabsContent"> |
| 233 | + <div class="tab-pane fade show active" id="installation" role="tabpanel" aria-labelledby="installation-tab"> |
| 234 | + <h1 id="pinstnodejscihttpsgithubcomtypicodepinstworkflowsnodejs20cibadgesvghttpsgithubcomtypicodepinstactionsnpmhttpsimgshieldsionpmvpinstsvghttpswwwnpmjscompackagepinst">pinst <a href="https://github.com/typicode/pinst/actions"><img src="https://github.com/typicode/pinst/workflows/Node.js%20CI/badge.svg" alt="Node.js CI" /></a> <a href="https://www.npmjs.com/package/pinst"><img src="https://img.shields.io/npm/v/pinst.svg" alt="npm" /></a></h1> |
| 235 | +<blockquote> |
| 236 | + <p><code>pinst</code> lets you have <code>postinstall</code> hook that runs only in dev 🍺</p> |
| 237 | +</blockquote> |
| 238 | +<p><strong>Important</strong> if your project is using npm or pnpm, you can achieve the desired effect by setting a <code>prepare</code> hook instead. <code>pinst</code> is mainly useful for Yarn 2+ since it doesn't support <code>prepare</code> hook. See https://yarnpkg.com/advanced/lifecycle-scripts</p> |
| 239 | +<h2 id="usage">Usage</h2> |
| 240 | +<pre class="prettyprint linenums lang-js"><code>// package.json |
| 241 | +{ |
| 242 | + "scripts": { |
| 243 | + "postinstall": "<some dev only command>", |
| 244 | + "prepack": "pinst --disable", |
| 245 | + "postpack": "pinst --enable" |
| 246 | + } |
| 247 | +} |
| 248 | +</code></pre> |
| 249 | +<p><em>On <code>prepack</code>, <code>postinstall</code> will be renamed to <code>_postinstall</code> (disabled)</em></p> |
| 250 | +<p><em>On <code>postpack</code>, it will be renamed back to <code>postinstall</code> (enabled)</em></p> |
| 251 | +<h2 id="cli">CLI</h2> |
| 252 | +<p><code>pinst</code> accepts the following flags:</p> |
| 253 | +<pre><code>--enable, -e Enable postinstall hook |
| 254 | +--disable, -d Disable postinstall hook |
| 255 | +--silent, -s |
| 256 | +</code></pre> |
| 257 | +<h2 id="tips">Tips</h2> |
| 258 | +<p>By inverting commands, you can also use <code>pinst</code> to enable <code>postinstall</code> for your users only and not yourself.</p> |
| 259 | +<p><code>pinst</code> also supports <code>install</code> alias.</p> |
| 260 | +<h2 id="license">License</h2> |
| 261 | +<p>MIT - <a href="https://github.com/typicode">Typicode :cactus:</a></p> |
| 262 | + </div> |
| 263 | + <div class="tab-pane fade" id="dependencies" role="tabpanel" aria-labelledby="dependencies-tab"> |
| 264 | + <h5>Dependencies</h5> |
| 265 | + <ul id="dependenciesList"> |
| 266 | + <li>No dependencies listed.</li> |
| 267 | + </ul> |
| 268 | + </div> |
| 269 | + <div class="tab-pane fade" id="changelog" role="tabpanel" aria-labelledby="changelog-tab"> |
| 270 | + <h5>Changelog</h5> |
| 271 | + <ul id="changelogList"> |
| 272 | + <p>No changelog available.</p> |
| 273 | + </ul> |
| 274 | + </div> |
| 275 | + <div class="tab-pane fade" id="contributors" role="tabpanel" aria-labelledby="contributors-tab"> |
| 276 | + <h5>Contributors</h5> |
| 277 | + <ul id="contributorsList"> |
| 278 | + <li>typicode (58 contributions)</li><li>dependabot[bot] (6 contributions)</li> |
| 279 | + </ul> |
| 280 | + </div> |
| 281 | + </div> |
| 282 | + </main> |
| 283 | + <!-- Sidebar --> |
| 284 | + <aside class="col-md-4"> |
| 285 | + <div class="sidebar"> |
| 286 | + <div class="sidebar-item"> |
| 287 | + <h5>Owner</h5> |
| 288 | + <div class="d-flex align-items-center"> |
| 289 | + <img src="https://avatars.githubusercontent.com/u/5502029?v=4" alt="Owner Avatar" class="rounded-circle me-2" style="width: 40px; height: 40px;"> |
| 290 | + <a href="https://github.com/typicode" target="_blank" id="ownerName">typicode</a> |
| 291 | + </div> |
| 292 | + </div> |
| 293 | + <div class="sidebar-item"> |
| 294 | + <h5>Metadata</h5> |
| 295 | + <div class="metadata-item"> |
| 296 | + <i class="bi bi-calendar"></i> |
| 297 | + <strong>Created At:</strong> <span id="createdAt">June 8, 2018</span> |
| 298 | + </div> |
| 299 | + <div class="metadata-item"> |
| 300 | + <i class="bi bi-pencil-square"></i> |
| 301 | + <strong>Last Updated:</strong> <span id="updatedAt">September 25, 2024</span> |
| 302 | + </div> |
| 303 | + <div class="metadata-item"> |
| 304 | + <i class="bi bi-code-slash"></i> |
| 305 | + <strong>Language:</strong> <span id="language">JavaScript</span> |
| 306 | + </div> |
| 307 | + <div class="metadata-item"> |
| 308 | + <i class="bi bi-box-arrow-in-down"></i> |
| 309 | + <strong>Size:</strong> <span id="repoSize">0.43 MB</span> |
| 310 | + </div> |
| 311 | + </div> |
| 312 | + </div> |
| 313 | + </aside> |
| 314 | + </div> |
| 315 | + </div> |
| 316 | + |
| 317 | + <!-- Footer --> |
| 318 | + <footer class="bg-dark text-white text-center py-3"> |
| 319 | + <div class="container"> |
| 320 | + <p class="mb-0">© 2024 Package Hub Pro - Powered by Bootstrap</p> |
| 321 | + </div> |
| 322 | + </footer> |
| 323 | + |
| 324 | + <!-- Bootstrap Bundle JS --> |
| 325 | + <script src=" https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" ></script> |
| 326 | + <script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script> |
| 327 | +</body> |
| 328 | +</html> |
0 commit comments