-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(apps): transpile via django (#18201)
- Loading branch information
1 parent
2ce7ea6
commit 06e9938
Showing
15 changed files
with
658 additions
and
78 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 |
---|---|---|
|
@@ -34,3 +34,5 @@ | |
!share/GeoLite2-City.mmdb | ||
!hogvm/python | ||
!unit.json | ||
!plugin-transpiler/src | ||
!plugin-transpiler/*.* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,3 +55,4 @@ gen/ | |
upgrade/ | ||
hogvm/typescript/dist | ||
.wokeignore | ||
plugin-transpiler/dist |
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 @@ | ||
## Plugin Transpiler | ||
|
||
This project transpiles frontend plugins and site apps. |
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,13 @@ | ||
#!/usr/bin/env node | ||
import * as esbuild from 'esbuild' | ||
;(async function build() { | ||
let result = await esbuild.build({ | ||
entryPoints: ['src/index.ts'], | ||
bundle: true, | ||
outdir: 'dist', | ||
}) | ||
if (!result.errors.length) { | ||
// eslint-disable-next-line no-console | ||
console.log('Build succeeded') | ||
} | ||
})() |
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,21 @@ | ||
{ | ||
"name": "plugin-transpiler", | ||
"version": "1.0.0", | ||
"description": "Transpiles site apps TSX to browser JS via stdin/stdout", | ||
"main": "transpile.mjs", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "tsc -b && node build.mjs", | ||
"start:dist": "node dist/index.js", | ||
"start": "npm run build && npm run start:dist" | ||
}, | ||
"author": "PostHog Inc.", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@babel/standalone": "^7.23.2", | ||
"@types/babel__standalone": "^7.1.6", | ||
"@types/node": "^20.8.9", | ||
"esbuild": "^0.19.5", | ||
"typescript": "^5.2.2" | ||
} | ||
} |
Oops, something went wrong.