htmlc 1.0.21

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global htmlc --version 1.0.21                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local htmlc --version 1.0.21                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=htmlc&version=1.0.21                
nuke :add-package htmlc --version 1.0.21                

html-compiler-tool

html-compiler-tool

.NET Version License Build Downloads NuGet

Lines of Code Vulnerabilities

buy me a coffe

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:

  1. 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\

  1. 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:

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.156 641 12/3/2023
1.0.155 277 11/8/2023
1.0.154 375 11/6/2023
1.0.153 323 11/6/2023
1.0.149 257 10/10/2023
1.0.148 219 10/9/2023
1.0.147 187 10/6/2023
1.0.146 185 10/6/2023
1.0.145 213 10/4/2023
1.0.144 272 9/28/2023
1.0.143 223 9/28/2023
1.0.142 219 9/27/2023
1.0.141 304 9/27/2023
1.0.140 204 9/27/2023
1.0.139 228 9/24/2023
1.0.137 216 9/23/2023
1.0.136 264 9/19/2023
1.0.135 197 9/19/2023
1.0.133 239 9/19/2023
1.0.132 290 9/19/2023
1.0.131 191 9/19/2023
1.0.128 264 9/17/2023
1.0.124 197 9/7/2023
1.0.121 266 9/6/2023
1.0.117 232 8/27/2023
1.0.115 719 8/11/2023
1.0.114 601 8/2/2023
1.0.112 452 7/29/2023
1.0.109 490 7/26/2023
1.0.107 440 7/26/2023
1.0.106 458 7/24/2023
1.0.72 771 2/17/2023
1.0.70 588 2/17/2023
1.0.69 730 2/17/2023
1.0.68 679 2/17/2023
1.0.66 688 2/17/2023
1.0.64 652 2/10/2023
1.0.63 747 1/23/2023
1.0.62 847 1/23/2023
1.0.61 831 1/23/2023
1.0.60 849 1/23/2023
1.0.59 705 1/23/2023
1.0.58 703 1/21/2023
1.0.57 736 1/21/2023
1.0.56 797 1/21/2023
1.0.55 661 1/21/2023
1.0.54 749 1/21/2023
1.0.53 640 1/21/2023
1.0.52 720 1/21/2023
1.0.51 805 1/6/2023
1.0.50 715 1/6/2023
1.0.49 838 1/5/2023
1.0.48 789 1/5/2023
1.0.47 825 1/5/2023
1.0.46 884 1/5/2023
1.0.45 837 1/5/2023
1.0.44 906 1/5/2023
1.0.43 927 1/4/2023
1.0.42 811 1/4/2023
1.0.41 911 1/4/2023
1.0.40 835 1/4/2023
1.0.39 856 1/4/2023
1.0.38 886 1/4/2023
1.0.37 819 1/4/2023
1.0.36 810 1/4/2023
1.0.35 800 1/3/2023
1.0.34 873 1/3/2023
1.0.33 914 1/3/2023
1.0.32 873 1/3/2023
1.0.31 772 1/2/2023
1.0.30 777 1/2/2023
1.0.29 767 1/2/2023
1.0.28 838 1/2/2023
1.0.27 868 1/1/2023
1.0.26 828 1/1/2023
1.0.25 799 1/1/2023
1.0.24 803 1/1/2023
1.0.23 721 1/1/2023
1.0.22 793 1/1/2023
1.0.21 729 1/1/2023
1.0.20 756 1/1/2023
1.0.19 330 12/31/2022
1.0.18 313 12/31/2022
1.0.17 340 12/31/2022
1.0.16 337 12/31/2022
1.0.15 305 12/29/2022
1.0.14 310 12/28/2022
1.0.13 331 12/28/2022
1.0.12 340 12/20/2022
1.0.11 404 11/4/2022
1.0.10 398 11/1/2022
1.0.9 390 11/1/2022
1.0.8 424 10/31/2022
1.0.6 410 8/21/2022
1.0.4 405 8/18/2022
1.0.3 415 8/17/2022
1.0.2 414 8/17/2022
1.0.0 409 8/17/2022