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

Side by Side Diff: third_party/WebKit/Source/devtools/scripts/js_build/ConcatenateProtocols.js

Issue 2344353004: DevTools: Build release mode using JS and Python (Closed)
Patch Set: fix Created 4 years, 3 months 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var path = require("path");
6
7 var jsonfile = require("jsonfile");
8
9 var utils = require("../utils");
10
11 module.exports = function main(protocols, output)
12 {
13 var domains = [];
14 var version;
15 for (var i = 0; i < protocols.length; i++) {
16 var protocol = protocols[i];
17 if (!utils.isFile(protocol))
18 throw new Error(`Cannot find ${protocol}`);
19 var json = require(protocol);
20 domains = domains.concat(json.domains);
21 version = json.version;
22 }
23 var combinedProtocol = {
24 version,
25 domains
26 };
27 jsonfile.writeFileSync(output, combinedProtocol, {spaces: 4});
28 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698