зеркало из https://github.com/microsoft/jacdac-ts.git
fixing some gatsby
This commit is contained in:
Родитель
3f845a7cfc
Коммит
0812bd3eb2
|
@ -1,5 +1,5 @@
|
|||
import React from "react";
|
||||
import JacdacContext from "./Context";
|
||||
import JacdacContext from "../../../src/react/Context";
|
||||
import ConnectButton from "./ConnectButton"
|
||||
|
||||
const JacdacComponent = ({ children }) => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import { Button } from "gatsby-theme-material-ui";
|
||||
import JacdacContext from "./Context";
|
||||
import JacdacContext from "../../../src/react/Context";
|
||||
|
||||
function ConnectButton() {
|
||||
return <JacdacContext.Consumer>
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
import React from "react";
|
||||
import { Bus } from "../../../src/dom/bus";
|
||||
|
||||
const JacdacContext = React.createContext<{
|
||||
bus: Bus,
|
||||
connected: boolean,
|
||||
connecting: boolean,
|
||||
connectAsync: () => Promise<void>,
|
||||
disconnectAsync: () => Promise<void>
|
||||
}>({
|
||||
bus: undefined,
|
||||
connected: false,
|
||||
connecting: false,
|
||||
connectAsync: undefined,
|
||||
disconnectAsync: undefined
|
||||
});
|
||||
JacdacContext.displayName = "jacdac";
|
||||
|
||||
export default JacdacContext;
|
|
@ -2,7 +2,7 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { List, ListItem, ListItemText } from '@material-ui/core';
|
||||
import DeviceListItem from './DeviceListItem';
|
||||
import { Device } from "../../../src/device";
|
||||
import { Device } from "../../../src/dom/device";
|
||||
import { useQuery } from './Query';
|
||||
|
||||
const DeviceList = () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { ListItem, ListItemText } from '@material-ui/core';
|
||||
import { Device } from '../../../src/device';
|
||||
import { Device } from '../../../src/dom/device';
|
||||
|
||||
|
||||
const DeviceListItem = (props: { device: Device }) => <ListItem>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useState } from 'react'
|
||||
import { useContext } from "react";
|
||||
import JacdacContext from "./Context"
|
||||
import { queryAsync, getSchema } from "../../../src/graphql"
|
||||
import JacdacContext from "../../../src/react/Context";
|
||||
import { queryAsync, getSchema } from "../../../src/graphql/graphql"
|
||||
// tslint:disable-next-line: no-import-side-effect no-submodule-imports
|
||||
import "graphiql/graphiql.min.css";
|
||||
import GraphiQL from 'graphiql';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useState, useEffect, useContext } from "react";
|
||||
import { Bus } from "../../../src/bus";
|
||||
import { createUSBBus } from "../../../src/webusb";
|
||||
import JacdacContext from "./Context";
|
||||
import { Bus } from "../../../src/dom/bus";
|
||||
import { createUSBBus } from "../../../src/dom/webusb";
|
||||
import JacdacContext from "../../../src/react/Context";
|
||||
|
||||
const JacdacProvider = ({ children }) => {
|
||||
const [bus] = useState<Bus>(createUSBBus());
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { useContext, useState, useEffect, useCallback } from "react";
|
||||
import JacdacContext from "./Context";
|
||||
import { queryAsync} from "../../../src/graphql"
|
||||
import JacdacContext from "../../../src/react/Context";
|
||||
import { queryAsync} from "../../../src/graphql/graphql"
|
||||
|
||||
export type OperationVariables = { [name: string]: any; };
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
"scripts": {
|
||||
"postinstall": "cd docs && npm install",
|
||||
"lint": "node node_modules/tslint/bin/tslint --project tsconfig.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'",
|
||||
"prebuild": "rm -rf dist",
|
||||
"build": "tsc",
|
||||
"predist": "rm -rf dist",
|
||||
"dist": "node node_modules/rollup/bin/rollup -c rollup.config.ts",
|
||||
"predistdocs": "cd docs && node node_modules/gatsby/cli.js clean",
|
||||
|
|
Загрузка…
Ссылка в новой задаче