Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Next #6

Open
wants to merge 107 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
d295db4
feat!: implement sosse api and cli, rework hsr api
katywings Aug 3, 2020
5f51a66
chore: update dependencies
katywings Aug 3, 2020
a488414
chore: remove otion build script
katywings Aug 3, 2020
7ddf4bb
chore(release): 0.8.0-next.0
katywings Aug 3, 2020
b881a90
chore: remove ts-node and tsconfig-paths
katywings Aug 5, 2020
0c57387
chore: remove obsolete counter from default main template
katywings Aug 5, 2020
0ee6172
chore(release): 0.8.0-next.1
katywings Aug 5, 2020
5c95a05
fix(create-type-proxies): resolve module dts path with moduleName
katywings Aug 5, 2020
a752b83
chore(create-type-proxies): implement auto main exports detection
katywings Aug 5, 2020
f898e7b
chore(create-type-proxies): move type proxy creation into build scripts
katywings Aug 5, 2020
8782109
chore: update script lib to witney 0.10.0
katywings Aug 5, 2020
0a54b0b
chore(release): 0.8.0-next.2
katywings Aug 5, 2020
d74a895
feat!: remove html attribute from asset, but add path and props
katywings Aug 9, 2020
2f8af4f
chore: add dev build for cli module
katywings Aug 9, 2020
277fe97
feat: export Asset type
katywings Aug 9, 2020
a1fc535
chore: update dependencies
katywings Aug 9, 2020
13102f5
chore(release): 0.8.0-next.3
katywings Aug 9, 2020
3e73b38
feat!: split assets into js and css
katywings Aug 18, 2020
17903f8
refactor(hsr): use isDev for NODE_ENV check
katywings Aug 18, 2020
3738e09
refactor!: remove sosseDev ref from ctx assets
katywings Aug 18, 2020
09d12c9
feat: try to build the server in production when main is missing
katywings Aug 18, 2020
ec6afa0
chore: set sosse, otion, preact externals independent of watch mode
katywings Aug 18, 2020
338ea4a
fix: dont bundle client if assets already exist
katywings Aug 18, 2020
d754f13
refactor!: only replace NODE_ENV in client bundles
katywings Aug 18, 2020
ed7d3ba
chore: add css file to example code
katywings Aug 18, 2020
e5defa7
chore(release): 0.8.0-next.4
katywings Aug 18, 2020
633cd47
chore(release): 0.8.0-next.5
katywings Aug 18, 2020
df8ae5c
feat!: move context depended functions to context
katywings Sep 16, 2020
b564757
feat(html): add data param and remove side effect based data
katywings Sep 16, 2020
098fb8d
chore: update examples
katywings Sep 16, 2020
1f7f0d0
chore(release): 0.8.0-next.6
katywings Sep 16, 2020
3b3cb6f
feat: export Ctx for consumption
katywings Sep 16, 2020
94eb214
chore(release): 0.8.0-next.7
katywings Sep 16, 2020
b7488b8
fix: improve ctx event listeners memory usage
katywings Dec 13, 2020
5519d9a
fix: only cache clear modules from the project folder
katywings Dec 13, 2020
44e0308
chore: upgrade dependencies
katywings Dec 13, 2020
21d0754
chore: add argv operands to start script
katywings Dec 13, 2020
6a69344
chore(release): 0.8.0-next.8
katywings Dec 13, 2020
c9297d0
fix: dont clear node_modules from require cache
katywings Dec 13, 2020
a8d1554
feat: update sosse init template
katywings Dec 13, 2020
5aeeca7
chore(release): 0.8.0-next.9
katywings Dec 13, 2020
3ae1ab6
docs: update project description in README and getting_started
katywings Dec 16, 2020
6a76c2a
docs: update getting_started link in README
katywings Dec 16, 2020
1a92fa1
chore(release): 0.8.0-next.10
katywings Dec 16, 2020
dedcfc3
chore: replace microbundle with rollup
katywings Dec 23, 2020
94989ee
docs: fix a little typo
katywings Dec 23, 2020
5c4695b
feat: rework ctx html functions
katywings Dec 23, 2020
17911c8
refactor: clean up and comment postcss extract logic
katywings Dec 24, 2020
e778555
refactor!: rename uni module to iso
katywings Dec 24, 2020
cc1d948
feat!: rework preact components and ssr with preact-iso
katywings Dec 24, 2020
cf9693b
docs: update README.md
katywings Dec 24, 2020
dde2530
chore: update examples
katywings Dec 24, 2020
ed8e63d
chore(release): 0.8.0-next.11
katywings Dec 24, 2020
30286f3
fix: upgrade to current microbundle and fix types dist
katywings Dec 24, 2020
1d7aedb
chore(release): 0.8.0-next.12
katywings Dec 24, 2020
59c84d3
docs: remove obsolete README hint
katywings Dec 24, 2020
a0e36c3
fix: move not bundleable dependencies out of dev
katywings Dec 24, 2020
37e8ceb
chore(release): 0.8.0-next.13
katywings Dec 24, 2020
bd0619e
feat: add fastify decorate and serverFactory
katywings Dec 25, 2020
3c885d1
chore(release): 0.8.0-next.14
katywings Dec 25, 2020
7d2f6d2
fix: ignore subfolders in client assets
katywings Dec 25, 2020
9d554a1
chore(release): 0.8.0-next.15
katywings Dec 25, 2020
0f2f509
feat: implement source-map-support
katywings Dec 29, 2020
36df444
feat!: rework html and render functions
katywings Dec 29, 2020
7e13678
fix: move preact-iso isodata into body
katywings Dec 29, 2020
a7a57ef
feat!: add SOSSE rollup build globals
katywings Dec 29, 2020
6ac01bb
docs: mention cwd param idea in README
katywings Dec 29, 2020
0af20a1
chore(release): 0.8.0-next.16
katywings Dec 29, 2020
0b1899f
fix: correct production clientAssets css path
katywings Dec 29, 2020
dde67ea
chore(release): 0.8.0-next.17
katywings Dec 29, 2020
1dcd1ea
fix: use terser for production client builds
katywings Dec 30, 2020
fb58ae5
fix: always use hydrate from preact-iso for client rendering
katywings Dec 30, 2020
0ab0ac2
feat!: rework isDev env and add cli -p option
katywings Dec 30, 2020
e52c862
docs: remove --cwd param idea
katywings Dec 30, 2020
494e4c6
chore(release): 0.8.0-next.18
katywings Dec 30, 2020
f890e19
feat: implement css minification
katywings Dec 30, 2020
230463a
chore(release): 0.8.0-next.19
katywings Dec 30, 2020
88ae6d9
feat: add isDev to postcss ctx
katywings Dec 30, 2020
a47ee56
chore(release): 0.8.0-next.20
katywings Dec 30, 2020
2f78526
feat: add lang, className, viewport and description props to Html
katywings Dec 30, 2020
fcc97c6
chore(release): 0.8.0-next.21
katywings Dec 30, 2020
cfd7798
feat: catch listen errors
katywings Dec 31, 2020
ea56229
chore: update pkg description
katywings Dec 31, 2020
81bc04c
feat: implement url and svgr rollup plugins
katywings Jan 1, 2021
ab6479a
chore(release): 0.8.0-next.22
katywings Jan 1, 2021
72db323
feat: revive scroll position after live reload
katywings Jan 7, 2021
6c2c779
feat: disable unused import warning for server
katywings Jan 7, 2021
6ebbba0
chore(preact-iso): replace preact/compat with preact/hooks
katywings Jan 7, 2021
4b48d42
chore(release): 0.8.0-next.23
katywings Jan 7, 2021
98bd1aa
feat: update preact to 10.5.9 and update dev dependencies
katywings Jan 8, 2021
0fc0573
fix(iso): readd own preact hydration switch, update preact-iso imports
katywings Jan 8, 2021
3c056db
chore(release): 0.8.0-next.24
katywings Jan 8, 2021
2445257
feat: process client dependencies for the server bundle
katywings Jan 16, 2021
7c393f7
chore(release): 0.8.0-next.25
katywings Jan 16, 2021
6ecbf0d
fix: process submodules and nested imports from bundledDependencies
katywings Jan 16, 2021
6cabdf7
chore(release): 0.8.0-next.26
katywings Jan 16, 2021
29b36d3
feat: encode interactive comp props with base64
katywings Feb 7, 2021
a07f118
chore(release): 0.8.0-next.27
katywings Feb 7, 2021
72f6879
feat(iso): add ssrContainer prop to interactive components
katywings Feb 10, 2021
61aa7c1
feat(core): implement jpg, png image optimization
katywings Feb 10, 2021
6711105
chore(release): 0.8.0-next.28
katywings Feb 10, 2021
434f38a
fix(core): wait for imagemin promise during parent resolveId
katywings Feb 10, 2021
50fc142
refactor: cache imagemin promises with explicit ids
katywings Feb 10, 2021
44e1055
chore(release): 0.8.0-next.29
katywings Feb 10, 2021
f4d1926
fix: enable preserveSymlinks in rollup
katywings Mar 8, 2021
ab9cb41
feat: minor update dependencies
katywings Mar 8, 2021
abefea5
chore(release): 0.8.0-next.30
katywings Mar 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/node_modules
/.vscode
dist
public
282 changes: 282 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,288 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [0.8.0-next.30](https://github.com/sossejs/sosse/compare/v0.8.0-next.29...v0.8.0-next.30) (2021-03-08)


### Features

* minor update dependencies ([ab9cb41](https://github.com/sossejs/sosse/commit/ab9cb41010d83d52571a8914100a420f6072c346))


### Bug Fixes

* enable preserveSymlinks in rollup ([f4d1926](https://github.com/sossejs/sosse/commit/f4d192602f096647c1aae3a227964cc16a047a97))

## [0.8.0-next.29](https://github.com/sossejs/sosse/compare/v0.8.0-next.28...v0.8.0-next.29) (2021-02-10)


### Bug Fixes

* **core:** wait for imagemin promise during parent resolveId ([434f38a](https://github.com/sossejs/sosse/commit/434f38a5f7e39fa3e7171c5138d6bcac044e869d))

## [0.8.0-next.28](https://github.com/sossejs/sosse/compare/v0.8.0-next.27...v0.8.0-next.28) (2021-02-10)


### Features

* **core:** implement jpg, png image optimization ([61aa7c1](https://github.com/sossejs/sosse/commit/61aa7c12e93e5250626abe149ffa6247bdcea142))
* **iso:** add ssrContainer prop to interactive components ([72f6879](https://github.com/sossejs/sosse/commit/72f687936b2031360e9ceeb85cfd4ca647364e39))

## [0.8.0-next.27](https://github.com/sossejs/sosse/compare/v0.8.0-next.26...v0.8.0-next.27) (2021-02-07)


### Features

* encode interactive comp props with base64 ([29b36d3](https://github.com/sossejs/sosse/commit/29b36d37857e3cc013148b1d4c9ba9f669eecc7f))

## [0.8.0-next.26](https://github.com/sossejs/sosse/compare/v0.8.0-next.25...v0.8.0-next.26) (2021-01-16)


### Bug Fixes

* process submodules and nested imports from bundledDependencies ([6ecbf0d](https://github.com/sossejs/sosse/commit/6ecbf0d766b80fddf0533e711676010efc25031b))

## [0.8.0-next.25](https://github.com/sossejs/sosse/compare/v0.8.0-next.24...v0.8.0-next.25) (2021-01-16)


### Features

* process client dependencies for the server bundle ([2445257](https://github.com/sossejs/sosse/commit/2445257edc489b816821aca6a09befaa2588c67e))

## [0.8.0-next.24](https://github.com/sossejs/sosse/compare/v0.8.0-next.23...v0.8.0-next.24) (2021-01-08)


### Features

* update preact to 10.5.9 and update dev dependencies ([98bd1aa](https://github.com/sossejs/sosse/commit/98bd1aa6a87b3ebde0029b78ff22d0b21bb3617f))


### Bug Fixes

* **iso:** readd own preact hydration switch, update preact-iso imports ([0fc0573](https://github.com/sossejs/sosse/commit/0fc0573fd8bf444a48f9e1e5362881ca03e34093))

## [0.8.0-next.23](https://github.com/sossejs/sosse/compare/v0.8.0-next.22...v0.8.0-next.23) (2021-01-07)


### Features

* disable unused import warning for server ([6c2c779](https://github.com/sossejs/sosse/commit/6c2c779cb5cb0e395d8418a5cfceaea8ac83ba2c))
* revive scroll position after live reload ([72db323](https://github.com/sossejs/sosse/commit/72db3231ab6cbf13e50fa3951e8a77e648b0743c))

## [0.8.0-next.22](https://github.com/sossejs/sosse/compare/v0.8.0-next.21...v0.8.0-next.22) (2021-01-01)


### Features

* catch listen errors ([cfd7798](https://github.com/sossejs/sosse/commit/cfd7798f6ee5330b1a3f780ea544b66560ed2f7e))
* implement url and svgr rollup plugins ([81bc04c](https://github.com/sossejs/sosse/commit/81bc04c303d1725e4db8319b24ee26816bee51da))

## [0.8.0-next.21](https://github.com/sossejs/sosse/compare/v0.8.0-next.20...v0.8.0-next.21) (2020-12-30)


### Features

* add lang, className, viewport and description props to Html ([2f78526](https://github.com/sossejs/sosse/commit/2f78526ba6f71bf13082dccd9d4f6f5f639210d3))

## [0.8.0-next.20](https://github.com/sossejs/sosse/compare/v0.8.0-next.19...v0.8.0-next.20) (2020-12-30)


### Features

* add isDev to postcss ctx ([88ae6d9](https://github.com/sossejs/sosse/commit/88ae6d98cfafc1ad00233f7511ec51d6bb8d08ae))

## [0.8.0-next.19](https://github.com/sossejs/sosse/compare/v0.8.0-next.18...v0.8.0-next.19) (2020-12-30)


### Features

* implement css minification ([f890e19](https://github.com/sossejs/sosse/commit/f890e19cc7cf9919b3e39bf85b8724f2d9e040ab))

## [0.8.0-next.18](https://github.com/sossejs/sosse/compare/v0.8.0-next.17...v0.8.0-next.18) (2020-12-30)


### ⚠ BREAKING CHANGES

* rework isDev env and add cli -p option

### Features

* rework isDev env and add cli -p option ([0ab0ac2](https://github.com/sossejs/sosse/commit/0ab0ac28344784e9651d2291dca75e0f5d513db8))


### Bug Fixes

* always use hydrate from preact-iso for client rendering ([fb58ae5](https://github.com/sossejs/sosse/commit/fb58ae55b0e418f9730923b870fe5226a0ccbd19))
* use terser for production client builds ([1dcd1ea](https://github.com/sossejs/sosse/commit/1dcd1ea120f2d0f270f06736b7660385a7b21474))

## [0.8.0-next.17](https://github.com/sossejs/sosse/compare/v0.8.0-next.16...v0.8.0-next.17) (2020-12-29)


### Bug Fixes

* correct production clientAssets css path ([0b1899f](https://github.com/sossejs/sosse/commit/0b1899f0422ecedc1ae088aae9909801207a6bea))

## [0.8.0-next.16](https://github.com/sossejs/sosse/compare/v0.8.0-next.15...v0.8.0-next.16) (2020-12-29)


### ⚠ BREAKING CHANGES

* add SOSSE rollup build globals
* rework html and render functions

### Features

* add SOSSE rollup build globals ([a7a57ef](https://github.com/sossejs/sosse/commit/a7a57ef0de7cd582c7a2422910dc647c51d3be7c))
* implement source-map-support ([0f2f509](https://github.com/sossejs/sosse/commit/0f2f50983052639f7ec83861b4c6d694913b52af))
* rework html and render functions ([36df444](https://github.com/sossejs/sosse/commit/36df44421a2514f2b55e33a146c739a5738ff5ca))


### Bug Fixes

* move preact-iso isodata into body ([7e13678](https://github.com/sossejs/sosse/commit/7e13678f58215973de1031f1e7f5497a44081780))

## [0.8.0-next.15](https://github.com/sossejs/sosse/compare/v0.8.0-next.14...v0.8.0-next.15) (2020-12-25)


### Bug Fixes

* ignore subfolders in client assets ([7d2f6d2](https://github.com/sossejs/sosse/commit/7d2f6d235225d6323ab0d6f3352829d5ecbe2170))

## [0.8.0-next.14](https://github.com/sossejs/sosse/compare/v0.8.0-next.13...v0.8.0-next.14) (2020-12-25)


### Features

* add fastify decorate and serverFactory ([bd0619e](https://github.com/sossejs/sosse/commit/bd0619e43d6e8cbd5383b10b5e918a2783170fb9))

## [0.8.0-next.13](https://github.com/sossejs/sosse/compare/v0.8.0-next.12...v0.8.0-next.13) (2020-12-24)


### Bug Fixes

* move not bundleable dependencies out of dev ([a0e36c3](https://github.com/sossejs/sosse/commit/a0e36c30a53d9d344a43b7dddb56e165d83f5dc3))

## [0.8.0-next.12](https://github.com/sossejs/sosse/compare/v0.8.0-next.11...v0.8.0-next.12) (2020-12-24)


### Bug Fixes

* upgrade to current microbundle and fix types dist ([30286f3](https://github.com/sossejs/sosse/commit/30286f3c53ccceb412531fa6a069313b7bd7ac61))

## [0.8.0-next.11](https://github.com/sossejs/sosse/compare/v0.8.0-next.10...v0.8.0-next.11) (2020-12-24)


### ⚠ BREAKING CHANGES

* rework preact components and ssr with preact-iso
* rename uni module to iso

### Features

* rework ctx html functions ([5c4695b](https://github.com/sossejs/sosse/commit/5c4695b1996030a9822a2b097c9c53b80c611cd9))
* rework preact components and ssr with preact-iso ([cc1d948](https://github.com/sossejs/sosse/commit/cc1d948ff45486fbbc02588168889d43d5492344))


* rename uni module to iso ([e778555](https://github.com/sossejs/sosse/commit/e778555a9f2f1da94b6483a654959a14fa579e05))

## [0.8.0-next.10](https://github.com/sossejs/sosse/compare/v0.8.0-next.9...v0.8.0-next.10) (2020-12-16)

## [0.8.0-next.9](https://github.com/sossejs/sosse/compare/v0.8.0-next.8...v0.8.0-next.9) (2020-12-13)


### Features

* update sosse init template ([a8d1554](https://github.com/sossejs/sosse/commit/a8d15547b5ceb3812b9654b6986c541cf3290599))


### Bug Fixes

* dont clear node_modules from require cache ([c9297d0](https://github.com/sossejs/sosse/commit/c9297d099262a2e5df25fb62786cc14f0185a867))

## [0.8.0-next.8](https://github.com/sossejs/sosse/compare/v0.8.0-next.7...v0.8.0-next.8) (2020-12-13)


### Bug Fixes

* improve ctx event listeners memory usage ([b7488b8](https://github.com/sossejs/sosse/commit/b7488b8d4bf9822d32a12a4409d361a11b571815))
* only cache clear modules from the project folder ([5519d9a](https://github.com/sossejs/sosse/commit/5519d9a0210812e5628ad839a98880238b0b6208))

## [0.8.0-next.7](https://github.com/sossejs/sosse/compare/v0.8.0-next.6...v0.8.0-next.7) (2020-09-16)


### Features

* export Ctx for consumption ([3b3cb6f](https://github.com/sossejs/sosse/commit/3b3cb6ff5424d53c0b09f5cd71328b49a998b93e))

## [0.8.0-next.6](https://github.com/sossejs/sosse/compare/v0.8.0-next.5...v0.8.0-next.6) (2020-09-16)


### ⚠ BREAKING CHANGES

* move context depended functions to context

### Features

* **html:** add data param and remove side effect based data ([b564757](https://github.com/sossejs/sosse/commit/b56475798206b57e247f6108172fb61d9ff86f81))
* move context depended functions to context ([df8ae5c](https://github.com/sossejs/sosse/commit/df8ae5c73418d6322bc8b25ff80ca9c625e26e15))

## [0.8.0-next.5](https://github.com/sossejs/sosse/compare/v0.8.0-next.4...v0.8.0-next.5) (2020-08-18)

## [0.8.0-next.4](https://github.com/sossejs/sosse/compare/v0.8.0-next.3...v0.8.0-next.4) (2020-08-18)


### ⚠ BREAKING CHANGES

* only replace NODE_ENV in client bundles
* remove sosseDev ref from ctx assets
* split assets into js and css

### Features

* split assets into js and css ([3e73b38](https://github.com/sossejs/sosse/commit/3e73b3880bd3d9de771f209974e703f6a904be09))
* try to build the server in production when main is missing ([09d12c9](https://github.com/sossejs/sosse/commit/09d12c93c13bce928d6bfaf39b8dfa970be79219))


### Bug Fixes

* dont bundle client if assets already exist ([338ea4a](https://github.com/sossejs/sosse/commit/338ea4a14c4d57d623073b762b08c0f919271267))


* only replace NODE_ENV in client bundles ([d754f13](https://github.com/sossejs/sosse/commit/d754f130647f2e72c97bad0a9645ab7c2465edf8))
* remove sosseDev ref from ctx assets ([3738e09](https://github.com/sossejs/sosse/commit/3738e090dd4ea843d05915d8ca62cab6bd975b89))

## [0.8.0-next.3](https://github.com/sossejs/sosse/compare/v0.8.0-next.2...v0.8.0-next.3) (2020-08-09)


### ⚠ BREAKING CHANGES

* remove html attribute from asset, but add path and props

### Features

* export Asset type ([277fe97](https://github.com/sossejs/sosse/commit/277fe970648a6830103458ce6869f3f6d6438592))
* remove html attribute from asset, but add path and props ([d74a895](https://github.com/sossejs/sosse/commit/d74a8956fb789ac457e4aa6a007810dadf86f1d1))

## [0.8.0-next.2](https://github.com/sossejs/sosse/compare/v0.8.0-next.1...v0.8.0-next.2) (2020-08-05)


### Bug Fixes

* **create-type-proxies:** resolve module dts path with moduleName ([5c95a05](https://github.com/sossejs/sosse/commit/5c95a05f794086f774585b70e5db78e0671a67a6))

## [0.8.0-next.1](https://github.com/sossejs/sosse/compare/v0.8.0-next.0...v0.8.0-next.1) (2020-08-05)

## [0.8.0-next.0](https://github.com/sossejs/sosse/compare/v0.7.2...v0.8.0-next.0) (2020-08-03)


### ⚠ BREAKING CHANGES

* implement sosse api and cli, rework hsr api

### Features

* implement sosse api and cli, rework hsr api ([d295db4](https://github.com/sossejs/sosse/commit/d295db472f533f9fd74bcc3e14b586d6efffaba0))

### [0.7.2](https://github.com/sossejs/sosse/compare/v0.7.1...v0.7.2) (2020-07-25)

### [0.7.1](https://github.com/sossejs/sosse/compare/v0.7.0...v0.7.1) (2020-07-18)
Expand Down
57 changes: 48 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,59 @@
# [🥣 Sosse](https://github.com/sossejs/sosse)

Composable toolkit for full-stack node web servers with Preact:

- 🔥 Hot server restart
- 🔄 Live reload
- 🖨 Output server errors in browser
- ⚛️ Interactive Preact components
- 🌊 CSS server side rendering with [Otion](https://github.com/kripod/otion)
- 📦 Bundling JS with [Rollup](https://github.com/rollup/rollup)

## 🤓 [Getting started](https://github.com/sossejs/sosse/blob/next/docs/getting_started.md)

[![](assets/badge.license.svg)](https://opensource.org/licenses/MIT)
[![](assets/badge.npm.svg)](https://www.npmjs.com/package/sosse)
[![](assets/badge.style.svg)](https://prettier.io/)

---

Spice your servers up with a lil Sosse
## TLDR

Usage examples can be found in the [Getting started](https://github.com/sossejs/sosse/blob/master/docs/getting_started.md) section.
- At its core Sosse is a wrapper around node's native http server which can be replaced one-to-one
- This wrapper is used as a base to incrementally integrate Devtooling like "Live reload" and server features like "Server side rendering"

## Features:
## Architecture

- 🔥 Hot server restart
- 🔄 Live reload
- 🖨 Outputs server errors in browser
- ⚛️ Interactive (p)react components
- 🌊 Css Serverside Rendering with [Otion](https://github.com/kripod/otion)
- 📦 Bundling client assets with [Microbundle](https://github.com/developit/microbundle)
- Explicitly **not** a single page application framework
- Routing:
- Implemented on the server
- [Express](https://github.com/expressjs/expressjs.com), [Fastify](https://github.com/fastify/fastify) and others can be used as server routing solution
- Sosse does not predetermine a specific routing library, nor does it require one
- Rendering HTML:
- [Preact](https://github.com/preactjs/preact) is used as the view layer
- Static components are directly rendered on the server
- Dynamic components are rendered on the client
- Static parts from dynamic components can be prerendered on the server
- Rendering CSS:
- The recommended CSS in JS solution is [Otion](https://github.com/kripod/otion)
- CSS files and modules are supported for client side rendering and are processed with [PostCSS](https://github.com/postcss/postcss)
- JS Bundling / Transpilation:
- Done for the client & server
- Convention over configuration
- Sosse handles the bundling (with Rollup)
- Stay away from Sosse if you have very specific requirements about how to bundle your JS

## Main use case

Small - middle sized, but quickly growing and changing web projects with a strong focus on a composable UI, are the main target for Sosse.

Setting up a component driven web site has generally a high abstraction cost. As an example I want to mention [Next.js](https://github.com/vercel/next.js), a really powerful full-stack react framework. This power comes at a price: In the best case you only have to implement a couple things like routes and redirects in the "Next.js"-way, and in the worst case it will hit you in the business logic and you have to accept unexpected trade-offs.

Sosse tries to avoid typical framework-like trade-offs by limitting its feature-set, architectural style and defining clear boundaries.

# Ideas for the future

- CSS server side rendering support
- Currently css files can be imported on both client and server, but importing them on the server does not do anything to the client
- Proper ssr support would mean that only the needed css styles would be rendered in the document, we would need to implement something similar as described here: https://github.com/egoist/rollup-plugin-postcss/issues/177
- An alternative would be to attach a full bundled css file, but that fails with this issue: https://github.com/rollup/rollup/issues/3669
5 changes: 3 additions & 2 deletions assets/badge.coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions assets/badge.license.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading