diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..774c15f3297b --- /dev/null +++ b/LICENSE @@ -0,0 +1,30 @@ +BSD License + +For Docusaurus software + +Copyright (c) 2017-present, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/PATENTS b/PATENTS new file mode 100644 index 000000000000..d4602119b86a --- /dev/null +++ b/PATENTS @@ -0,0 +1,33 @@ +Additional Grant of Patent Rights Version 2 + +"Software" means the Docusaurus software contributed by Facebook, Inc. + +Facebook, Inc. ("Facebook") hereby grants to each recipient of the Software +("you") a perpetual, worldwide, royalty-free, non-exclusive, irrevocable +(subject to the termination provision below) license under any Necessary +Claims, to make, have made, use, sell, offer to sell, import, and otherwise +transfer the Software. For avoidance of doubt, no license is granted under +Facebook’s rights in any patent claims that are infringed by (i) modifications +to the Software made by you or any third party or (ii) the Software in +combination with any software or other technology. + +The license granted hereunder will terminate, automatically and without notice, +if you (or any of your subsidiaries, corporate affiliates or agents) initiate +directly or indirectly, or take a direct financial interest in, any Patent +Assertion: (i) against Facebook or any of its subsidiaries or corporate +affiliates, (ii) against any party if such Patent Assertion arises in whole or +in part from any software, technology, product or service of Facebook or any of +its subsidiaries or corporate affiliates, or (iii) against any party relating +to the Software. Notwithstanding the foregoing, if Facebook or any of its +subsidiaries or corporate affiliates files a lawsuit alleging patent +infringement against you in the first instance, and you respond by filing a +patent infringement counterclaim in that lawsuit against that party that is +unrelated to the Software, the license granted hereunder will not terminate +under section (i) of this paragraph due to such counterclaim. + +A "Necessary Claim" is a claim of a patent owned by Facebook that is +necessarily infringed by the Software standing alone. + +A "Patent Assertion" is any lawsuit or other action alleging direct, indirect, +or contributory infringement or inducement to infringe any patent, including a +cross-claim or counterclaim. diff --git a/examples/core/Footer.js b/examples/core/Footer.js index 1a2a4d944577..958e44161941 100644 --- a/examples/core/Footer.js +++ b/examples/core/Footer.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const React = require("react"); const githubButton = ( diff --git a/examples/languages.js b/examples/languages.js index 38f07528690b..da8b56a10d18 100644 --- a/examples/languages.js +++ b/examples/languages.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const languages = [ { enabled: false, diff --git a/examples/pages/en/help.js b/examples/pages/en/help.js index fe9ee0129726..6c3ce1cedccf 100755 --- a/examples/pages/en/help.js +++ b/examples/pages/en/help.js @@ -1,3 +1,11 @@ +/** + * Copyright (c) 20__-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. + */ const React = require("react"); const CompLibrary = require("../../core/CompLibrary.js"); diff --git a/examples/pages/en/index.js b/examples/pages/en/index.js index f4124ce9417a..b4dcd6998e8b 100755 --- a/examples/pages/en/index.js +++ b/examples/pages/en/index.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const React = require("react"); const CompLibrary = require("../../core/CompLibrary.js"); diff --git a/examples/pages/en/users.js b/examples/pages/en/users.js index f3ec586b4697..e189ab4e4d19 100644 --- a/examples/pages/en/users.js +++ b/examples/pages/en/users.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const React = require("react"); const CompLibrary = require("../../core/CompLibrary.js"); diff --git a/examples/siteConfig.js b/examples/siteConfig.js index 52375822f815..23ab4a9cbecd 100644 --- a/examples/siteConfig.js +++ b/examples/siteConfig.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const fs = require("fs"); /* List of projects/orgs using your project for the users page */ diff --git a/lib/build-files.js b/lib/build-files.js index 9545023f067d..0b4a6235957b 100644 --- a/lib/build-files.js +++ b/lib/build-files.js @@ -1,5 +1,14 @@ #!/usr/bin/env node +/** + * Copyright (c) 2017-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. + */ + require('babel-register') ({ ignore: false, "presets": ["react"] diff --git a/lib/copy-examples.js b/lib/copy-examples.js index 3273626632a2..ba54b1265760 100644 --- a/lib/copy-examples.js +++ b/lib/copy-examples.js @@ -1,6 +1,15 @@ #!/usr/bin/env node +/** + * Copyright (c) 2017-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. + */ + const CWD = process.cwd(); const fs = require('fs-extra'); -fs.copySync(__dirname + '/../examples/', CWD, {overwrite: false}); \ No newline at end of file +fs.copySync(__dirname + '/../examples/', CWD, {overwrite: false}); diff --git a/lib/core/BlogPageLayout.js b/lib/core/BlogPageLayout.js index ac34b022caff..0a180c38a5b2 100644 --- a/lib/core/BlogPageLayout.js +++ b/lib/core/BlogPageLayout.js @@ -1,4 +1,13 @@ -const BlogPost = require('./BlogPost.js'); +/** + * Copyright (c) 20__-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. + */ + + const BlogPost = require('./BlogPost.js'); const BlogSidebar = require('./BlogSidebar.js'); const Container = require('./Container.js'); const MetadataBlog = require('./MetadataBlog.js'); @@ -54,4 +63,4 @@ const BlogPageLayout = React.createClass({ }, }); -module.exports = BlogPageLayout; \ No newline at end of file +module.exports = BlogPageLayout; diff --git a/lib/core/BlogPost.js b/lib/core/BlogPost.js index 7a11b8cd3879..c4df3e7440ae 100644 --- a/lib/core/BlogPost.js +++ b/lib/core/BlogPost.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const Marked = require('./Marked.js'); const React = require('react'); @@ -95,4 +104,4 @@ class BlogPost extends React.Component { } } -module.exports = BlogPost; \ No newline at end of file +module.exports = BlogPost; diff --git a/lib/core/BlogPostLayout.js b/lib/core/BlogPostLayout.js index 3086d0f95106..04c0f2d9f966 100644 --- a/lib/core/BlogPostLayout.js +++ b/lib/core/BlogPostLayout.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const React = require('react'); const BlogPost = require('./BlogPost.js'); const BlogSidebar = require('./BlogSidebar.js'); @@ -34,4 +43,4 @@ class BlogPostLayout extends React.Component { } } -module.exports = BlogPostLayout; \ No newline at end of file +module.exports = BlogPostLayout; diff --git a/lib/core/BlogSidebar.js b/lib/core/BlogSidebar.js index fa477135e53d..bec1e6571792 100644 --- a/lib/core/BlogSidebar.js +++ b/lib/core/BlogSidebar.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const React = require('react'); const Container = require('./Container.js'); const SideNav = require('./nav/SideNav.js'); @@ -29,4 +38,4 @@ class BlogSidebar extends React.Component { } } -module.exports = BlogSidebar; \ No newline at end of file +module.exports = BlogSidebar; diff --git a/lib/core/CompLibrary.js b/lib/core/CompLibrary.js index e016e234b851..3f019d75493e 100644 --- a/lib/core/CompLibrary.js +++ b/lib/core/CompLibrary.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const Marked = require('./Marked.js'); const Container = require('./Container.js'); const GridBlock = require('./GridBlock.js'); @@ -6,4 +15,4 @@ module.exports = { Marked: Marked, Container: Container, GridBlock: GridBlock -} \ No newline at end of file +} diff --git a/lib/core/Container.js b/lib/core/Container.js index fc559b179d4b..34fcada0918f 100644 --- a/lib/core/Container.js +++ b/lib/core/Container.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const React = require('react'); const classNames = require('classnames'); @@ -35,4 +44,4 @@ Container.defaultProps = { wrapper: true, }; -module.exports = Container; \ No newline at end of file +module.exports = Container; diff --git a/lib/core/Doc.js b/lib/core/Doc.js index 20656f3e9769..4ba4d5954ec0 100644 --- a/lib/core/Doc.js +++ b/lib/core/Doc.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const React = require('react'); const Marked = require('./Marked.js'); @@ -31,4 +40,4 @@ class Doc extends React.Component { } } -module.exports = Doc; \ No newline at end of file +module.exports = Doc; diff --git a/lib/core/DocsLayout.js b/lib/core/DocsLayout.js index 29d6ac3aa38e..089d1234809c 100644 --- a/lib/core/DocsLayout.js +++ b/lib/core/DocsLayout.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const React = require('react'); const Container = require('./Container.js'); const Doc = require('./Doc.js'); diff --git a/lib/core/DocsSidebar.js b/lib/core/DocsSidebar.js index 849f423ee0ce..ac85f3bdefff 100644 --- a/lib/core/DocsSidebar.js +++ b/lib/core/DocsSidebar.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const Metadata = require('./metadata.js'); const React = require('react'); const Container = require('./Container.js'); diff --git a/lib/core/Footer.js b/lib/core/Footer.js index 67fa05cc8040..972fd46fe12e 100644 --- a/lib/core/Footer.js +++ b/lib/core/Footer.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 20__-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. + */ + const React = require('react'); const githubButton = ( @@ -43,7 +52,7 @@ class Footer extends React.Component { > Guides (or other categories) - - {this.props.config.algolia && + {this.props.config.algolia &&