Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
//
// SITEMAP GENERATOR
//
var fs = require('fs');
var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
var dateFormat = require('dateformat');
var now = new Date();
var opts = require('nomnom')
.option('domain', {
abbr: 'd',
required : true,
help : 'domain to generate a sitemap for'
})
.option('path', {
abbr: 'p',
default : './',
help : 'path to write the file'
})
.option('customurls',{
abbr:'c',
default : false,
help : 'path to json file containing an array of custom urls to be added to the sitemap'
}).parse();
var fs = require('fs');
var path = require('path');
var Table = require('cli-table');
var discoverPorts = require('../index');
var table = new Table({
chars: { 'top': '' , 'top-mid': '' , 'top-left': '' , 'top-right': ''
, 'bottom': '' , 'bottom-mid': '' , 'bottom-left': '' , 'bottom-right': ''
, 'left': '' , 'left-mid': '' , 'mid': '' , 'mid-mid': ''
, 'right': '' , 'right-mid': '' , 'middle': ' ' },
style: { 'padding-left': 0, 'padding-right': 4 }
});
var types = {b2g: "Firefox OS", firefox:"Firefox Desktop"};
var opts = require("nomnom")
.option('version', {
flag: true,
help: 'Print version and exit',
callback: function() {
fs.readFile(path.resolve(__dirname, '../package.json'), 'utf-8', function(err, file) {
console.log(JSON.parse(file).version);
});
}
})
.option('b2g', {
flag: true,
help: 'Show Boot2Gecko (FirefoxOS) listening ports only'
})
.option('release', {
list: true,
help: 'Release of FirefoxOS to filter',
#!/usr/bin/env node
'use strict';
var fs = require('fs'),
path = require('path'),
request = require('request');
var mbtiles = require('@mapbox/mbtiles');
var packageJson = require('tileserver-gl-light/package');
var opts = require('nomnom')
.option('mbtiles', {
default: undefined,
help: 'MBTiles file (uses demo configuration);\n' +
'\t ignored if the configuration file is also specified',
position: 0
})
.option('config', {
abbr: 'c',
default: 'config.json',
help: 'Configuration file'
})
.option('bind', {
abbr: 'b',
default: undefined,
help: 'Bind address'
})
#!/usr/bin/env node
'use strict';
var wallpaper = require('./wallpaper.js');
var logger = require('./utils/logger.js');
var opts = require('nomnom')
.option('help', {
abbr: 'h',
help: 'show help information.'
}).option('style', {
abbr: 's',
help: 'the wallpaper style[Tile, Center, Stretch, Fit, Fill], Windows Only.',
default: 'Stretch'
}).option('source', {
help: 'the wallpaper source, support imageset[bing, ...] (see lib/sources/) OR uri',
default: 'bing'
}).parse();
wallpaper.set(opts, function (err) {
if (!err) {
logger.info('your wallpaper have been set successfully.');
} else {
#!/usr/bin/env node
var clivas = require('clivas');
var exec = require('child_process').exec;
var opts = require('nomnom')
.option('app', {
abbr: 'a',
help: 'Filter list to one app (regexp format)'
})
.option('throttle', {
abbr: 't',
default: 0,
help: 'Throttling b2g-info polling'
})
.parse();
var filter = null;
if (opts.app) {
filter = new RegExp(opts.app, 'i');
}