htmlc 1.0.20
See the version list below for details.
dotnet tool install --global htmlc --version 1.0.20
dotnet new tool-manifest
dotnet tool install --local htmlc --version 1.0.20
#tool dotnet:?package=htmlc&version=1.0.20
nuke :add-package htmlc --version 1.0.20
html-compiler-tool
This is the HTML Compiler Tool for your cli
installation and update
first: install the .NET Runtime
you need to install the .NET Runtime (its free and available for macos, linux and windows)
then: install the tool
then you can install the html-tool very simple via this command:
dotnet tool install --global htmlc
update the tool
dotnet tool update --global htmlc
usage
compile a single file
generates HTML from the template file demo.html and writes it into the folder ".\output" with the same file name ".\output\demo.html":<br />
htmlc compile .\source\demo.html .\output\
generates HTML from the template file test.html and writes it into the file ".\output\sample.html":<br />
htmlc compile .\source\test.html .\output\sample.html
specify a template file
this file contains only the individual content:
@Layout=_layout.html
<br />
<section>
<br />
<div>Hello again</div>
<br />
</section>
<br />
important: add the @Layout-element to specify which file the layout is in.
specify a layout file
The layout file contains the HTML framework, which is identical for all generated files:<br />
<html>
<br />
<head>
<br />
...
<br />
</head>
<br />
<body>
<br />
@Body
<br />
</body>
<br />
</html>
<br />
important: add the @Body-element to specify where the content of the page should be written.
generated output
The above example generates the following code:
<html>
<br />
<head>
<br />
...
<br />
</head>
<br />
<body>
<br />
<section>
<br />
<div>Hello again</div>
<br />
</section>
<br />
</body>
<br />
</html>
<br />
watch your project directory
You can monitor your whole HTML project directory and compile it automatically. There are two options:
- you specify only the path to the project folder. In this folder htmlc will look for /src and /dist (or will create these two folders). Under /src htmlc will monitor for file changes. /dist is used as output directory for the compiler:
htmlc watch .\path\to\source\
- you specify the source directory and the output directory. These then behave like /src and /dist:
htmlc watch .\path\to\source\ .\path\to\output\
optional: add a style file to compile
You can also specify a style file to the watch command. This will then also be monitored and compiled in case of changes. Currently supported are Sass/SCSS and Less.
htmlc watch [....] -s {relative/path/to/style.scss}
for example:
htmlc watch /Users/lk-code/Projects/Website/src /Users/lk-code/Projects/Website/dist -s /styles/main.scss
htmlc now searches for the style file at /Users/lk-code/Projects/Website/src/styles/main.scss. The content is compiled and then saved to this location: /Users/lk-code/Projects/Website/dist/styles/main.css
notices
this tool uses:
- Cocona (MIT) for console app environment
- DartSassHost (MIT) for scss compiling
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last Updated |
---|---|---|
1.0.156 | 722 | 12/3/2023 |
1.0.155 | 301 | 11/8/2023 |
1.0.154 | 399 | 11/6/2023 |
1.0.153 | 347 | 11/6/2023 |
1.0.149 | 284 | 10/10/2023 |
1.0.148 | 250 | 10/9/2023 |
1.0.147 | 213 | 10/6/2023 |
1.0.146 | 215 | 10/6/2023 |
1.0.145 | 241 | 10/4/2023 |
1.0.144 | 299 | 9/28/2023 |
1.0.143 | 253 | 9/28/2023 |
1.0.142 | 247 | 9/27/2023 |
1.0.141 | 332 | 9/27/2023 |
1.0.140 | 233 | 9/27/2023 |
1.0.139 | 254 | 9/24/2023 |
1.0.137 | 244 | 9/23/2023 |
1.0.136 | 300 | 9/19/2023 |
1.0.135 | 225 | 9/19/2023 |
1.0.133 | 267 | 9/19/2023 |
1.0.132 | 318 | 9/19/2023 |
1.0.131 | 218 | 9/19/2023 |
1.0.128 | 291 | 9/17/2023 |
1.0.124 | 242 | 9/7/2023 |
1.0.121 | 305 | 9/6/2023 |
1.0.117 | 275 | 8/27/2023 |
1.0.115 | 773 | 8/11/2023 |
1.0.114 | 655 | 8/2/2023 |
1.0.112 | 507 | 7/29/2023 |
1.0.109 | 555 | 7/26/2023 |
1.0.107 | 507 | 7/26/2023 |
1.0.106 | 516 | 7/24/2023 |
1.0.72 | 850 | 2/17/2023 |
1.0.70 | 668 | 2/17/2023 |
1.0.69 | 808 | 2/17/2023 |
1.0.68 | 757 | 2/17/2023 |
1.0.66 | 768 | 2/17/2023 |
1.0.64 | 726 | 2/10/2023 |
1.0.63 | 818 | 1/23/2023 |
1.0.62 | 917 | 1/23/2023 |
1.0.61 | 901 | 1/23/2023 |
1.0.60 | 919 | 1/23/2023 |
1.0.59 | 775 | 1/23/2023 |
1.0.58 | 774 | 1/21/2023 |
1.0.57 | 810 | 1/21/2023 |
1.0.56 | 868 | 1/21/2023 |
1.0.55 | 732 | 1/21/2023 |
1.0.54 | 823 | 1/21/2023 |
1.0.53 | 719 | 1/21/2023 |
1.0.52 | 791 | 1/21/2023 |
1.0.51 | 876 | 1/6/2023 |
1.0.50 | 786 | 1/6/2023 |
1.0.49 | 907 | 1/5/2023 |
1.0.48 | 858 | 1/5/2023 |
1.0.47 | 904 | 1/5/2023 |
1.0.46 | 955 | 1/5/2023 |
1.0.45 | 908 | 1/5/2023 |
1.0.44 | 976 | 1/5/2023 |
1.0.43 | 995 | 1/4/2023 |
1.0.42 | 880 | 1/4/2023 |
1.0.41 | 980 | 1/4/2023 |
1.0.40 | 903 | 1/4/2023 |
1.0.39 | 925 | 1/4/2023 |
1.0.38 | 961 | 1/4/2023 |
1.0.37 | 889 | 1/4/2023 |
1.0.36 | 883 | 1/4/2023 |
1.0.35 | 874 | 1/3/2023 |
1.0.34 | 945 | 1/3/2023 |
1.0.33 | 983 | 1/3/2023 |
1.0.32 | 941 | 1/3/2023 |
1.0.31 | 841 | 1/2/2023 |
1.0.30 | 846 | 1/2/2023 |
1.0.29 | 846 | 1/2/2023 |
1.0.28 | 907 | 1/2/2023 |
1.0.27 | 951 | 1/1/2023 |
1.0.26 | 900 | 1/1/2023 |
1.0.25 | 869 | 1/1/2023 |
1.0.24 | 874 | 1/1/2023 |
1.0.23 | 792 | 1/1/2023 |
1.0.22 | 863 | 1/1/2023 |
1.0.21 | 812 | 1/1/2023 |
1.0.20 | 827 | 1/1/2023 |
1.0.19 | 392 | 12/31/2022 |
1.0.18 | 375 | 12/31/2022 |
1.0.17 | 401 | 12/31/2022 |
1.0.16 | 399 | 12/31/2022 |
1.0.15 | 366 | 12/29/2022 |
1.0.14 | 371 | 12/28/2022 |
1.0.13 | 399 | 12/28/2022 |
1.0.12 | 401 | 12/20/2022 |
1.0.11 | 471 | 11/4/2022 |
1.0.10 | 464 | 11/1/2022 |
1.0.9 | 455 | 11/1/2022 |
1.0.8 | 489 | 10/31/2022 |
1.0.6 | 481 | 8/21/2022 |
1.0.4 | 475 | 8/18/2022 |
1.0.3 | 485 | 8/17/2022 |
1.0.2 | 484 | 8/17/2022 |
1.0.0 | 485 | 8/17/2022 |