Skip to content

Commit

Permalink
Scope all cra packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradfordlemley committed Feb 2, 2018
1 parent 5fc9098 commit be84d03
Show file tree
Hide file tree
Showing 21 changed files with 110 additions and 82 deletions.
6 changes: 3 additions & 3 deletions packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "babel-preset-react-app",
"name": "@bradfordlemley/babel-preset-react-app",
"version": "3.1.1",
"description": "Babel preset used by Create React App",
"repository": "facebookincubator/create-react-app",
"repository": "github:bradfordlemley/create-react-app",
"license": "MIT",
"bugs": {
"url": "https://github.com/facebookincubator/create-react-app/issues"
"url": "https://github.com/bradfordlemley/create-react-app/issues"
},
"files": [
"index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/confusing-browser-globals/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "confusing-browser-globals",
"name": "@bradfordlemley/confusing-browser-globals",
"version": "1.0.0",
"description": "A list of browser globals that are often used by mistake instead of local variables",
"license": "MIT",
"main": "index.js",
"scripts": {
"test": "jest"
},
"repository": "facebookincubator/create-react-app",
"repository": "github:bradfordlemley/create-react-app",
"keywords": [
"eslint",
"globals"
Expand Down
6 changes: 3 additions & 3 deletions packages/create-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "create-react-app",
"name": "@bradfordlemley/create-react-app",
"version": "1.5.1",
"keywords": [
"react"
],
"description": "Create React apps with no build configuration.",
"repository": "facebookincubator/create-react-app",
"repository": "github:bradfordlemley/create-react-app",
"license": "MIT",
"engines": {
"node": ">=4"
},
"bugs": {
"url": "https://github.com/facebookincubator/create-react-app/issues"
"url": "https://github.com/bradfordlemley/create-react-app/issues"
},
"files": [
"index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// This is dangerous as it hides accidentally undefined variables.
// We blacklist the globals that we deem potentially confusing.
// To use them, explicitly reference them, e.g. `window.name` or `window.status`.
var restrictedGlobals = require('confusing-browser-globals');
var restrictedGlobals = require('@bradfordlemley/confusing-browser-globals');

module.exports = {
root: true,
Expand Down
8 changes: 4 additions & 4 deletions packages/eslint-config-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "eslint-config-react-app",
"name": "@bradfordlemley/eslint-config-react-app",
"version": "2.1.0",
"description": "ESLint configuration used by Create React App",
"repository": "facebookincubator/create-react-app",
"repository": "github:bradfordlemley/create-react-app",
"license": "MIT",
"bugs": {
"url": "https://github.com/facebookincubator/create-react-app/issues"
"url": "https://github.com/bradfordlemley/create-react-app/issues"
},
"files": [
"index.js"
Expand All @@ -19,6 +19,6 @@
"eslint-plugin-react": "^7.1.0"
},
"dependencies": {
"confusing-browser-globals": "^1.0.0"
"@bradfordlemley/confusing-browser-globals": "^1.0.0"
}
}
22 changes: 11 additions & 11 deletions packages/react-dev-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ It works in tandem with [HtmlWebpackPlugin](https://github.com/ampedandwired/htm
```js
var path = require('path');
var HtmlWebpackPlugin = require('html-dev-plugin');
var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
var InterpolateHtmlPlugin = require('@bradfordlemley/react-dev-utils/InterpolateHtmlPlugin');

// Webpack config
var publicUrl = '/my-custom-url';
Expand Down Expand Up @@ -63,7 +63,7 @@ This Webpack plugin ensures that relative imports from app's source directory do

```js
var path = require('path');
var ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
var ModuleScopePlugin = require('@bradfordlemley/react-dev-utils/ModuleScopePlugin');


module.exports = {
Expand All @@ -88,7 +88,7 @@ See [#186](https://github.com/facebookincubator/create-react-app/issues/186) for

```js
var path = require('path');
var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
var WatchMissingNodeModulesPlugin = require('@bradfordlemley/react-dev-utils/WatchMissingNodeModulesPlugin');

// Webpack config
module.exports = {
Expand All @@ -113,7 +113,7 @@ If a file is not found, prints a warning message and returns `false`.

```js
var path = require('path');
var checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
var checkRequiredFiles = require('@bradfordlemley/react-dev-utils/checkRequiredFiles');

if (!checkRequiredFiles([
path.resolve('public/index.html'),
Expand All @@ -128,7 +128,7 @@ if (!checkRequiredFiles([
Clears the console, hopefully in a cross-platform way.

```js
var clearConsole = require('react-dev-utils/clearConsole');
var clearConsole = require('@bradfordlemley/react-dev-utils/clearConsole');

clearConsole();
console.log('Just cleared the screen!');
Expand All @@ -140,7 +140,7 @@ This is our custom ESLint formatter that integrates well with Create React App c
You can use the default one instead if you prefer so.

```js
const eslintFormatter = require('react-dev-utils/eslintFormatter');
const eslintFormatter = require('@bradfordlemley/react-dev-utils/eslintFormatter');

// In your webpack config:
// ...
Expand Down Expand Up @@ -178,7 +178,7 @@ Prints the JS and CSS asset sizes after the build, and includes a size compariso
var {
measureFileSizesBeforeBuild,
printFileSizesAfterBuild,
} = require('react-dev-utils/FileSizeReporter');
} = require('@bradfordlemley/react-dev-utils/FileSizeReporter');

measureFileSizesBeforeBuild(buildFolder).then(previousFileSizes => {
return cleanAndRebuild().then(webpackStats => {
Expand All @@ -194,7 +194,7 @@ Extracts and prettifies warning and error messages from webpack [stats](https://
```js
var webpack = require('webpack');
var config = require('../config/webpack.config.dev');
var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
var formatWebpackMessages = require('@bradfordlemley/react-dev-utils/formatWebpackMessages');

var compiler = webpack(config);

Expand Down Expand Up @@ -226,7 +226,7 @@ Prettify some known build errors.
Pass an Error object to log a prettified error message in the console.

```
const printBuildError = require('react-dev-utils/printBuildError')
const printBuildError = require('@bradfordlemley/react-dev-utils/printBuildError')
try {
build()
} catch(e) {
Expand All @@ -245,7 +245,7 @@ in /Users/developer/create-react-app
```

```js
var getProcessForPort = require('react-dev-utils/getProcessForPort');
var getProcessForPort = require('@bradfordlemley/react-dev-utils/getProcessForPort');

getProcessForPort(3000);
```
Expand All @@ -267,7 +267,7 @@ Otherwise, falls back to [opn](https://github.com/sindresorhus/opn) behavior.

```js
var path = require('path');
var openBrowser = require('react-dev-utils/openBrowser');
var openBrowser = require('@bradfordlemley/react-dev-utils/openBrowser');

if (openBrowser('http://localhost:3000')) {
console.log('The browser tab has been opened!');
Expand Down
8 changes: 4 additions & 4 deletions packages/react-dev-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "react-dev-utils",
"name": "@bradfordlemley/react-dev-utils",
"version": "5.0.0",
"description": "Webpack utilities used by Create React App",
"repository": "facebookincubator/create-react-app",
"repository": "github:bradfordlemley/create-react-app",
"license": "MIT",
"bugs": {
"url": "https://github.com/facebookincubator/create-react-app/issues"
"url": "https://github.com/bradfordlemley/create-react-app/issues"
},
"engines": {
"node": ">=6"
Expand Down Expand Up @@ -51,7 +51,7 @@
"is-root": "1.0.0",
"opn": "5.2.0",
"pkg-up": "2.0.0",
"react-error-overlay": "^4.0.0",
"@bradfordlemley/react-error-overlay": "^4.0.0",
"recursive-readdir": "2.2.1",
"shell-quote": "1.6.1",
"sockjs-client": "1.1.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dev-utils/webpackHotDevClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var stripAnsi = require('strip-ansi');
var url = require('url');
var launchEditorEndpoint = require('./launchEditorEndpoint');
var formatWebpackMessages = require('./formatWebpackMessages');
var ErrorOverlay = require('react-error-overlay');
var ErrorOverlay = require('@bradfordlemley/react-error-overlay');

ErrorOverlay.setEditorHandler(function editorHandler(errorLocation) {
// Keep this sync with errorOverlayMiddleware.js
Expand Down
2 changes: 1 addition & 1 deletion packages/react-error-overlay/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["react-app"]
"presets": ["@bradfordlemley/react-app"]
}
10 changes: 5 additions & 5 deletions packages/react-error-overlay/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react-error-overlay",
"name": "@bradfordlemley/react-error-overlay",
"version": "4.0.0",
"description": "An overlay for displaying stack frames.",
"main": "lib/index.js",
Expand All @@ -10,10 +10,10 @@
"build": "cross-env NODE_ENV=development node build.js",
"build:prod": "cross-env NODE_ENV=production node build.js"
},
"repository": "facebookincubator/create-react-app",
"repository": "github:bradfordlemley/create-react-app",
"license": "MIT",
"bugs": {
"url": "https://github.com/facebookincubator/create-react-app/issues"
"url": "https://github.com/bradfordlemley/create-react-app/issues"
},
"keywords": [
"overlay",
Expand All @@ -38,12 +38,12 @@
"babel-eslint": "^8.0.2",
"babel-jest": "^22.1.0",
"babel-loader": "^8.0.0-beta.0",
"babel-preset-react-app": "^3.1.1",
"@bradfordlemley/babel-preset-react-app": "^3.1.1",
"chalk": "^2.1.0",
"chokidar": "^2.0.0",
"cross-env": "5.1.3",
"eslint": "4.15.0",
"eslint-config-react-app": "^2.1.0",
"@bradfordlemley/eslint-config-react-app": "^2.1.0",
"eslint-plugin-flowtype": "2.41.0",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-jsx-a11y": "6.0.3",
Expand Down
4 changes: 3 additions & 1 deletion packages/react-error-overlay/webpack.config.iframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ module.exports = {
options: {
babelrc: false,
compact: false,
presets: ['babel-preset-react-app/dependencies'],
presets: [
'@bradfordlemley/babel-preset-react-app/dependencies',
],
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/bin/react-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ process.on('unhandledRejection', err => {
throw err;
});

const spawn = require('react-dev-utils/crossSpawn');
const spawn = require('@bradfordlemley/react-dev-utils/crossSpawn');
const args = process.argv.slice(2);

const scriptIndex = args.findIndex(
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/config/jest/babelTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
const babelJest = require('babel-jest');

module.exports = babelJest.createTransformer({
presets: [require.resolve('babel-preset-react-app')],
presets: [require.resolve('@bradfordlemley/babel-preset-react-app')],
// @remove-on-eject-begin
babelrc: false,
// @remove-on-eject-end
Expand Down
26 changes: 17 additions & 9 deletions packages/react-scripts/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const eslintFormatter = require('react-dev-utils/eslintFormatter');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const InterpolateHtmlPlugin = require('@bradfordlemley/react-dev-utils/InterpolateHtmlPlugin');
const WatchMissingNodeModulesPlugin = require('@bradfordlemley/react-dev-utils/WatchMissingNodeModulesPlugin');
const eslintFormatter = require('@bradfordlemley/react-dev-utils/eslintFormatter');
const ModuleScopePlugin = require('@bradfordlemley/react-dev-utils/ModuleScopePlugin');
const getClientEnvironment = require('./env');
const paths = require('./paths');

Expand Down Expand Up @@ -68,7 +68,7 @@ module.exports = {
// the line below with these two lines if you prefer the stock client:
// require.resolve('webpack-dev-server/client') + '?/',
// require.resolve('webpack/hot/dev-server'),
require.resolve('react-dev-utils/webpackHotDevClient'),
require.resolve('@bradfordlemley/react-dev-utils/webpackHotDevClient'),
// Finally, this is your app's code:
paths.appIndexJs,
// We include the app code last so that if there is a runtime error during
Expand Down Expand Up @@ -154,7 +154,9 @@ module.exports = {
formatter: eslintFormatter,
eslintPath: require.resolve('eslint'),
baseConfig: {
extends: [require.resolve('eslint-config-react-app')],
extends: [
require.resolve('@bradfordlemley/eslint-config-react-app'),
],
},
// @remove-on-eject-begin
ignore: false,
Expand Down Expand Up @@ -199,7 +201,9 @@ module.exports = {
// @remove-on-eject-begin
babelrc: false,
// @remove-on-eject-end
presets: [require.resolve('babel-preset-react-app')],
presets: [
require.resolve('@bradfordlemley/babel-preset-react-app'),
],
// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
Expand All @@ -223,7 +227,9 @@ module.exports = {
babelrc: false,
compact: false,
presets: [
require.resolve('babel-preset-react-app/dependencies'),
require.resolve(
'@bradfordlemley/babel-preset-react-app/dependencies'
),
],
cacheDirectory: true,
highlightCode: true,
Expand Down Expand Up @@ -286,7 +292,9 @@ module.exports = {
// @remove-on-eject-begin
babelrc: false,
// @remove-on-eject-end
presets: [require.resolve('babel-preset-react-app')],
presets: [
require.resolve('@bradfordlemley/babel-preset-react-app'),
],
cacheDirectory: true,
},
},
Expand Down
Loading

0 comments on commit be84d03

Please sign in to comment.