Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(682)

Unified Diff: node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/node_modules/strip-json-comments/cli.js

Issue 800513006: Added vulcanize under third_party/npm_modules (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/node_modules/strip-json-comments/cli.js
diff --git a/node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/node_modules/strip-json-comments/cli.js b/node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/node_modules/strip-json-comments/cli.js
new file mode 100755
index 0000000000000000000000000000000000000000..ac4da48457a2f52e167196464599ba7a4dbfd4d6
--- /dev/null
+++ b/node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/node_modules/strip-json-comments/cli.js
@@ -0,0 +1,41 @@
+#!/usr/bin/env node
+'use strict';
+var fs = require('fs');
+var strip = require('./strip-json-comments');
+var input = process.argv[2];
+
+
+function getStdin(cb) {
+ var ret = '';
+
+ process.stdin.setEncoding('utf8');
+
+ process.stdin.on('data', function (data) {
+ ret += data;
+ });
+
+ process.stdin.on('end', function () {
+ cb(ret);
+ });
+}
+
+if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) {
+ console.log('strip-json-comments <input file> > <output file>');
+ console.log('or');
+ console.log('cat <input file> | strip-json-comments > <output file>');
+ return;
+}
+
+if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) {
+ console.log(require('./package').version);
+ return;
+}
+
+if (input) {
+ process.stdout.write(strip(fs.readFileSync(input, 'utf8')));
+ return;
+}
+
+getStdin(function (data) {
+ process.stdout.write(strip(data));
+});

Powered by Google App Engine
This is Rietveld 408576698