Skip to content

Commit

Permalink
feat: delete Tokenizer + Old Parser, start Compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
TylorS committed Dec 30, 2023
1 parent 9e17621 commit fe33060
Show file tree
Hide file tree
Showing 26 changed files with 5,071 additions and 1,109 deletions.
4,842 changes: 4,842 additions & 0 deletions examples/todomvc/stats.html

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions packages/compiler/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.js
*.ts
21 changes: 21 additions & 0 deletions packages/compiler/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023-present The Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 5 additions & 0 deletions packages/compiler/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @typed/compiler

> WIP
Docs: https://tylors.github.io/typed/docs/compiler
6 changes: 6 additions & 0 deletions packages/compiler/docgen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"exclude": ["src/internal/**/*.ts"],
"theme": "mikearnaldi/just-the-docs",
"parseCompilerOptions": "./tsconfig.build.json",
"examplesCompilerOptions": "./tsconfig.examples.json"
}
45 changes: 45 additions & 0 deletions packages/compiler/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "@typed/compiler",
"version": "0.0.0",
"description": "",
"publishConfig": {
"access": "public",
"directory": "dist"
},
"repository": {
"type": "git",
"url": "https://github.com/tylors/typed.git"
},
"homepage": "https://github.com/tylors/typed",
"exports": {
"./*": {
"require": "./build/cjs/*.js"
}
},
"scripts": {
"example": "ts-node --project tsconfig.examples.json",
"version": "changeset version && pnpm install --no-frozen-lockfile && pnpm run docs-update",
"release": "pnpm run build && changeset publish",
"clean": "rimraf build dist docs",
"build": "pnpm build-all && pnpm build-pack",
"build-cjs": "babel build/esm --config-file ../../.babel.cjs.json --out-dir build/cjs --out-file-extension .js --source-maps",
"build-mjs": "babel build/esm --config-file ../../.babel.mjs.json --out-dir build/mjs --out-file-extension .mjs --source-maps",
"build-post": "build-utils pack-v2",
"build-pack": "concurrently \"pnpm build-cjs\" \"pnpm build-mjs\" && pnpm build-post",
"build-all": "tsc -b tsconfig.json",
"build-watch": "tsc -b tsconfig.json --watch",
"circular": "madge --ts-config ./tsconfig.madge.json --circular --no-color --no-spinner --warning build/esm",
"docs": "docgen",
"lint": "eslint --ext .ts,.tsx src/**/* test/**/*",
"tc": "tsc --noEmit",
"test": "vitest",
"coverage": "vitest run --coverage"
},
"keywords": [],
"author": "Typed contributors",
"license": "MIT",
"sideEffects": [],
"dependencies": {},
"peerDependencies": {},
"devDependencies": {}
}
1 change: 1 addition & 0 deletions packages/compiler/src/Compiler.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Compiler needs to use Parser
Empty file added packages/compiler/src/index.ts
Empty file.
15 changes: 15 additions & 0 deletions packages/compiler/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": [
"../../tsconfig.base.json"
],
"compilerOptions": {
"outDir": "build/esm",
"declarationDir": "build/dts",
"tsBuildInfoFile": "build/tsbuildinfo/esm.tsbuildinfo",
"rootDir": "src"
},
"include": [
"src/**/*.ts"
],
"references": []
}
18 changes: 18 additions & 0 deletions packages/compiler/tsconfig.examples.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "build/tsbuildinfo/examples.tsbuildinfo",
"rootDir": "examples",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "build/examples"
},
"include": [
"examples/**/*.ts"
],
"references": [
{
"path": "./tsconfig.build.json"
}
]
}
17 changes: 17 additions & 0 deletions packages/compiler/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "build/tsbuildinfo/tsconfig.tsbuildinfo"
},
"references": [
{
"path": "./tsconfig.build.json"
},
{
"path": "./tsconfig.test.json"
},
{
"path": "./tsconfig.examples.json"
}
]
}
20 changes: 20 additions & 0 deletions packages/compiler/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "build/test",
"declarationDir": "build/test-dts",
"tsBuildInfoFile": "build/tsbuildinfo/test.tsbuildinfo",
"rootDir": "test",
"types": [
"vitest/globals"
]
},
"include": [
"test/**/*.ts"
],
"references": [
{
"path": "./tsconfig.build.json"
}
]
}
5 changes: 5 additions & 0 deletions packages/compiler/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="vitest" />

import { makeTestConfig } from "../../vitest.config"

export default makeTestConfig(__dirname)
Loading

0 comments on commit fe33060

Please sign in to comment.