-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize the repo to be in a site/package configuration to make deploy to npm etc easy.
- Loading branch information
1 parent
1396a8a
commit ce79e03
Showing
125 changed files
with
10,055 additions
and
12,123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
name: Test and lint | ||
on: [push] | ||
jobs: | ||
build-and-deploy: | ||
test-and-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/[email protected] | ||
|
||
- name: Install 🔧 | ||
run: yarn | ||
working-directory: ./packages/prong | ||
|
||
- name: Test | ||
- name: Test 🔬 | ||
run: yarn test | ||
working-directory: ./packages/prong | ||
|
||
- name: Lint | ||
- name: Lint 🧵 | ||
run: yarn lint | ||
working-directory: ./packages/prong |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,19 @@ | ||
{ | ||
"name": "prong", | ||
"version": "0.1.0", | ||
"private": true, | ||
"dependencies": { | ||
"@codemirror/commands": "^6.1.2", | ||
"@codemirror/lang-json": "^6.0.1", | ||
"@codemirror/lint": "^6.1.0", | ||
"@codemirror/view": "^6.7.0", | ||
"@json-schema-tools/traverse": "^1.10.1", | ||
"@lezer/common": "^1.0.2", | ||
"@lezer/json": "^1.0.0", | ||
"codemirror": "^6.0.1", | ||
"d3-scale-chromatic": "^3.0.0", | ||
"d3-shape": "^3.2.0", | ||
"jsonc-parser": "^3.0.0", | ||
"lodash.isequal": "^4.5.0", | ||
"lodash.merge": "^4.6.2", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"react-markdown": "^7.1.0", | ||
"react-syntax-highlighter": "^15.5.0", | ||
"seedrandom": "^3.0.5" | ||
}, | ||
"devDependencies": { | ||
"@codemirror/lang-javascript": "^6.1.4", | ||
"@testing-library/jest-dom": "^5.11.4", | ||
"@testing-library/react": "^11.1.0", | ||
"@testing-library/user-event": "^12.1.10", | ||
"@types/d3": "^7.4.0", | ||
"@types/friendly-words": "^1.2.0", | ||
"@types/jest": "^26.0.15", | ||
"@types/json-schema": "^7.0.11", | ||
"@types/lodash.isequal": "^4.5.5", | ||
"@types/lodash.merge": "^4.6.7", | ||
"@types/node": "^12.0.0", | ||
"@types/react": "^17.0.44", | ||
"@types/react-dom": "^17.0.0", | ||
"@types/react-syntax-highlighter": "^15.5.7", | ||
"@types/seedrandom": "^3.0.5", | ||
"d3-array": "^3.2.1", | ||
"d3-scale": "^4.0.2", | ||
"estree-walker": "^3.0.3", | ||
"friendly-words": "^1.2.0", | ||
"react-colorful": "^5.6.1", | ||
"react-dnd": "^16.0.1", | ||
"react-dnd-html5-backend": "^16.0.1", | ||
"react-router": "^6.4.2", | ||
"react-router-dom": "^6.4.2", | ||
"react-scripts": "4.0.3", | ||
"react-vega": "^7.6.0", | ||
"typescript": "^4.1.2", | ||
"vega": "^5.22.1", | ||
"vega-datasets": "^2.5.4", | ||
"vega-embed": "^6.21.3", | ||
"vega-expression": "^5.0.0", | ||
"vega-lite": "^5.6.1", | ||
"vega-themes": "^2.12.1" | ||
}, | ||
"scripts": { | ||
"start": "REACT_APP_DISABLE_LIVE_RELOAD=true react-scripts start", | ||
"trad-start": "react-scripts start", | ||
"build": "DISABLE_ESLINT_PLUGIN='true' react-scripts build && npm run prep-data-prod && npm run cp-quiets && npm run cp-docs", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject", | ||
"lint": "eslint src", | ||
"cp-quiets": "cp src/examples/Quiet* ./public/", | ||
"cp-docs": "cp README.md ./public/", | ||
"prep-data-prod": "rm -rf build/data && mkdir build/data && cp node_modules/vega-datasets/data/* ./build/data/", | ||
"prep-data": "rm -rf public/data && mkdir public/data && cp node_modules/vega-datasets/data/* ./public/data/" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"react-app", | ||
"react-app/jest" | ||
] | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
} | ||
} | ||
"name": "prong", | ||
"private": true, | ||
"scripts": { | ||
"start:docs": "cd sites/docs && yarn dev", | ||
"start:prong": "cd packages/prong && yarn dev", | ||
"start": "run-p start:docs start:prong" | ||
}, | ||
"devDependencies": { | ||
"lerna": "^4.0.0", | ||
"npm-run-all": "^4.1.5" | ||
}, | ||
"workspaces": { | ||
"packages": [ | ||
"packages/*", | ||
"sites/*" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* eslint-env node */ | ||
|
||
module.exports = { | ||
root: true, | ||
env: { browser: true, es2020: true }, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:react-hooks/recommended", | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
project: true, | ||
tsconfigRootDir: __dirname, | ||
}, | ||
plugins: ["react-refresh"], | ||
rules: { | ||
"react-refresh/only-export-components": [ | ||
"warn", | ||
{ allowConstantExport: true }, | ||
], | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
"@typescript-eslint/ban-ts-comment": 0, | ||
"@typescript-eslint/no-explicit-any": 0, | ||
"@typescript-eslint/no-unsafe-argument": 0, | ||
"@typescript-eslint/no-unsafe-assignment": 0, | ||
"@typescript-eslint/no-unsafe-member-access": 0, | ||
"@typescript-eslint/no-unsafe-return": 0, | ||
"@typescript-eslint/no-non-null-asserted-optional-chain": 0, | ||
"react-refresh/only-export-components": 0, | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-empty-function": 0, | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", // or "error" | ||
{ | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
caughtErrorsIgnorePattern: "^_", | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta name="theme-color" content="#333333" /> | ||
<meta name="description" content="Discount projectional json editors" /> | ||
<title>Prong</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"name": "prong", | ||
"version": "0.0.0", | ||
"scripts": { | ||
"dev": " vite build --watch --config vite.config.ts", | ||
"build": "tsc && vite build", | ||
"preview": "vite preview", | ||
"test": "jest", | ||
"prepack": "json -f package.json -I -e \"delete this.devDependencies; delete this.dependencies\"", | ||
"lint": "eslint src/" | ||
}, | ||
"dependencies": { | ||
"@codemirror/commands": "^6.1.2", | ||
"@codemirror/lang-json": "^6.0.1", | ||
"@codemirror/lint": "^6.1.0", | ||
"@codemirror/view": "^6.7.0", | ||
"@json-schema-tools/traverse": "^1.10.1", | ||
"@lezer/common": "^1.0.2", | ||
"@lezer/json": "^1.0.0", | ||
"codemirror": "^6.0.1", | ||
"jsonc-parser": "^3.0.0", | ||
"lodash.isequal": "^4.5.0", | ||
"react": "^17.0.2", | ||
"react-colorful": "^5.6.1", | ||
"react-dom": "^17.0.2", | ||
"react-markdown": "^7.1.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.16.12", | ||
"@jest/globals": "^29.6.1", | ||
"@testing-library/jest-dom": "^5.11.4", | ||
"@testing-library/react": "^11.1.0", | ||
"@testing-library/user-event": "^12.1.10", | ||
"@types/d3": "^7.4.0", | ||
"@types/jest": "^29.5.2", | ||
"@types/json-schema": "^7.0.11", | ||
"@types/lodash.isequal": "^4.5.5", | ||
"@types/node": "^20.4.0", | ||
"@types/react": "^17.0.38", | ||
"@types/react-dom": "^17.0.11", | ||
"@vitejs/plugin-react": "^1.1.4", | ||
"acorn-jsx": "^5.3.2", | ||
"babel-loader": "^8.2.3", | ||
"jest": "^29.6.1", | ||
"json": "^11.0.0", | ||
"ts-jest": "^29.1.1", | ||
"typescript": "^4.5.5", | ||
"vite": "^2.7.13", | ||
"vite-jest": "^0.1.4", | ||
"vite-plugin-dts": "^0.9.9" | ||
}, | ||
"license": "UNLICENSED", | ||
"peerDependencies": { | ||
"react": "^16.8.0 || 17.x", | ||
"react-dom": "^16.8.0 || 17.x" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"main": "./dist/prong.umd.js", | ||
"module": "./dist/prong.es.js", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/prong.es.js", | ||
"require": "./dist/prong.umd.js" | ||
} | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
src/components/Editor.tsx → packages/prong/src/components/Editor.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/components/ErrorBoundary.tsx → ...es/prong/src/components/ErrorBoundary.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export { default as Editor } from "./components/Editor"; | ||
export { default as StandardBundle } from "./projections/standard-bundle"; | ||
export * as utils from "./lib/utils"; | ||
export { default as prettifier } from "./lib/vendored/prettifier"; | ||
|
||
export { type Projection, type ProjectionProps } from "./lib/projections"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.