Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var argv = require('yargs').argv;
let destination = path.join(conf.paths.dist, '..', 'depend');
let dependencies = ['openstudio', 'energyplus', 'ruby', 'mongo', 'openstudioServer'];
if (argv.prefix) {
destination = argv.prefix;
}
if (argv.exclude) {
const without = argv.exclude.split(',');
dependencies = _.difference(dependencies, without);
}
const manifest = jetpack.read('manifest.json', 'json');
const platform = os.platform();
const arch = os.arch();
gulp.task('download-deps', function () {
// List the dependencies to download here
// These should correspond to keys in the manifest
console.log('Dependencies: ' + dependencies.sort().join(', '));
var tasks = dependencies.map(depend => {
const fileInfo = _.find(manifest[depend], {platform: platform});
const fileName = fileInfo.name;
return progress(request({uri: manifest.endpoint + fileName, timeout: 5000}))
.on('progress', state => {
(function () {
var jetpack = require('fs-jetpack');
if (typeof window === 'object') {
// Web browser context, __dirname points to folder where app.html file is.
window.env = jetpack.read(__dirname + '/env_config.json', 'json');
} else {
// Node context
module.exports = jetpack.read(__dirname + '/../../env_config.json', 'json');
}
}());
_.values(ev.dataTransfer.files).forEach(({path}) => {
if (!isSVG(path)) throw "Path is not svg!"
let string = jetpack.read(path)
// Change color
let svg = SVG.parse(string)
let markup = SVG.coloredMarkup(svg, this.state.color)
this.setState((prevState) => {
prevState.svgs[path] = {original: svg, current: markup}
return prevState
})
})
(function () {
var jetpack = require('fs-jetpack');
if (typeof window === 'object') {
// Web browser context
window.env = jetpack.read('env_config.json', 'json');
} else {
// Node context
module.exports = jetpack.read(__dirname + '/../../env_config.json', 'json');
}
}());
.then((licenseInfos) => {
var attributionSequence = _(licenseInfos).filter(licenseInfo => {
return !licenseInfo.ignore && licenseInfo.name != undefined;
}).sortBy(licenseInfo => {
return licenseInfo.name.toLowerCase();
}).map(licenseInfo => {
return [licenseInfo.name,`${licenseInfo.version} <${licenseInfo.url}>`,
licenseInfo.licenseText || `license: ${licenseInfo.license}${os.EOL}authors: ${licenseInfo.authors}`].join(os.EOL);
}).value();
var attribution = attributionSequence.join(`${os.EOL}${os.EOL}******************************${os.EOL}${os.EOL}`);
var headerPath = path.join(options.outputDir, 'header.txt');
if (jetpack.exists(headerPath)) {
var template = jetpack.read(headerPath);
console.log('using template', template);
attribution = template + os.EOL + os.EOL + attribution;
}
jetpack.write(path.join(options.outputDir, 'licenseInfos.json'), JSON.stringify(licenseInfos));
return jetpack.write(path.join(options.outputDir, 'attribution.txt'), attribution);
})
.catch(e => {
function main() {
try {
const { migrations, test, } = yaml.safeLoad(fs.read('resources.yml'));
selectResources('migrations', migrations);
selectResources('test', test);
} catch (e) {
log.error(e);
}
}
return service.fetchOne(id).then(function(item){
var data = jetpack.read(useDataDir.path(item.file))
self.id = item._id
self.articletitle = item.title;
self.author = item.author;
self.favicon = item.favicon;
self.feed = item.feed;
self.feed_id = item.feed_id;
self.pubDate = moment.unix(item.pubDate).format("MMMM Do YYYY");
self.link = item.link;
if(!item.read){
self.markedread = true
markRead(id)
decrementCount(item.feed_id)
} else {
self.markedread = item.read
}
read(data,function(err,article,res){
module.exports.getElectronVersion = function () {
var manifest = jetpack.read(__dirname + '/../package.json', 'json');
return manifest.devDependencies['electron'].substring(1);
};
.map(p => fs.read(p, 'utf8'))
.map(_.template)