forked from udecode/plate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
442 additions
and
925 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 +1 @@ | ||
16.15 | ||
lts/gallium |
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,44 @@ | ||
/* eslint-disable lines-around-directive,strict */ | ||
/** | ||
* Convenience script to harmonize cache directories across various | ||
* tooling such as eslint and jest. | ||
* | ||
* Recently more & more tools like babel-loader tend to cache in | ||
* node_modules/.cache (@link https://github.com/avajs/find-cache-dir) | ||
* It's possible too. | ||
*/ | ||
// @ts-check | ||
'use strict'; | ||
|
||
const { resolve } = require('path'); | ||
|
||
const globalCachePath = resolve(`${__dirname}/../.cache`); | ||
|
||
/** | ||
* @param {string} packageName | ||
* @returns string | ||
*/ | ||
function sanitize(packageName) { | ||
return packageName.replace('/', '.').replace(/[^a-z0-9.@_-]+/gi, '-'); | ||
} | ||
|
||
/** | ||
* @param {string} packageName | ||
* @returns string | ||
*/ | ||
function getEslintCachePath(packageName) { | ||
return `${globalCachePath}/${sanitize(packageName)}/eslint`; | ||
} | ||
|
||
/** | ||
* @param {string} packageName | ||
* @returns string | ||
*/ | ||
function getJestCachePath(packageName) { | ||
return `${globalCachePath}/${sanitize(packageName)}/jest`; | ||
} | ||
|
||
module.exports = { | ||
getJestCachePath, | ||
getEslintCachePath, | ||
}; |
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,18 +1,20 @@ | ||
{ | ||
"name": "plate", | ||
"private": true, | ||
"version": "0.0.0", | ||
"license": "MIT", | ||
"scripts": { | ||
"check:install": "yarn dlx @yarnpkg/[email protected] packages", | ||
"clean:global-cache": "rimraf .cache", | ||
"docs:build": "cd docs && yarn && yarn build", | ||
"docs:start": "cd docs && yarn && yarn start", | ||
"g:build": "yarn workspaces foreach -ptv --no-private run build ", | ||
"g:build-changed": "yarn workspaces foreach -ptv --no-private --since=origin/main run build", | ||
"g:build": "yarn workspaces foreach -ptv --no-private run p:build ", | ||
"g:build-changed": "yarn workspaces foreach -ptv --no-private --since=origin/main run p:build", | ||
"g:changeset": "changeset", | ||
"g:clean": "yarn clean:global-cache && rimraf dist && yarn workspaces foreach -ptv run clean", | ||
"g:clean": "yarn clean:global-cache && rimraf dist && yarn workspaces foreach -ptv run p:clean", | ||
"g:codegen": "yarn plop --plopfile ./config/plopfile.js", | ||
"g:cti": "yarn workspaces foreach -ptv --no-private run cti", | ||
"g:cti:clean": "yarn workspaces foreach -p --no-private run cti clean ./src", | ||
"g:cti": "yarn workspaces foreach -ptv --no-private run p:cti", | ||
"g:cti:clean": "yarn workspaces foreach -p --no-private run p:cti clean ./src", | ||
"g:dev": "yarn workspace examples-next dev", | ||
"g:lint": "yarn workspaces foreach -ptv --no-private run p:lint --color", | ||
"g:lint-changed": "yarn workspaces foreach -ptv --no-private --since=origin/main --recursive run p:lint --color", | ||
|
@@ -27,10 +29,16 @@ | |
"g:test:covwa": "yarn g:test:cov --watchAll", | ||
"g:test:w": "yarn g:test --watch", | ||
"g:test:wa": "yarn g:test --watchAll", | ||
"g:typecheck": "yarn workspaces foreach -ptv run typecheck", | ||
"g:typecheck-changed": "yarn workspaces foreach -ptv --from '@udecode/plate*' --since=origin/main --recursive run typecheck", | ||
"g:typecheck": "yarn workspaces foreach -ptv run p:typecheck", | ||
"g:typecheck-changed": "yarn workspaces foreach -ptv --from '@udecode/plate*' --since=origin/main --recursive run p:typecheck", | ||
"p:build": "cd $INIT_CWD && yarn p:clean && tsc && yarn p:rollup", | ||
"p:build:w": "cd $INIT_CWD && yarn p:rollup -w", | ||
"p:clean": "cd $INIT_CWD && rimraf dist", | ||
"p:cti": "cd $INIT_CWD && && sh ${PROJECT_CWD}/scripts/cti.sh", | ||
"p:lint": "cd $INIT_CWD && eslint src --ext .ts,.tsx --cache --cache-location ${PROJECT_CWD}/.cache/eslint/core-lib.eslintcache --color", | ||
"p:rollup": "cd $INIT_CWD && rollup -c=${PROJECT_CWD}/config/rollup.config.js", | ||
"p:test": "cd $INIT_CWD && jest --config=${PROJECT_CWD}/jest.config.js --passWithNoTests $INIT_CWD ", | ||
"p:typecheck": "cd $INIT_CWD && tsc --noEmit --emitDeclarationOnly false", | ||
"postinstall": "patch-package", | ||
"nuke:node_modules": "rimraf '**/node_modules'", | ||
"typedoc": "npx typedoc --tsconfig packages/plate/tsconfig.json --options config/typedoc.json" | ||
|
@@ -82,6 +90,7 @@ | |
"@types/validator": "^13.7.2", | ||
"@typescript-eslint/eslint-plugin": "^5.23.0", | ||
"@typescript-eslint/parser": "^5.23.0", | ||
"app-root-path": "^3.0.0", | ||
"babel-eslint": "^10.1.0", | ||
"babel-jest": "^26.6.3", | ||
"babel-loader": "^8.2.5", | ||
|
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
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
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
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
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
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
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
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.