-
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.
- Improve syntax - Change text nodes from [...] to "...", '...', and [>...] to `${...}` - Change attributes from value=>"1 + 2" to value=(1 + 2), or for example value=`${1 + 2}`, value=[1, 2] - Remove the dynamic <> block and instead allow `for`, `if`, and `else` in child {} blocks - Template definitions are now permitted outside of the toplevel, and are declared with $$name(props){children} instead of $name(props){children} - Add // line comments - Use deno instead of node - Use esbuild with bundling and minification instead of tsc for js output - (internal, perf) use a Reader class instead of constantly creating new { result, pos } objects - fix html escaping - more eslint - start test and bench infrastructure a little bit
- Loading branch information
1 parent
96a33c3
commit b1515b1
Showing
26 changed files
with
2,983 additions
and
683 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
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,4 +1,2 @@ | ||
test/output | ||
node_modules | ||
dist | ||
package-lock.json | ||
dist |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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,25 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"request": "launch", | ||
"name": "Launch render-input.ts", | ||
"type": "node", | ||
"program": "${workspaceFolder}/test/render-input.ts", | ||
"cwd": "${workspaceFolder}", | ||
"runtimeExecutable": "deno", | ||
"runtimeArgs": ["run", "--inspect-wait", "-A"], | ||
"attachSimplePort": 9229 | ||
}, | ||
{ | ||
"request": "launch", | ||
"name": "Launch bench.ts", | ||
"type": "node", | ||
"program": "${workspaceFolder}/test/bench.ts", | ||
"cwd": "${workspaceFolder}", | ||
"runtimeExecutable": "deno", | ||
"runtimeArgs": ["run", "--inspect-wait", "-A"], | ||
"attachSimplePort": 9229 | ||
} | ||
] | ||
} |
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,4 +1,6 @@ | ||
{ | ||
// Required to compile directly to ES modules. | ||
"typescript.preferences.importModuleSpecifierEnding": "js" | ||
"deno.enable": true, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "denoland.vscode-deno" | ||
} | ||
} |
This file was deleted.
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,16 @@ | ||
{ | ||
"lint": { | ||
"exclude": ["dist", "test/dist"], | ||
"include": ["*.ts"] | ||
}, | ||
"fmt": { | ||
"useTabs": true, | ||
"semiColons": false, | ||
"lineWidth": 120 | ||
}, | ||
"tasks": { | ||
"build": "deno run -A ./esbuild.ts && deno fmt dist/poggies.d.ts", | ||
"bench": "deno run -A ./test/bench.ts" | ||
}, | ||
"nodeModulesDir": true | ||
} |
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 @@ | ||
import { build } from "npm:esbuild" | ||
await build({ | ||
entryPoints: ["src/poggies.ts"], | ||
outfile: "dist/poggies.js", | ||
format: "esm", | ||
bundle: true, | ||
treeShaking: true, | ||
external: ["node:fs"], | ||
minify: true, | ||
}) | ||
|
||
import("npm:typescript/lib/tsc.js") // fun way to run `tsc` to generate types |
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,44 +1,35 @@ | ||
{ | ||
"name": "poggies", | ||
"version": "1.2.1", | ||
"version": "2.0.0", | ||
"description": "A simple JavaScript templating engine", | ||
"main": "./dist/poggies.js", | ||
"types": "./dist/poggies.d.ts", | ||
"repository": "github:tbhmens/poggies", | ||
"exports": { | ||
"import": "./dist/poggies.js" | ||
"main": "dist/poggies.js", | ||
"types": "dist/poggies.d.ts", | ||
"repository": "github:esthedebeste/poggies", | ||
"scripts": { | ||
"prepack": "deno task build" | ||
}, | ||
"type": "module", | ||
"author": "tbhmens", | ||
"author": "esthedebeste", | ||
"license": "MIT", | ||
"keywords": [ | ||
"templating", | ||
"poggies", | ||
"template", | ||
"engine" | ||
], | ||
"bugs": { | ||
"url": "https://github.com/tbhmens/poggies/issues" | ||
}, | ||
"files": [ | ||
"dist/**/*.js", | ||
"dist/poggies.d.ts" | ||
"dist/poggies.*" | ||
], | ||
"homepage": "https://github.com/tbhmens/poggies#readme", | ||
"scripts": { | ||
"build": "tsc && prettier -w ./dist", | ||
"prepack": "npm run build", | ||
"test": "tsm ./test/test.ts" | ||
}, | ||
"bugs": "https://github.com/esthedebeste/poggies/issues", | ||
"homepage": "https://github.com/esthedebeste/poggies#readme", | ||
"devDependencies": { | ||
"@types/node": "^16.11.9", | ||
"@typescript-eslint/eslint-plugin": "^5.4.0", | ||
"@typescript-eslint/parser": "^5.4.0", | ||
"eslint": "^8.3.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-unicorn": "^39.0.0", | ||
"prettier": "^2.4.1", | ||
"tsm": "^2.1.4", | ||
"typescript": "^4.5.2" | ||
"@typescript-eslint/eslint-plugin": "^6.7.2", | ||
"@typescript-eslint/parser": "^6.7.2", | ||
"esbuild": "^0.19.3", | ||
"eslint": "^8.49.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-unicorn": "^48.0.1", | ||
"prettier": "^3.0.3", | ||
"typescript": "^5.2.2" | ||
} | ||
} |
Oops, something went wrong.