tshtml-loader 1.4.3 → 1.4.4

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.
Files changed (2) hide show
  1. package/README.md +68 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # tshtml-loader
2
+
3
+ **Webpack loader for tshtml template files**
4
+
5
+ This webpack loader enables `.tshtml` template files in your Angular projects, executing TypeScript template code at build time to generate static HTML.
6
+
7
+ ## What It Does
8
+
9
+ The tshtml-loader integrates with webpack to:
10
+ - Process `.tshtml` files containing TypeScript template code
11
+ - Execute templates during the build process
12
+ - Generate static HTML output for Angular components
13
+ - Provide full TypeScript compilation support for template files
14
+
15
+ ## Why Use It?
16
+
17
+ - **Build-Time Templates** - Generate HTML during webpack build, not at runtime
18
+ - **TypeScript Power** - Use classes, functions, imports, and type safety in templates
19
+ - **Seamless Integration** - Works with Angular CLI and standard webpack configurations
20
+ - **Zero Runtime Overhead** - Output is plain HTML consumed by Angular
21
+
22
+ ## Installation
23
+
24
+ ```bash
25
+ npm install tshtml tshtml-loader
26
+ ```
27
+
28
+ ## Basic Usage
29
+
30
+ ### webpack.config.js
31
+ ```javascript
32
+ module.exports = {
33
+ module: {
34
+ rules: [
35
+ {
36
+ test: /\.tshtml$/,
37
+ use: ['tshtml-loader']
38
+ }
39
+ ]
40
+ }
41
+ };
42
+ ```
43
+
44
+ ### Angular Component
45
+ ```typescript
46
+ @Component({
47
+ selector: 'app-hello',
48
+ templateUrl: './hello.component.tshtml'
49
+ })
50
+ export class HelloComponent {}
51
+ ```
52
+
53
+ ### Template File (hello.component.tshtml)
54
+ ```typescript
55
+ export default `<h1>Hello from tshtml!</h1>`;
56
+ ```
57
+
58
+ ## Documentation
59
+
60
+ 📖 **[Complete Setup Guide & Documentation on GitHub](https://github.com/xorets/tshtml)**
61
+
62
+ - [Angular 21 Integration Guide](https://github.com/xorets/tshtml/blob/main/docs/angular-21-integration.md)
63
+ - [Template Authoring Guide](https://github.com/xorets/tshtml/blob/main/docs/user-guide.md)
64
+ - [Development Guide](https://github.com/xorets/tshtml/blob/main/docs/development.md)
65
+
66
+ ## License
67
+
68
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tshtml-loader",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Webpack loader for tshtml template files",
5
5
  "repository": {
6
6
  "type": "git",
@@ -47,7 +47,7 @@
47
47
  "dependencies": {
48
48
  "lodash": "^4.17.21",
49
49
  "ts-node": "^10.9.2",
50
- "tshtml": "^1.4.3",
50
+ "tshtml": "^1.4.4",
51
51
  "typescript": "^5.9.3"
52
52
  },
53
53
  "overrides": {