Skip to content

Commit

Permalink
Merge pull request #1171 from apiaryio/honzajavorek/never-have-dev-in…
Browse files Browse the repository at this point in the history
…-shrinkwrap

Never have dev deps in shrinkwrap
  • Loading branch information
honzajavorek committed Dec 20, 2018
2 parents 379c279 + 683fa19 commit dd98e52
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
12 changes: 6 additions & 6 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion scripts/postshrinkwrap.js
@@ -1,10 +1,16 @@
#!/usr/bin/env node
// Postprocesses the lockfile to remove C++ dependency and to enforce https://
// Postprocesses the lockfile to remove dev dependencies and one C++
// dependency, and to enforce https://

const fs = require('fs');
const path = require('path');
const lockfile = require('../npm-shrinkwrap');

// Remove dev dependencies so they NEVER get to the final distribution of Dredd
Object.keys(lockfile.dependencies)
.filter(name => lockfile.dependencies[name].dev)
.forEach(name => delete lockfile.dependencies[name]);

// Force all installations of Dredd to use only the pure JavaScript version
// of the API Blueprint parser. It has slower performance, but it solves
// quite a few installation & distribution problems.
Expand Down

0 comments on commit dd98e52

Please sign in to comment.