-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add parser package in a new monorepo structure
- Loading branch information
1 parent
7b5e2d5
commit 6139a34
Showing
14 changed files
with
181 additions
and
34 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,26 +1,14 @@ | ||
{ | ||
"name": "docutopia", | ||
"private": true, | ||
"version": "0.1.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "rspack --watch", | ||
"build": "rspack build", | ||
"svelte-check": "svelte-check --tsconfig ./tsconfig.json", | ||
"lint": "biome format", | ||
"lint:fix": "biome format --write" | ||
}, | ||
"files": ["dist/"], | ||
"devDependencies": { | ||
"@biomejs/biome": "1.8.3", | ||
"@rspack/cli": "^1.0.0", | ||
"@rspack/core": "^1.0.0", | ||
"serve": "^14.2.3", | ||
"svelte": "^4.2.18", | ||
"svelte-check": "^3.8.6", | ||
"svelte-loader": "^3.2.3", | ||
"svelte-preprocess": "^6.0.2", | ||
"ts-loader": "^9.5.1", | ||
"typescript": "^5.5.4" | ||
} | ||
"name": "@docutopia/monorepo", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "pnpm recursive run build", | ||
"lint": "pnpm recursive run lint", | ||
"lint:fix": "pnpm recursive run lint:fix" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC" | ||
} |
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 @@ | ||
|
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.
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,34 @@ | ||
{ | ||
"name": "@docutopia/parser", | ||
"description": "", | ||
"version": "0.1.0", | ||
"author": "Christian Llontop", | ||
"license": "MIT", | ||
"keywords": [], | ||
"type": "module", | ||
"main": "./dist/index.cjs.js", | ||
"module": "./dist/index.esm.js", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.esm.js", | ||
"require": "./dist/index.cjs.js" | ||
} | ||
}, | ||
"bin": { | ||
"docuparser": "./dist/cli.js" | ||
}, | ||
"scripts": { | ||
"build": "rspack build", | ||
"lint": "biome format", | ||
"lint:fix": "biome format --write" | ||
}, | ||
"files": ["dist/"], | ||
"devDependencies": { | ||
"@biomejs/biome": "catalog:", | ||
"@rspack/cli": "catalog:", | ||
"@rspack/core": "catalog:", | ||
"ts-loader": "catalog:", | ||
"typescript": "catalog:" | ||
} | ||
} |
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,45 @@ | ||
import { defineConfig } from "@rspack/cli"; | ||
|
||
const commonConfig = { | ||
entry: { | ||
index: "./src/index.ts", | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts$/, | ||
use: "ts-loader", | ||
exclude: /node_modules/, | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
extensions: [".ts", ".js"], | ||
alias: { | ||
"@": "./src", | ||
}, | ||
}, | ||
}; | ||
|
||
const esmConfig = defineConfig({ | ||
...commonConfig, | ||
output: { | ||
path: "./dist", | ||
filename: "index.esm.js", | ||
libraryTarget: "module", | ||
}, | ||
experiments: { | ||
outputModule: true, | ||
}, | ||
}); | ||
|
||
const cjsConfig = defineConfig({ | ||
...commonConfig, | ||
output: { | ||
path: "./dist", | ||
filename: "index.cjs.js", | ||
libraryTarget: "commonjs2", | ||
}, | ||
}); | ||
|
||
export default [esmConfig, cjsConfig]; |
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 * from "./parser"; |
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,7 @@ | ||
export class DocutopiaParser { | ||
constructor() {} | ||
|
||
parse() { | ||
console.log("Parsing..."); | ||
} | ||
} |
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 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES6", | ||
"module": "ESNext", | ||
"moduleResolution": "Node", | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"verbatimModuleSyntax": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"allowSyntheticDefaultImports": true, | ||
"sourceMap": true, | ||
"outDir": "./dist", | ||
"baseUrl": "./", | ||
"paths": { | ||
"@/*": ["src/*"] | ||
} | ||
}, | ||
"include": ["src/**/*.ts"], | ||
"exclude": ["node_modules", "dist"] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
packages: | ||
- 'packages/*' | ||
|
||
catalog: | ||
'@biomejs/biome': 1.8.3 | ||
typescript: ^5.5.4 | ||
ts-loader: ^9.5.1 | ||
'@rspack/cli': ^1.0.0 | ||
'@rspack/core': ^1.0.0 |