Skip to content

Commit 3b1c2c1

Browse files
committed
fix: test output, webpack resolution, clean build
- remove build test output for ts - actual clean build (use rimraf not rm -rf) - remove css bundling workaround, use seperate entrypoint for webpack bundle vs css
1 parent 19d8d7f commit 3b1c2c1

File tree

14 files changed

+43
-32
lines changed

14 files changed

+43
-32
lines changed

package.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@
55
"packages/*",
66
"packages/examples/*"
77
],
8-
"browserify-shim": {
9-
"react": "global:React",
10-
"react-dom": "global:ReactDOM"
11-
},
12-
"browser": {
13-
"copy-to-clipboard": "./node-modules/copy-to-clipboard/index.js"
14-
},
158
"husky": {
169
"hooks": {
1710
"pre-commit": "yarn lint",
@@ -22,7 +15,7 @@
2215
"build": "yarn run build-clean && yarn build-ts && yarn build-js",
2316
"build-js": "lerna run build --scope codemirror-graphql --scope graphql-language-service-server --scope graphiql graphql-language-service",
2417
"build-ts": "tsc --build",
25-
"build-clean": "tsc --build --clean && rm -rf 'packages/**/src/{dist,esm,bundle}' && lerna run build-clean --parallel",
18+
"build-clean": "tsc --build --clean && rimraf 'packages/**/{dist,esm,bundle,coverage}' && lerna run build-clean --parallel",
2619
"build-demo": "lerna run build-demo",
2720
"build-bundles": "lerna run build-bundles",
2821
"test": "yarn run lint && yarn run check && yarn run build && yarn run testonly && yarn build-bundles && yarn run e2e && yarn build-demo",

packages/graphiql/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"analyze-bundle": "cross-env NODE_ENV=production CDN=1 ANALYZE=1 yarn webpack -p",
3434
"build": "yarn build-clean && yarn build-cjs && yarn build-esm && yarn build-flow",
3535
"build-clean": "rimraf esm dist",
36-
"build-cjs": "babel src --ignore __tests__ --out-dir dist/ && mkdirp dist/css && copy 'src/css/*.css' dist/css",
37-
"build-esm": "cross-env ESM=1 babel src --ignore __tests__ --out-dir esm/ && mkdirp dist/css && copy 'src/css/*.css' esm/css",
36+
"build-cjs": "babel src --ignore __tests__ --out-dir dist/",
37+
"build-esm": "cross-env ESM=1 babel src --ignore __tests__ --out-dir esm/",
3838
"build-bundles": "yarn build-bundles-clean && yarn build-bundles-dev && yarn build-bundles-min",
3939
"build-bundles-dev": "cross-env NODE_ENV=development CDN=1 yarn webpack -d --bail",
4040
"build-bundles-min": "cross-env NODE_ENV=production CDN=1 yarn webpack -p --bail",

packages/graphiql/resources/webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ const resultConfig = {
1717
'react-hot-loader/patch', // activate HMR for React
1818
'webpack-dev-server/client?http://localhost:8080', // bundle the client for webpack-dev-server and connect to the provided endpoint
1919
'webpack/hot/only-dev-server', // bundle the client for hot reloading, only- means to only hot reload for successful updates
20-
'./index.js', // the entry point of our app
20+
'./cdn.js', // the entry point of our app
2121
]
22-
: './index.js',
22+
: './cdn.js',
2323
context: rootPath('src'),
2424
output: {
2525
path: rootPath(),

packages/graphiql/src/cdn.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Copyright (c) 2019 GraphQL Contributors.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
import 'regenerator-runtime/runtime';
8+
9+
import './css/app.css';
10+
import './css/codemirror.css';
11+
import './css/foldgutter.css';
12+
import './css/info.css';
13+
import './css/jump.css';
14+
import './css/lint.css';
15+
import './css/loading.css';
16+
import './css/show-hint.css';
17+
18+
import './css/doc-explorer.css';
19+
import './css/history.css';
20+
21+
import { GraphiQL } from './components/GraphiQL';
22+
export default GraphiQL;

packages/graphiql/src/index.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,5 @@
66
*/
77
import 'regenerator-runtime/runtime';
88

9-
import './css/app.css';
10-
import './css/codemirror.css';
11-
import './css/foldgutter.css';
12-
import './css/info.css';
13-
import './css/jump.css';
14-
import './css/lint.css';
15-
import './css/loading.css';
16-
import './css/show-hint.css';
17-
18-
import './css/doc-explorer.css';
19-
import './css/history.css';
20-
219
import { GraphiQL } from './components/GraphiQL';
2210
export default GraphiQL;

packages/graphql-language-service-interface/tsconfig.esm.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
{
1616
"path": "../graphql-language-service-utils"
1717
}
18-
]
18+
],
19+
"exclude": ["**/__tests__/**","**/*.spec.*"]
1920
}

packages/graphql-language-service-interface/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
{
1616
"path": "../graphql-language-service-utils"
1717
}
18-
]
18+
],
19+
"exclude": ["**/__tests__/**","**/*.spec.*"]
1920
}

packages/graphql-language-service-parser/tsconfig.esm.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
{
1010
"path": "../graphql-language-service-types"
1111
}
12-
]
12+
],
13+
"exclude": ["**/__tests__/**","**/*.spec.*"]
1314
}

packages/graphql-language-service-parser/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
{
1010
"path": "../graphql-language-service-types"
1111
}
12-
]
12+
],
13+
"exclude": ["**/__tests__/**","**/*.spec.*"]
1314
}

packages/graphql-language-service-types/tsconfig.esm.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"compilerOptions": {
44
"rootDir": "./src",
55
"outDir": "./esm",
6-
}
6+
},
7+
"exclude": ["**/__tests__/**","**/*.spec.*"]
78
}

0 commit comments

Comments
 (0)