Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* The MIT License (MIT)
* Copyright (c) 2015-present Dmitry Soshnikov
*/
'use strict';
/*global ROOT:true*/
// To require local modules from root.
global.ROOT = __dirname + '/../';
const colors = require('colors');
const fs = require('fs');
const path = require('path');
const options = require('nomnom')
.script('syntax')
.options({
version: {
abbr: 'v',
help: 'Print current version',
flag: true,
},
mode: {
abbr: 'm',
transform: normalizeMode,
},
grammar: {
abbr: 'g',
help: 'File containing LL or LR grammar',
metavar: 'FILE',
},
#!/usr/bin/env node
var opts = require("nomnom")
.script("mdn")
.options({
search: {
position: 0,
help: "Search terms",
list: true,
required: true
},
version: {
abbr: "v",
help: "Print the version and exit",
flag: true,
callback: function () {
return require("./package.json").version;
}
}
#!/usr/bin/env node
var fs = require("fs");
var path = require("path");
var parser = require("./jsonlint").parser;
var JSV = require("JSV").JSV;
var formatter = require("./formatter.js").formatter;
var options = require("nomnom")
.script("jsonlint")
.options({
file: {
position: 0,
help: "file to parse; otherwise uses stdin"
},
version: {
flag : true,
string: '-v, --version',
help: 'print version and exit',
callback: function() {
return require("../package").version;
}
},
sort : {
flag : true,
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const seal = require('./seal');
var opts = require("nomnom")
.script('seal')
.option('output', {
abbr: 'o',
metavar: 'FILE',
default: 'sealed-npm-shrinkwrap.json',
help: 'write output to specified file'
})
.option('cache-dir', {
abbr: 'c',
metavar: 'DIR',
default: process.env['HOME'] + '/.npm',
help: 'directory where npm package downloads are cached'
})
.option('version', {
abbr: 'v',
flag: true,
function getCommandlineOptions () {
"use strict";
var version = require('../package.json').version;
var opts = require("nomnom")
.script('jison')
.option('file', {
flag : true,
position : 0,
help : 'file containing a grammar'
})
.option('lexfile', {
flag : true,
position : 1,
help : 'file containing a lexical grammar'
})
.option('json', {
abbr : 'j',
flag : true,
help : 'force jison to expect a grammar in JSON format'
})