Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: move all devDependencies to root package.json, prettier all files #857

Merged
merged 13 commits into from Dec 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 3 additions & 6 deletions .circleci/config.yml
Expand Up @@ -28,14 +28,11 @@ jobs:
- checkout
- restore_cache:
keys:
- v2-dependencies-{{ checksum "yarn.lock" }}
- v2-dependencies-
- v2-dependencies-{{ checksum "yarn.lock" }}
- v2-dependencies-
- run:
name: Install and Link
command: |
yarn install
yarn lerna exec yarn install
- run: yarn lerna exec yarn install
command: yarn --lockfile
- save_cache:
paths:
- node_modules
Expand Down
12 changes: 7 additions & 5 deletions .eslintignore
@@ -1,12 +1,14 @@
node_modules
artifacts
dist
build
.next
artifacts
.cache
node_modules
public
docsearch.min.js
.next
.*cache
*.min.js

examples/**/node_modules/**/*.*

packages/**/fixtures/**/*.mdx
packages/**/test/**/*.mdx
packages/gatsby-theme-mdx/src/components/header.js
Expand Down
34 changes: 15 additions & 19 deletions .eslintrc.yml
Expand Up @@ -28,7 +28,7 @@ rules:
no-unused-vars:
- error
- args: after-used
argsIgnorePattern: "^_"
argsIgnorePattern: '^_'
no-var: error
import/no-extraneous-dependencies: error
prettier/prettier: error
Expand All @@ -43,38 +43,34 @@ settings:
version: 16.3.2

overrides:
-
files: "*.md"
- files: '*.md'
extends: plugin:mdx/recommended

-
files: "*.mdx"
- files: '*.mdx'
extends:
- plugin:mdx/recommended
- plugin:mdx/overrides
rules:
import/no-extraneous-dependencies: 0

-
files:
- "**/test/**/*.js"
- "**/*.test.js"
- files:
- '**/test/**/*.js'
- '**/*.test.js'
env:
jest: true
-
files:
- "examples/**/*.js"
rules:
import/no-extraneous-dependencies: 0
- files:
- 'examples/**/*.js'
env:
browser: true
-
files:
- "docs/**/*.js"
- "examples/**/*.js"
- files:
- 'docs/**/*.js'
- 'examples/**/*.js'
rules:
import/no-unresolved: off
import/no-extraneous-dependencies: off
-
files:
- "examples/next/**/*.js"
- files:
- 'examples/next/**/*.js'
rules:
react/react-in-jsx-scope: off
2 changes: 1 addition & 1 deletion .nowignore
@@ -1,3 +1,3 @@
examples
node_modules
.cache
.*cache
2 changes: 2 additions & 0 deletions .prettierignore
@@ -1,4 +1,6 @@
.next
dist
node_modules
*.md
*.mdx
*.min.*
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -7,3 +7,5 @@ os:
- linux
- osx
cache: yarn
install: yarn --lockfile
scripts: yarn test
1 change: 1 addition & 0 deletions .yarnrc
@@ -0,0 +1 @@
ignore-engines true
4 changes: 4 additions & 0 deletions babel.config.js
@@ -0,0 +1,4 @@
module.exports = {
babelrcRoots: ['.', '.docs', './packages/*', './examples/*/*'],
plugins: ['@babel/syntax-dynamic-import', '@babel/proposal-class-properties']
}
13 changes: 13 additions & 0 deletions examples/create-react-app/.babelrc
@@ -0,0 +1,13 @@
{
"presets": [
[
"@babel/env",
{
"corejs": 2,
"useBuiltIns": "usage"
}
],
"@babel/react"
],
"plugins": ["macros"]
}
25 changes: 18 additions & 7 deletions examples/create-react-app/package.json
Expand Up @@ -2,22 +2,33 @@
"name": "create-react-app",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "react-scripts build",
"eject": "react-scripts eject",
"start": "react-scripts start",
"test": "react-scripts test"
},
"dependencies": {
"mdx.macro": "^0.2.8",
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react-scripts": "2.1.8"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
],
"jest": {
"moduleFileExtensions": [
"js",
"json",
"jsx",
"ts",
"tsx",
"node",
"macro"
]
}
}
13 changes: 8 additions & 5 deletions examples/create-react-app/public/index.html
@@ -1,15 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
6 changes: 3 additions & 3 deletions examples/create-react-app/src/index.css
@@ -1,14 +1,14 @@
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
5 changes: 1 addition & 4 deletions examples/parcel/.babelrc
@@ -1,6 +1,3 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
]
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
24 changes: 11 additions & 13 deletions examples/parcel/index.html
@@ -1,16 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Parcel Plugin MDX Example</title>
</head>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Parcel Plugin MDX Example</title>
</head>

<body>
<div id="demo"></div>
<script src="src/main.js"></script>
</body>

</html>
<body>
<div id="demo"></div>
<script src="src/main.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions examples/react-static/src/app.css
@@ -1,6 +1,6 @@
body {
font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial,
'Lucida Grande', sans-serif;
font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue',
Helvetica, Arial, 'Lucida Grande', sans-serif;
font-weight: 300;
font-size: 16px;
margin: 0;
Expand Down
3 changes: 3 additions & 0 deletions examples/vue/.babelrc
@@ -0,0 +1,3 @@
{
"presets": ["@vue/app"]
}
5 changes: 0 additions & 5 deletions examples/vue/babel.config.js

This file was deleted.

13 changes: 8 additions & 5 deletions examples/vue/public/index.html
@@ -1,15 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title>vue</title>
</head>
<body>
<noscript>
<strong>We're sorry but vue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
<strong
>We're sorry but vue doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong
>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
Expand Down