-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(codegen): add codegen skeleton package
contains just the infrastructure for a new package for codegen application
- Loading branch information
Showing
13 changed files
with
174 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"ignores": ["@sanity/pkg-utils"] | ||
} |
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,11 @@ | ||
'use strict' | ||
|
||
const path = require('path') | ||
|
||
const ROOT_PATH = path.resolve(__dirname, '../../..') | ||
|
||
module.exports = { | ||
rules: { | ||
'import/no-extraneous-dependencies': ['error', {packageDir: [ROOT_PATH, __dirname]}], | ||
}, | ||
} |
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,12 @@ | ||
# Logs | ||
/logs | ||
*.log | ||
|
||
# Coverage directory used by tools like istanbul | ||
/coverage | ||
|
||
# Dependency directories | ||
/node_modules | ||
|
||
# Compiled code | ||
/lib |
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,3 @@ | ||
# @sanity/codegen | ||
|
||
Codegen toolkit for Sanity.io. This package is currently in an experimental state, and subject to change. |
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,8 @@ | ||
'use strict' | ||
|
||
const {createJestConfig} = require('../../../test/config.cjs') | ||
|
||
module.exports = createJestConfig({ | ||
displayName: require('./package.json').name, | ||
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,5 @@ | ||
import {defineConfig} from '@sanity/pkg-utils' | ||
|
||
import baseConfig from '../../../package.config' | ||
|
||
export default defineConfig(baseConfig) |
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,67 @@ | ||
{ | ||
"name": "@sanity/codegen", | ||
"version": "3.33.0", | ||
"description": "Codegen toolkit for Sanity.io", | ||
"keywords": [ | ||
"sanity", | ||
"cms", | ||
"headless", | ||
"realtime", | ||
"content", | ||
"codegen" | ||
], | ||
"homepage": "https://www.sanity.io/", | ||
"bugs": { | ||
"url": "https://github.com/sanity-io/sanity/issues" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/sanity-io/sanity.git", | ||
"directory": "packages/@sanity/codegen" | ||
}, | ||
"license": "MIT", | ||
"author": "Sanity.io <[email protected]>", | ||
"exports": { | ||
".": { | ||
"types": "./lib/dts/src/_exports/index.d.ts", | ||
"source": "./src/_exports/index.ts", | ||
"require": "./lib/_exports/index.js", | ||
"node": { | ||
"module": "./lib/_exports/index.esm.js", | ||
"import": "./lib/_exports/index.cjs.mjs" | ||
}, | ||
"import": "./lib/_exports/index.esm.js", | ||
"default": "./lib/_exports/index.esm.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"main": "./lib/_exports/index.js", | ||
"module": "./lib/_exports/index.esm.js", | ||
"source": "./src/_exports/index.ts", | ||
"types": "./lib/dts/src/_exports/index.d.ts", | ||
"files": [ | ||
"lib", | ||
"src", | ||
"!**/__tests__/**" | ||
], | ||
"scripts": { | ||
"prebuild": "run-s clean", | ||
"build": "pkg-utils build --tsconfig tsconfig.lib.json", | ||
"postbuild": "run-s check:package", | ||
"check:package": "pkg-utils --strict --tsconfig tsconfig.lib.json", | ||
"clean": "rimraf lib coverage", | ||
"lint": "eslint .", | ||
"watch": "pkg-utils watch --tsconfig tsconfig.lib.json", | ||
"test": "jest" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"rimraf": "^3.0.2" | ||
}, | ||
"engines": { | ||
"node": ">=18" | ||
} | ||
} |
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 @@ | ||
export const TODO = 1 |
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,12 @@ | ||
{ | ||
"extends": "../../../tsconfig.settings", | ||
"include": ["./src/**/*"], | ||
"compilerOptions": { | ||
"composite": true, | ||
"lib": ["ES2022.Error"], | ||
"rootDir": ".", | ||
"outDir": "./lib/dts", | ||
"declarationDir": "./lib/dts" | ||
}, | ||
"references": [{"path": "../types/tsconfig.lib.json"}, {"path": "../../groq/tsconfig.lib.json"}] | ||
} |
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,12 @@ | ||
{ | ||
"extends": "../../../tsconfig.settings", | ||
"include": ["./src/**/*"], | ||
"compilerOptions": { | ||
"composite": true, | ||
"lib": ["ES2022.Error"], | ||
"rootDir": ".", | ||
"outDir": "./lib/dts", | ||
"declarationDir": "./lib/dts" | ||
}, | ||
"references": [{"path": "../types/tsconfig.lib.json"}, {"path": "../../groq/tsconfig.lib.json"}] | ||
} |
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,33 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", | ||
"tagDefinitions": [ | ||
{ | ||
"tagName": "@hidden", | ||
"syntaxKind": "block", | ||
"allowMultiple": true | ||
}, | ||
{ | ||
"tagName": "@todo", | ||
"syntaxKind": "block", | ||
"allowMultiple": true | ||
} | ||
], | ||
"supportForTags": { | ||
"@hidden": true, | ||
"@beta": true, | ||
"@internal": true, | ||
"@public": true, | ||
"@experimental": true, | ||
"@see": true, | ||
"@link": true, | ||
"@example": true, | ||
"@deprecated": true, | ||
"@alpha": true, | ||
"@param": true, | ||
"@returns": true, | ||
"@remarks": true, | ||
"@throws": true, | ||
"@defaultValue": true, | ||
"@todo": true | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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