From 8de54a306526b2fe38dd6a31a1d840aeb505d14b Mon Sep 17 00:00:00 2001 From: Hector Ramos Date: Fri, 2 Nov 2018 15:24:33 -0700 Subject: [PATCH] Update copyright headers to yearless format --- LICENSE | 4 +- website/core/Footer.js | 2 +- website/image-check.js | 24 +++++------ website/pages/en/help.js | 80 ++++++++++++++++++------------------ website/pages/en/index.js | 26 ++++++------ website/pages/en/showcase.js | 22 +++++----- website/pages/en/versions.js | 66 +++++++++++++++-------------- website/siteConfig.js | 74 ++++++++++++++++----------------- website/sync-guides.js | 2 +- 9 files changed, 148 insertions(+), 152 deletions(-) diff --git a/LICENSE b/LICENSE index d9021534ac8..b96dcb0480a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2015-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/website/core/Footer.js b/website/core/Footer.js index e834b6b86de..2239fee084d 100644 --- a/website/core/Footer.js +++ b/website/core/Footer.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2017-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/website/image-check.js b/website/image-check.js index 565e125e232..12b500af6ac 100644 --- a/website/image-check.js +++ b/website/image-check.js @@ -1,20 +1,20 @@ /** - * Copyright (c) 2017-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -const glob = require("glob-promise"); -const fs = require("fs-extra"); -const path = require("path"); -const siteConfig = require("./siteConfig"); +const glob = require('glob-promise'); +const fs = require('fs-extra'); +const path = require('path'); +const siteConfig = require('./siteConfig'); const imageReferenceRegExp = new RegExp(/!\[.*?\]\((.*)\)/g); let missingAssets = []; let queue = Promise.resolve(); -glob("../docs/**/*.md") +glob('../docs/**/*.md') .then(files => { files.forEach(file => { queue = queue @@ -25,10 +25,10 @@ glob("../docs/**/*.md") let matches; while ((matches = imageReferenceRegExp.exec(contents))) { const pathToFile = path.join( - "..", - matches[1].replace(siteConfig.baseUrl, "") + '..', + matches[1].replace(siteConfig.baseUrl, '') ); - missingAssets.push({ imagePath: pathToFile, markdownPath: file }); + missingAssets.push({imagePath: pathToFile, markdownPath: file}); } }); }); @@ -37,7 +37,7 @@ glob("../docs/**/*.md") .then(() => { queue = Promise.resolve(); missingAssets.forEach(missingAsset => { - const { imagePath, markdownPath } = missingAsset; + const {imagePath, markdownPath} = missingAsset; queue = queue .then(() => { return fs.stat(imagePath); @@ -45,9 +45,9 @@ glob("../docs/**/*.md") .then(stats => {}) .catch(e => { console.error( - "Could not find " + + 'Could not find ' + imagePath + - " which has at least one reference in " + + ' which has at least one reference in ' + markdownPath + ". Did you forget to add the asset to '/docs/assets'?" ); diff --git a/website/pages/en/help.js b/website/pages/en/help.js index e1986ba1b6e..6adce7f5360 100755 --- a/website/pages/en/help.js +++ b/website/pages/en/help.js @@ -1,16 +1,16 @@ /** - * Copyright (c) 2017-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -const React = require("react"); +const React = require('react'); -const CompLibrary = require("../../core/CompLibrary.js"); +const CompLibrary = require('../../core/CompLibrary.js'); const Container = CompLibrary.Container; -const siteConfig = require(process.cwd() + "/siteConfig.js"); +const siteConfig = require(process.cwd() + '/siteConfig.js'); class Help extends React.Component { render() { @@ -33,23 +33,23 @@ class Help extends React.Component { Facebook's React Native team. But there are far more people in the community who make key contributions and fix things. If the issue you are facing is code related, you should consider checking the - open issues in the{" "} + open issues in the{' '} main repository - . If you cannot find an existing issue, please{" "} + . If you cannot find an existing issue, please{' '} use the Bug Report template - {" "} + {' '} to create an issue with a minimal example.

Stack Overflow

