Skip to content

Commit

Permalink
chore(v2): add Facebook copyright headers (facebook#1067)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangshun authored Oct 26, 2018
1 parent fd780f1 commit c9e29c8
Show file tree
Hide file tree
Showing 112 changed files with 808 additions and 43 deletions.
7 changes: 7 additions & 0 deletions v2/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const OFF = 0;
const WARNING = 1;
const ERROR = 2;
Expand Down
7 changes: 7 additions & 0 deletions v2/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

module.exports = {
presets: ['@babel/env', '@babel/react'],
};
7 changes: 7 additions & 0 deletions v2/bin/docusaurus.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/usr/bin/env node

/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const chalk = require('chalk');
const semver = require('semver');
const path = require('path');
Expand Down
7 changes: 7 additions & 0 deletions v2/jest.transform.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const babelConfig = require('./babel.config');

module.exports = require('babel-jest').createTransformer(babelConfig);
7 changes: 7 additions & 0 deletions v2/lib/commands/build.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const webpack = require('webpack');
const path = require('path');
const chalk = require('chalk');
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/commands/deploy.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const path = require('path');
const shell = require('shelljs');
const fs = require('fs-extra');
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/commands/eject.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const fs = require('fs-extra');
const chalk = require('chalk');
const path = require('path');
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/commands/init.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

module.exports = async function init(projectDir, cliOptions = {}) {
console.log('Init command invoked ...');
console.log(projectDir);
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/commands/start.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const path = require('path');
const fs = require('fs-extra');
const chalk = require('chalk');
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/core/App.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import {renderRoutes} from 'react-router-config';

import routes from '@generated/routes'; // eslint-disable-line
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/core/clientEntry.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import Loadable from 'react-loadable';
import {BrowserRouter} from 'react-router-dom';
Expand Down
2 changes: 1 addition & 1 deletion v2/lib/core/devTemplate.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
<div id="app"></div>
<script src="<%= htmlWebpackPlugin.files.chunks.main.entry %>"></script>
</body>
</html>
</html>
7 changes: 7 additions & 0 deletions v2/lib/core/preload.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import {matchRoutes} from 'react-router-config';

/**
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/core/serverEntry.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import {StaticRouter} from 'react-router-dom';
import ReactDOMServer from 'react-dom/server';
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/core/sitemap.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const sitemap = require('sitemap');

module.exports = async function createSitemap({
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const build = require('./commands/build');
const init = require('./commands/init');
const start = require('./commands/start');
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/load/blog.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const globby = require('globby');
const path = require('path');
const fs = require('fs-extra');
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/load/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const fs = require('fs-extra');
const path = require('path');

Expand Down
7 changes: 7 additions & 0 deletions v2/lib/load/docs/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const path = require('path');
const globby = require('globby');
const createOrder = require('./order');
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/load/docs/metadata.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const fs = require('fs-extra');
const path = require('path');
const {getSubFolder, idx, parse} = require('../utils');
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/load/docs/order.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

// build the docs meta such as next, previous, category and sidebar

module.exports = function createOrder(allSidebars = {}) {
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/load/docs/sidebars.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const fs = require('fs-extra');
const path = require('path');
const {idx} = require('../utils');
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/load/env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const fs = require('fs-extra');
const path = require('path');
const {idx} = require('./utils');
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/load/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const path = require('path');
const loadBlog = require('./blog');
const loadConfig = require('./config');
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/load/pages.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const globby = require('globby');
const path = require('path');
const {encodePath, fileToPath, idx} = require('./utils');
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/load/routes.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

async function genRoutesConfig({
docsMetadatas = {},
pagesMetadatas = [],
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/load/theme.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const fs = require('fs-extra');
const path = require('path');

Expand Down
7 changes: 7 additions & 0 deletions v2/lib/load/utils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const path = require('path');
const fm = require('front-matter');
const escapeStringRegexp = require('escape-string-regexp');
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/theme/BlogPage/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/* eslint-disable */
import React from 'react';
import {Link} from 'react-router-dom';
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/theme/BlogPost/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/* eslint-disable */
import React from 'react';
import {Link} from 'react-router-dom';
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/theme/BlogPost/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

.postHeader {
margin-bottom: 10px;
}
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/theme/Doc/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/* eslint-disable */
import React from 'react';
import {Link} from 'react-router-dom';
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/theme/Doc/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

.mainContainer {
padding-left: 300px;
}
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/theme/DocsPaginator/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import {Link} from 'react-router-dom';

Expand Down
7 changes: 7 additions & 0 deletions v2/lib/theme/DocsPaginator/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

.paginatorContainer {
display: flex;
flex-direction: row;
Expand Down
7 changes: 7 additions & 0 deletions v2/lib/theme/Footer/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import {Link} from 'react-router-dom';

Expand Down
Loading

0 comments on commit c9e29c8

Please sign in to comment.