@backtickjs/tspatch-plugin 0.1.11 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @backtickjs/tspatch-plugin
|
|
2
2
|
|
|
3
|
-
Compiles `cs` client scripts when you build your server ahead of time. It's a [ts-patch](https://github.com/nonara/ts-patch) transformer: build with `tspc` and the output is plain JavaScript, which runs on `node`, Bun or a serverless platform with no loader. To compile a server's files as they load instead, with no build step, use [`@backtickjs/node-plugin`](https://github.com/backtickjs/backtick/tree/main/packages/node-plugin) or [`@backtickjs/bun-plugin`](https://github.com/backtickjs/backtick/tree/main/packages/bun-plugin). Backtick's own
|
|
3
|
+
Compiles `cs` client scripts when you build your server ahead of time. It's a [ts-patch](https://github.com/nonara/ts-patch) transformer: build with `tspc` and the output is plain JavaScript, which runs on `node`, Bun or a serverless platform with no loader. To compile a server's files as they load instead, with no build step, use [`@backtickjs/node-plugin`](https://github.com/backtickjs/backtick/tree/main/packages/node-plugin) or [`@backtickjs/bun-plugin`](https://github.com/backtickjs/backtick/tree/main/packages/bun-plugin). Backtick's own JSX packages are built with it.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ Requires ts-patch 4 and TypeScript 6. Add the transformer to `tsconfig.json`, an
|
|
|
16
16
|
|
|
17
17
|
```json
|
|
18
18
|
{
|
|
19
|
-
"backtick": { "plugins": ["@backtickjs/solid
|
|
19
|
+
"backtick": { "plugins": ["@backtickjs/jsx-solid/plugin"] },
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "tspc -b --noCheck",
|
|
22
22
|
"typecheck": "backtick-tsc --noEmit"
|
|
@@ -24,7 +24,7 @@ Requires ts-patch 4 and TypeScript 6. Add the transformer to `tsconfig.json`, an
|
|
|
24
24
|
}
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Build with `tspc` (from ts-patch) in place of `tsc`; plain `tsc` ignores the transformer and leaves scripts uncompiled. Backtick's
|
|
27
|
+
Build with `tspc` (from ts-patch) in place of `tsc`; plain `tsc` ignores the transformer and leaves scripts uncompiled. Backtick's JSX packages build with `--noCheck` and type-check separately with [`backtick-tsc`](https://github.com/backtickjs/backtick/tree/main/packages/tsc), which checks inside scripts. A script the compiler refuses is reported as a build error.
|
|
28
28
|
|
|
29
29
|
Source maps name a script's file as `<package name>/<path from the tsconfig directory>`, so they are the same on every machine.
|
|
30
30
|
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import type ts from "typescript";
|
|
|
15
15
|
* compile steps are the project's, named in its `package.json`:
|
|
16
16
|
*
|
|
17
17
|
* ```json
|
|
18
|
-
* "backtick": { "plugins": ["@backtickjs/solid
|
|
18
|
+
* "backtick": { "plugins": ["@backtickjs/jsx-solid/plugin"] }
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
21
|
export default function transformer(program: ts.Program, _config: PluginConfig, { ts, addDiagnostic }: TransformerExtras): ts.TransformerFactory<ts.SourceFile>;
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { pluginsFrom, transform } from "@backtickjs/compiler";
|
|
|
17
17
|
* compile steps are the project's, named in its `package.json`:
|
|
18
18
|
*
|
|
19
19
|
* ```json
|
|
20
|
-
* "backtick": { "plugins": ["@backtickjs/solid
|
|
20
|
+
* "backtick": { "plugins": ["@backtickjs/jsx-solid/plugin"] }
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
export default function transformer(program, _config, { ts, addDiagnostic }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backtickjs/tspatch-plugin",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Compiles Backtick client scripts when you build your server ahead of time with ts-patch's tspc",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"backtick",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@backtickjs/compiler": "^0.1
|
|
43
|
+
"@backtickjs/compiler": "^0.2.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"ts-patch": "^4.0.1",
|
package/src/index.ts
CHANGED
|
@@ -20,7 +20,7 @@ import type ts from "typescript";
|
|
|
20
20
|
* compile steps are the project's, named in its `package.json`:
|
|
21
21
|
*
|
|
22
22
|
* ```json
|
|
23
|
-
* "backtick": { "plugins": ["@backtickjs/solid
|
|
23
|
+
* "backtick": { "plugins": ["@backtickjs/jsx-solid/plugin"] }
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
26
|
export default function transformer(
|