Skip to content

Commit

Permalink
feat: editor tabs by @harshithpabbati, doc explorer as plugin
Browse files Browse the repository at this point in the history
Co-Authored By: Harshith Pabbati <[email protected]>
  • Loading branch information
acao committed May 11, 2020
1 parent 9afaf1a commit 9fd2682
Show file tree
Hide file tree
Showing 57 changed files with 350 additions and 2,083 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ module.exports = {
},
},
{
files: ['packages/{graphql-*,graphiql}/src/**'],
files: ['packages/{graphql-*,graphiql}/src/**', 'plugins/*/src/**'],
extends: ['plugin:jest/recommended'],
env: {
'jest/globals': true,
Expand Down Expand Up @@ -357,7 +357,7 @@ module.exports = {
},
{
// Resources are typically our helper scripts; make life easier there
files: ['resources/*.js', 'packages/*/resources/*.js'],
files: ['resources/*.js', '**/resources/*.js'],
rules: {
'no-console': 0,
'no-await-in-loop': 0,
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = {
'identity-obj-proxy',
'\\.(css|less)$': 'identity-obj-proxy',
'^graphql-language-([^/]+)': '<rootDir>/packages/graphql-language-$1/src',
'^@graphiql-plugins\\/([^/]+)': '<rootDir>/plugins/$1/src',
'^codemirror-graphql\\/([^]+)':
'<rootDir>/packages/codemirror-graphql/src/$1',
'^example-([^/]+)': '<rootDir>/examples/$1/src',
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packages": ["packages/*", "examples/*"],
"packages": ["packages/*", "examples/*", "plugins/*"],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "independent",
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"license": "MIT",
"workspaces": [
"packages/*",
"examples/*"
"examples/*",
"plugins/*"
],
"lint-staged": {
"*.{js,ts,jsx,tsx}": [
Expand Down Expand Up @@ -32,7 +33,7 @@
"build-docs": "rimraf 'packages/graphiql/lsp' && typedoc 'packages'",
"build-bundles": "yarn prebuild-bundles && yarn workspace graphiql run build-bundles",
"prebuild-bundles": "yarn build-ts-esm && yarn build-bundles-clean",
"build-bundles-clean": "rimraf '{packages,examples}/**/{bundle,cdn,webpack}' && lerna run build-bundles-clean",
"build-bundles-clean": "rimraf '{packages,examples,plugins}/**/{bundle,cdn,webpack}' && lerna run build-bundles-clean",
"tsc": "tsc --build",
"test": "jest",
"test-mocha": "yarn workspace codemirror-graphql run test",
Expand Down
298 changes: 0 additions & 298 deletions packages/graphiql/.eslintrc.js.old

This file was deleted.

4 changes: 2 additions & 2 deletions packages/graphiql/.storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { configure, addDecorator } from '@storybook/react';
import React from 'react';
import requireContext from 'require-context.macro';
import ThemeProvider from '../src/new-components/themes/provider';
import ThemeProvider from '../src/components/common/themes/provider';

addDecorator(story => <ThemeProvider>{story()}</ThemeProvider>);

configure(
requireContext('../src/new-components', true, /\.stories\.tsx$/),
requireContext('../src/components/common', true, /\.stories\.tsx$/),
module,
);
3 changes: 2 additions & 1 deletion packages/graphiql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
"graphql-languageservice": "^2.4.0-alpha.7",
"monaco-editor": "^0.20.0",
"regenerator-runtime": "^0.13.5",
"theme-ui": "^0.3.1"
"theme-ui": "^0.3.1",
"@theme-ui/core": "^0.4.0-alpha.1"
},
"peerDependencies": {
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/graphiql/src/api/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './useOperation';
export * from './useQueryFacts';
export * from './useSchema';
export * from './useValueRef';
5 changes: 5 additions & 0 deletions packages/graphiql/src/api/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export * from './providers/GraphiQLEditorsProvider';
export * from './providers/GraphiQLSessionProvider';
export * from './providers/GraphiQLSchemaProvider';
export * from './hooks';
export * from './types';
Loading

0 comments on commit 9fd2682

Please sign in to comment.