Skip to content

Instantly share code, notes, and snippets.

@BenLubar
Created July 18, 2016 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenLubar/064b65170ae1f01ea00328b537eaefba to your computer and use it in GitHub Desktop.
Save BenLubar/064b65170ae1f01ea00328b537eaefba to your computer and use it in GitHub Desktop.
FROM boomzillawtf/tdwtf:node-gdbjit
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app/
RUN npm install
COPY . /usr/src/app
CMD node --gdbjit foo.js
var semver = require('semver');
var fs = require('fs');
var path = require('path');
var pkg = require('./package.json');
var module = 'async';
fs.readFile(path.join(__dirname, 'node_modules/', module, 'package.json'), {
encoding: 'utf-8'
}, function(err, pkgData) {
pkgData = JSON.parse(pkgData);
!semver.validRange(pkg.dependencies[module]) || semver.satisfies(pkgData.version, pkg.dependencies[module]);
});
{
"dependencies": {
"async": "^2.0.0",
"semver": "^5.3.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment