Created
July 18, 2016 17:42
-
-
Save BenLubar/064b65170ae1f01ea00328b537eaefba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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