Many members of the community use Stack Overflow to ask questions. - Read through the{" "} + Read through the{' '} existing questions - {" "} - tagged with react-native or{" "} + {' '} + tagged with react-native or{' '} ask your own ! @@ -57,16 +57,16 @@ class Help extends React.Component {

Staying up to date

Official channels

- The React Twitter account{" "} - covers both React and React Native. Follow the React Native{" "} - Twitter account and{" "} + The React Twitter account{' '} + covers both React and React Native. Follow the React Native{' '} + Twitter account and{' '} blog to find out what's happening in the world of React Native.

Discussion Forum

For longer-form conversations about React Native, we’ve set up a - discussion forum at{" "} + discussion forum at{' '} discuss.reactjs.org . This is a great place for discussion about best practices and @@ -78,61 +78,61 @@ class Help extends React.Component { React Native is still a young framework, and its rapid release cycle leaves the door open for discussing how it can evolve at every step of the way. If you want to know what the current proposals and RFCs - are talking about, you can read through the{" "} + are talking about, you can read through the{' '} Discussions and Proposals repository - {"."} + {'.'}

Conferences

- There are a lot of{" "} + There are a lot of{' '} React Native Meetups - {" "} + {' '} that happen around the world. Often there is React Native content in React meetups as well. React Native has been covered often in past React Conf talks. Videos for these talks can be found online in the - following playlists:{" "} + following playlists:{' '} React Conf 2017 - {", "} + {', '} React Conf 2016 - {", "} - and{" "} + {', '} + and{' '} React Conf 2015 - {". "} + {'. '} The next React Conf will take place October 25 and 26 in Henderson, Nevada. You can also find - a list of dedicated React Native conferences{" "} + a list of dedicated React Native conferences{' '} here - {"."} + {'.'}

Communities at large

Reactiflux Chat

- If you need an answer right away, check out the{" "} - Reactiflux Discord{" "} + If you need an answer right away, check out the{' '} + Reactiflux Discord{' '} community. There are usually a number of React Native experts there who can help out or point you to somewhere you might want to look.

Forum-like groups

- If you want to create less temporary conversations, check out the{" "} + If you want to create less temporary conversations, check out the{' '} React Native Spectrum - {" "} - community or the{" "} + {' '} + community or the{' '} React Native Facebook Group - {", "} which is more focused on post announcements, blog posts, - talks, videos, cool new libraries, and apps.{" "} + {', '} which is more focused on post announcements, blog posts, + talks, videos, cool new libraries, and apps.{' '} The Expo Forums are a good place to get help if you are using Expo.

@@ -140,32 +140,32 @@ class Help extends React.Component {

Some companies actively involved in the React Native have also their own communication channels focused towards the projects they - maintain, like{" "} + maintain, like{' '} Callstack.io's Discord server - {", "} + {', '} Invertase.io's Discord server (e.g. React Native Firebase) - {", "} + {', '} Infinite Red's Slack Group - {" and "} + {' and '} The Expo Slack Group.

Content sharing

- DevTo community's and{" "} + DevTo community's and{' '} Medium's React Native tag are places where you can share React Native projects, articles and tutorials as well as start discussions and ask for feedback on React Native related topics. (but remember to give some - love to the{" "} + love to the{' '} main documentation - {" "} + {' '} too!)

@@ -175,7 +175,7 @@ class Help extends React.Component { } Help.defaultProps = { - language: "en" + language: 'en', }; module.exports = Help; diff --git a/website/pages/en/index.js b/website/pages/en/index.js index 11cbd14d726..68bbdcfac25 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -1,17 +1,17 @@ /** - * Copyright (c) 2017-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -const React = require("react"); +const React = require('react'); -const CompLibrary = require("../../core/CompLibrary.js"); +const CompLibrary = require('../../core/CompLibrary.js'); const MarkdownBlock = CompLibrary.MarkdownBlock; const Container = CompLibrary.Container; -const siteConfig = require(process.cwd() + "/siteConfig.js"); +const siteConfig = require(process.cwd() + '/siteConfig.js'); const pinnedApps = siteConfig.users.filter(app => { return app.pinned; @@ -23,8 +23,7 @@ class Button extends React.Component { + target={this.props.target}> {this.props.children} ); @@ -36,12 +35,11 @@ class HomeCallToAction extends React.Component { return (
-
@@ -92,8 +90,8 @@ class AppList extends React.Component { _renderAppIcon(app) { let imgSource = app.icon; - if (!app.icon.startsWith("http")) { - imgSource = siteConfig.baseUrl + "img/showcase/" + app.icon; + if (!app.icon.startsWith('http')) { + imgSource = siteConfig.baseUrl + 'img/showcase/' + app.icon; } return {app.name}; } @@ -255,8 +253,8 @@ class MiniShowcase extends React.Component {

Thousands of apps are using React Native, from established Fortune 500 companies to hot new startups. If you're curious to see what can be - accomplished with React Native,{" "} - check out these apps! + accomplished with React Native,{' '} + check out these apps!

diff --git a/website/pages/en/showcase.js b/website/pages/en/showcase.js index 7b3c98325fe..ca7b969b302 100644 --- a/website/pages/en/showcase.js +++ b/website/pages/en/showcase.js @@ -1,16 +1,16 @@ /** - * Copyright (c) 2017-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -const React = require("react"); +const React = require('react'); -const CompLibrary = require("../../core/CompLibrary.js"); +const CompLibrary = require('../../core/CompLibrary.js'); const Container = CompLibrary.Container; -const siteConfig = require(process.cwd() + "/siteConfig.js"); +const siteConfig = require(process.cwd() + '/siteConfig.js'); const showcaseApps = siteConfig.users; const pinnedApps = showcaseApps.filter(app => { @@ -55,8 +55,8 @@ class AppList extends React.Component { _renderAppIcon(app) { let imgSource = app.icon; - if (!app.icon.startsWith("http")) { - imgSource = siteConfig.baseUrl + "img/showcase/" + app.icon; + if (!app.icon.startsWith('http')) { + imgSource = siteConfig.baseUrl + 'img/showcase/' + app.icon; } return {app.name}; } @@ -90,20 +90,20 @@ class AppList extends React.Component { iOS ) : ( - "" + '' ); var linkPlayStore = app.linkPlayStore ? ( Android ) : ( - "" + '' ); return (

{linkAppStore} - {linkAppStore && linkPlayStore ? " · " : ""} + {linkAppStore && linkPlayStore ? ' · ' : ''} {linkPlayStore}

); @@ -114,7 +114,7 @@ class Showcase extends React.Component { render() { return (
- +

Who's using React Native?

@@ -144,7 +144,7 @@ class Showcase extends React.Component { } Showcase.defaultProps = { - language: "en" + language: 'en', }; module.exports = Showcase; diff --git a/website/pages/en/versions.js b/website/pages/en/versions.js index c31e64aebc2..f02d6394d85 100644 --- a/website/pages/en/versions.js +++ b/website/pages/en/versions.js @@ -1,46 +1,45 @@ /** - * Copyright (c) 2017-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -const React = require("react"); +const React = require('react'); -const CompLibrary = require("../../core/CompLibrary.js"); +const CompLibrary = require('../../core/CompLibrary.js'); const Container = CompLibrary.Container; const CWD = process.cwd(); -const siteConfig = require(CWD + "/siteConfig.js"); -const versions = require(CWD + "/versions.json"); +const siteConfig = require(CWD + '/siteConfig.js'); +const versions = require(CWD + '/versions.json'); class VersionItem extends React.Component { render() { const version = this.props.version; - const versionName = version === "next" ? "Master" : version; + const versionName = version === 'next' ? 'Master' : version; const isCurrentVersion = this.props.currentVersion === version; - const isNext = version === "next"; - const isRC = version.toUpperCase().indexOf("-RC") !== -1; + const isNext = version === 'next'; + const isRC = version.toUpperCase().indexOf('-RC') !== -1; - const latestMajorVersion = versions[0].toUpperCase().replace("-RC", ""); + const latestMajorVersion = versions[0].toUpperCase().replace('-RC', ''); const documentationLink = ( + 'docs/' + + (isCurrentVersion ? '' : version + '/') + + 'getting-started.html' + }> Documentation ); - let releaseNotesURL = "https://github.com/facebook/react-native/releases"; - let releaseNotesTitle = "Changelog"; + let releaseNotesURL = 'https://github.com/facebook/react-native/releases'; + let releaseNotesTitle = 'Changelog'; if (isNext) { releaseNotesURL = `https://github.com/facebook/react-native/compare/${latestMajorVersion}-stable...master`; - releaseNotesTitle = "Commits since " + latestMajorVersion; + releaseNotesTitle = 'Commits since ' + latestMajorVersion; } else if (!isRC) { releaseNotesURL = `https://github.com/facebook/react-native/releases/tag/v${version}.0`; } @@ -60,11 +59,11 @@ class VersionItem extends React.Component { class Versions extends React.Component { render() { let currentVersion = versions.length > 0 ? versions[0] : null; - let latestVersions = ["next"].concat( - versions.filter(version => version.indexOf("-RC") !== -1) + let latestVersions = ['next'].concat( + versions.filter(version => version.indexOf('-RC') !== -1) ); const stableVersions = versions.filter( - version => version.indexOf("-RC") === -1 + version => version.indexOf('-RC') === -1 ); return ( @@ -76,21 +75,20 @@ class Versions extends React.Component { that is coordinated on GitHub through the + 'https://github.com/react-native-community/react-native-releases' + }> react-native-releases - {" "} + {' '} repository. At the beginning of each month, a new release candidate - is created off the master branch of{" "} - + is created off the master branch of{' '} + facebook/react-native . The release candidate will soak for a month to allow - contributors like yourself to{" "} - + contributors like yourself to{' '} + verify the changes - {" "} - and to identify any issues by{" "} + {' '} + and to identify any issues by{' '} writing clear, actionable bug reports . Eventually, the release candidate will be promoted to stable. @@ -108,7 +106,7 @@ class Versions extends React.Component { {latestVersions.map(function(version) { return ( Stable versions

The most recent stable version will be used automatically whenever a - new project is created using the react-native init{" "} + new project is created using the react-native init{' '} command.

@@ -128,7 +126,7 @@ class Versions extends React.Component { {stableVersions.map(function(version) { return (