Skip to content

Commit

Permalink
Merge pull request #10020 from Snuffleupagus/addon-prefs-no-eslint
Browse files Browse the repository at this point in the history
Ensure that the built `PdfJsDefaultPreferences.jsm` file won't be affected/touched during tree-wide ESLint rule changes in `mozilla-central` (PR 9571 follow-up)
  • Loading branch information
timvandermeij authored Aug 29, 2018
2 parents 49cd8da + d8aaa2f commit 27ebb41
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -751,15 +751,17 @@ function preprocessDefaultPreferences(content) {
var preprocessor2 = require('./external/builder/preprocessor2.js');
var licenseHeader = fs.readFileSync('./src/license_header.js').toString();

var GLOBALS = '/* eslint-disable */\n';
var MODIFICATION_WARNING =
'//\n// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT MANUALLY!\n//\n';
'//\n// THIS FILE IS GENERATED AUTOMATICALLY, DO NOT EDIT MANUALLY!\n//\n';

content = preprocessor2.preprocessPDFJSCode({
rootPath: __dirname,
defines: DEFINES,
}, content);

return licenseHeader + '\n' + MODIFICATION_WARNING + '\n' + content + '\n';
return (licenseHeader + '\n' + GLOBALS + '\n' + MODIFICATION_WARNING + '\n' +
content + '\n');
}

gulp.task('mozcentral-pre', ['buildnumber', 'locale'], function () {
Expand Down
2 changes: 1 addition & 1 deletion src/license_header.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2017 Mozilla Foundation
/* Copyright 2018 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/license_header_libre.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @licstart The following is the entire license notice for the
* Javascript code in this page
*
* Copyright 2017 Mozilla Foundation
* Copyright 2018 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 27ebb41

Please sign in to comment.