mirror of
https://github.com/facebook/react.git
synced 2026-02-24 12:43:00 +00:00
* Add license headers on build bundles * Add the filename IMO to header * Preserve headers in production bundles * Use ECMASCRIPT5_STRICT to preserve "use strict"
36 lines
904 B
JavaScript
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,
|
|
};
|