feat: package init for graphql-docs

This commit is contained in:
Anoop M D 2022-11-04 23:42:34 +05:30
parent c0e1bf6bc2
commit 9e64ea5439
7 changed files with 115 additions and 1 deletions

View File

@ -6,7 +6,8 @@
"packages/bruno-electron", "packages/bruno-electron",
"packages/bruno-tauri", "packages/bruno-tauri",
"packages/bruno-schema", "packages/bruno-schema",
"packages/bruno-testbench" "packages/bruno-testbench",
"packages/bruno-graphql-docs"
], ],
"devDependencies": { "devDependencies": {
"@faker-js/faker": "^7.6.0", "@faker-js/faker": "^7.6.0",

22
packages/bruno-graphql-docs/.gitignore vendored Normal file
View File

@ -0,0 +1,22 @@
# dependencies
node_modules
yarn.lock
pnpm-lock.yaml
package-lock.json
.pnp
.pnp.js
# testing
coverage
# production
dist
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

View File

@ -0,0 +1,21 @@
{
"name": "@usebruno/graphql-docs",
"version": "0.1.0",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"scripts": {
"build": "rollup -c"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^23.0.2",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-typescript": "^9.0.2",
"@types/react": "^18.0.25",
"react": "^17.0.2",
"rollup": "^2.79.1",
"rollup-plugin-dts": "^5.0.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-terser": "^7.0.2",
"typescript": "^4.8.4"
}
}

View File

@ -0,0 +1,34 @@
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import typescript from "@rollup/plugin-typescript";
import dts from "rollup-plugin-dts";
import { terser } from "rollup-plugin-terser";
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
const packageJson = require("./package.json");
export default [
{
input: "src/index.ts",
output: [
{
file: packageJson.main,
format: "cjs",
sourcemap: true,
},
{
file: packageJson.module,
format: "esm",
sourcemap: true,
},
],
plugins: [
peerDepsExternal(),
resolve(),
commonjs(),
typescript({ tsconfig: "./tsconfig.json" }),
terser(),
],
external: ["react", "react-dom", "styled-components"]
}
];

View File

@ -0,0 +1,9 @@
import React from 'react';
class GraphDocs extends React.Component {
render() {
return "Graphql Docs Explorer"
}
}
export default GraphDocs;

View File

@ -0,0 +1,5 @@
import GraphDocs from "./GraphDocs";
export {
GraphDocs
}

View File

@ -0,0 +1,22 @@
{
"compilerOptions": {
"esModuleInterop": true,
"strict": true,
"skipLibCheck": true,
"jsx": "react",
"module": "ESNext",
"declaration": true,
"declarationDir": "types",
"sourceMap": true,
"outDir": "dist",
"moduleResolution": "node",
"emitDeclarationOnly": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true
},
"exclude": [
"dist",
"node_modules",
"src/**/*.test.tsx"
],
}