Files
react/scripts/rollup/header.js
guoyong yi 8b7082eced Add license headers on build bundles (#10490)
* Add license headers on build bundles

* Add the filename IMO to header

* Preserve headers in production bundles

* Use ECMASCRIPT5_STRICT to preserve "use strict"
2017-09-07 19:38:16 +01:00

36 lines
904 B
JavaScript

'use strict';
function getProvidesHeader(hasteFinalName) {
return `/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @noflow
* @providesModule ${hasteFinalName}
*/
`;
}
function getHeader(filename, reactVersion) {
return `/** @license React v${reactVersion}
* ${filename}
*
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
`;
}
module.exports = {
getProvidesHeader,
getHeader,
};