11# About Sergeant
22
3- A lightweight micro-services producing deno-[ p] react SSG-first SEO-friendly framework.
3+ A lightweight micro-services producing deno-[ p] react SSG-first SEO-friendly
4+ framework.
45
5- For a new era of frontend development with NO node_modules (Save GB+ files on disk).
6+ For a new era of frontend development with NO node_modules (Save GB+ files on
7+ disk).
68
7- + Produces bundles within seconds for 100s of apps.
8- + Cross-compile from multiple projects
9- + Supports scss
10- + Scaffolding
11- + Has livereload
12- + denocacheusage: 10MB only, bundle sizes less than 20KB (if u use preact), and 200KB for react.
9+ - Produces bundles within seconds for 100s of apps.
10+ - Cross-compile from multiple projects
11+ - Supports scss
12+ - Scaffolding
13+ - Has livereload
14+ - denocacheusage: 10MB only, bundle sizes less than 20KB (if u use preact), and
15+ 200KB for react.
1316
1417Compare this with 200MB-400MB node_modules for a react hello world project.
1518
1619Finally, you can ` rimraf node_modules ` .
1720
1821# Sergeant is production ready from Day-1
1922
20- ✨ Sergeant 🫡 A front-end microservices framework!
23+ ✨ Sergeant 🫡 A front-end microservices framework!
2124
2225```
2326███████╗███████╗██████╗ ██████╗ ███████╗ █████╗ ███╗ ██╗████████╗
5255```
5356
5457## Philosophy
58+
55591 . No breaking changes (versioned imports)
56602 . SSG over SSR
57613 . Always bundle to one-file for 1-SPA
5862
5963### More...
64+
60654 . Support bundling multiple apps, SPAs via micro-services / app-routing
61665 . Support progressive and offline apps
6267
6368# Commands
69+
6470```
6571sergeant
6672sergeant build
@@ -69,64 +75,71 @@ sergeant serve --dev
6975```
7076
7177# Install
78+
7279Only need deno to install sergeant (esbuild is automatically imported):
7380
7481## sergeant
7582
7683```
77- deno install -A -f https://cdn.jsdelivr.net/gh/scriptmaster/sergeant@1.7.1 /sergeant.ts
84+ deno install -A -f https://cdn.jsdelivr.net/gh/scriptmaster/sergeant@1.8.0 /sergeant.ts
7885```
7986
8087Only need deno and sergeant and you can do ` sergeant ` or ` sergeant serve `
8188
8289### Build All apps:
90+
8391` sergeant build `
8492
8593### Live Dev Server all apps:
86- ` sergeant serve `
8794
95+ ` sergeant serve `
8896
8997### Build specific app:
98+
9099` sergeant build `
91100
92101### Live Dev Server specific app:
93- ` sergeant serve `
94102
103+ ` sergeant serve `
95104
96105## Installing Deno
106+
97107https://docs.deno.com/runtime/manual/getting_started/installation
98108
99- ### Windows x64:
100- Using PowerShell (Windows):
101- irm https://deno.land/install.ps1 | iex
109+ ### Windows x64:
110+
111+ Using PowerShell (Windows): irm https://deno.land/install.ps1 | iex
102112
103113#### Or Using Chocolatey:
114+
104115choco install deno
105116
106117### MacOS: brew install deno
107118
108-
109119# Deno Plugins:
110- Uses:
111- https://github.com/scriptmaster/esbuild_deno_loader
120+
121+ Uses: https://github.com/scriptmaster/esbuild_deno_loader
112122https://deno.land/x/esbuild_plugin_sass_deno
113123https://github.com/esbuild/community-plugins#plugins-for-deno
114124
115125# Security of packages
116126
117127How packages are downloaded?
118128
119- Packages are primarily downloaded as ESM modules from https://esm.sh/package/ (instead of registry.npmjs.org).
120- + It can be swapped to use enterprise ESM packages repository.
121- + Packages
129+ Packages are primarily downloaded as ESM modules from https://esm.sh/package/
130+ (instead of registry.npmjs.org).
122131
123- The package can be looked up in ./vendor/ and ./node_modules/ in the format mod.ts index.mjs index.cjs index.js
132+ - It can be swapped to use enterprise ESM packages repository.
133+ - Packages
124134
135+ The package can be looked up in ./vendor/ and ./node_modules/ in the format
136+ mod.ts index.mjs index.cjs index.js
125137
126138# DI
127139
128- React Context API is an incorrect implementation of a simple DI with prop drilling.
129- In apps containing 20+ dependencies to provider, the context pattern could become 20+ nested nodes.
140+ React Context API is an incorrect implementation of a simple DI with prop
141+ drilling. In apps containing 20+ dependencies to provider, the context pattern
142+ could become 20+ nested nodes.
130143
131144DI enables you to directly provide the service/implementation for the consumer.
132145
@@ -136,12 +149,12 @@ Extra watch dirs
136149
137150Create app level deno.json and configure watching extra deps:
138151
139- {
140- "watch": "emeraldcss"
141- }
152+ { "watch": "emeraldcss" }
142153
143154# mithril
144- if an app dir contains mithril dir, its files (i.e., apps/appname/mithril/* .html or src/mithril/* .html) will be compiled as mithril files.
155+
156+ if an app dir contains mithril dir, its files (i.e., apps/appname/mithril/_ .html
157+ or src/mithril/_ .html) will be compiled as mithril files.
145158
146159# web framework
147160
0 commit comments