UNPKG

18.1 kBMarkdownView Raw
1<p style="text-align: center; background: white;">
2 <a href="https://leanupjs.org">
3 <img src="https://leanupjs.org/assets/logo.svg" height="100">
4 </a><br>
5 <h2 style="text-align: center;">
6 <cite><b>Make things pure</b> ... to become lean.</cite>
7 </h2>
8</p>
9<!-- <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/du_BnIZzEKs" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="true"></iframe> -->
10<hr>
11
12[![license][license]][license-url]
13[![lernajs][lernajs]][lernajs-url]
14[![prettier][prettier]][prettier-url]
15[![@leanup/cli](https://snyk.io/advisor/npm-package/@leanup/cli/badge.svg)](https://snyk.io/advisor/npm-package/@leanup/cli)
16
17[license]: https://img.shields.io/npm/l/@leanup/cli
18[license-url]: https://github.com/leanupjs/cli/blob/master/LICENSE
19[lernajs]: https://img.shields.io/badge/managed%20with-lerna-blueviolet
20[lernajs-url]: https://lerna.js.org
21[prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg
22[prettier-url]: https://prettier.io
23
24<h1>leanup<sup style="color: grey; font-size: 75%"> js</sup></h1>
25
26The **`@leanup` ecosystem** stands for a lightweight and pure way for application development in JavaScript/TypeScript.
27
28- [Motivation](#motivation)
29- [Our home stories](#our-home-stories)
30 - [In 2021](#in-2021)
31 - [Transpilers](#transpilers)
32 - [Frameworks](#frameworks)
33 - [Bundlers](#bundlers)
34- [What makes the difference](#what-makes-the-difference)
35- [Principles](#principles)
36- [Arguments](#arguments)
37 - [Pro](#pro)
38 - [Contra](#contra)
39- [Demo's](#demos)
40- [Tools](#tools)
41- [Ecosystem structure](#ecosystem-structure)
42 - [Frameworks](#frameworks-1)
43 - [Extensions](#extensions)
44 - [Thinks](#thinks)
45- [Alternatives](#alternatives)
46
47## Motivation
48
49- Learnability
50- Controllability
51- Universality
52- Flexibility
53- Scalability
54- Durability
55- Transparency
56
57## Our home stories
58
59### In 2021
60#### Transpilers
61
62We switched from [Babel] to [esbuild] and from esbuild to [swc] (without [Angular] and [Vue] with proprietary template notation). And we can switch again if we want.
63
64The performance of [esbuild] and [swc] are almost twice as fast as with the classic configuration. But there is currently no noticeable difference in performance between [esbuild] and [swc].
65
66#### Frameworks
67
68We added two more frameworks ([Lit] and [Solid]) without any problems, without having to change the basic stack.
69
70We have switched our Demo-Template from [Bootstrap] to [Tailwindcss] and from Tailwindcss to [WindiCSS] and now use the automatic application-specific CSS generation.
71
72#### Bundlers
73
74We tried two new bundlers ([Vite] and [Snowpack]) and integrated them for most frameworks. Alternatively, they can be installed alongside or instead of [webpack].
75
76## What makes the difference
77
78> <cite>Stop the transitive knowledge.</cite>
79
80We use the minimal configuration and build no overhead stuff on top of the popular tools and make every native command transparent.
81
82## Principles
83
84- convention over configuration
85- pure commands under the hood
86- don't repeat yourself
87- following the generic instead of the influenced way
88- keep the dependencies always up to date
89
90## Arguments
91
92The arguments for and against this concept are documented here:
93
94### Pro
95
96- select only one pure and popular tool for each use case (e.g. bundling, unit-test)
97- there are extensible configuration files for each tool
98- due to the flat dependencies we can always stay up to date
99- the CLI bundles all the necessary tools in a portable/scalable way
100- the risk to get vulnerabilites in dependencies is lower
101- leanup's own code is kept to a minimum
102
103### Contra
104
105> - please give feedback
106> - please show us your perspective
107
108## Demo's
109
110There are some working examples:
111
112- [https://github.modevel.de/poc/](https://github.modevel.de/poc/)
113- [PoC - Flexible web application architecture](https://github.com/martinoppitz/poc-flexible-web-application-architecture#readme)
114- [Hello World - Comparison](https://github.com/martinoppitz/hello-world-comparison#readme)
115
116## Tools
117
118| Tool/Technology | Description | Status | Note | Rating |
119| ---------------- | :---------------: | :----: | :------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
120| [TypeScript] | Language | ✔️ | ready | [![typescript](https://snyk.io/advisor/npm-package/typescript/badge.svg)](https://snyk.io/advisor/npm-package/typescript) |
121| [Webpack] | Bundler | ✔️ | ready | [![webpack](https://snyk.io/advisor/npm-package/webpack/badge.svg)](https://snyk.io/advisor/npm-package/webpack) |
122| [Snowpack] | Bundler | ⌛ | in progress | [![webpack](https://snyk.io/advisor/npm-package/snowpack/badge.svg)](https://snyk.io/advisor/npm-package/snowpack) |
123| [Vite] | Bundler | ⌛ | in progress | [![webpack](https://snyk.io/advisor/npm-package/vite/badge.svg)](https://snyk.io/advisor/npm-package/vite) |
124| [esbuild] | Transpiler | ✔️ | ready | [![esbuild](https://snyk.io/advisor/npm-package/esbuild/badge.svg)](https://snyk.io/advisor/npm-package/esbuild) |
125| [swc] | Transpiler | ✔️ | ready | [![swc](https://snyk.io/advisor/npm-package/@swc/core/badge.svg)](https://snyk.io/advisor/npm-package/@swc/core) |
126| [Babel] | Transpiler | ✔️ | ready | [![@babel/core](https://snyk.io/advisor/npm-package/@babel/core/badge.svg)](https://snyk.io/advisor/npm-package/@babel/core) |
127| [Mocha] | Unit-Test-Runner | ✔️ | ready | [![mocha](https://snyk.io/advisor/npm-package/mocha/badge.svg)](https://snyk.io/advisor/npm-package/mocha) |
128| [Chai] | Assertion | ✔️ | ready | [![chai](https://snyk.io/advisor/npm-package/typescript/badge.svg)](https://snyk.io/advisor/npm-package/chai) |
129| [Sinon] | Mocking | ✔️ | ready | [![sinon](https://snyk.io/advisor/npm-package/sinon/badge.svg)](https://snyk.io/advisor/npm-package/sinon) |
130| [NYC] | Code-Coverage | ✔️ | ready | [![nyc](https://snyk.io/advisor/npm-package/nyc/badge.svg)](https://snyk.io/advisor/npm-package/nyc) |
131| [ESLint] | Code-Checker | ✔️ | ready | [![eslint](https://snyk.io/advisor/npm-package/eslint/badge.svg)](https://snyk.io/advisor/npm-package/eslint) |
132| [Nightwatch.js] | E2E-Test-Runner | ✔️ | ready | [![nightwatch](https://snyk.io/advisor/npm-package/nightwatch/badge.svg)](https://snyk.io/advisor/npm-package/nightwatch) |
133| [Allsure] | Report | ✔️ | ready |
134| [Cucumber] | BDD | ✔️ | ready | [![cucumber](https://snyk.io/advisor/npm-package/cucumber/badge.svg)](https://snyk.io/advisor/npm-package/cucumber) |
135| [robotframework] | BDD | ⌛ | will be evaluated | |
136| [Storybook] | Documentation | ⌛ | in progress | [![storybook](https://snyk.io/advisor/npm-package/storybook/badge.svg)](https://snyk.io/advisor/npm-package/storybook) |
137| [OpenAPI] | API | ✔️ | ready | |
138| [GraphQL] | API | ✔️ | ready | [![graphql](https://snyk.io/advisor/npm-package/graphql/badge.svg)](https://snyk.io/advisor/npm-package/graphql) |
139| [Workbox] | PWA | ✔️ | ready | [![workbox](https://snyk.io/advisor/npm-package/workbox/badge.svg)](https://snyk.io/advisor/npm-package/workbox) |
140| [Lerna] | Mono-Repo | ✔️ | ready | [![lerna](https://snyk.io/advisor/npm-package/lerna/badge.svg)](https://snyk.io/advisor/npm-package/lerna) |
141| [Ant-Design] | Design-System | ✔️ | proved | [![antd](https://snyk.io/advisor/npm-package/antd/badge.svg)](https://snyk.io/advisor/npm-package/antd) |
142| [Bootstrap] | Design-System | ✔️ | proved | [![bootstrap](https://snyk.io/advisor/npm-package/bootstrap/badge.svg)](https://snyk.io/advisor/npm-package/bootstrap) |
143| [Material] | Design-System | ✔️ | proved | [![@material/textfield](https://snyk.io/advisor/npm-package/@material/textfield/badge.svg)](https://snyk.io/advisor/npm-package/@material/textfield) |
144| [Tailwindcss] | Design-System | ✔️ | proved | [![tailwindcss](https://snyk.io/advisor/npm-package/tailwindcss/badge.svg)](https://snyk.io/advisor/npm-package/tailwindcss) |
145| [WindiCSS] | Design-System | ✔️ | proved | [![tailwindcss](https://snyk.io/advisor/npm-package/windicss/badge.svg)](https://snyk.io/advisor/npm-package/windicss) |
146| [Nexus IQ] | Vulnerabiliy-Gate | ✔️ | ready | |
147| [Less] | CSS | ✔️ | ready | [![less](https://snyk.io/advisor/npm-package/less/badge.svg)](https://snyk.io/advisor/npm-package/less) |
148| [Sass] | CSS | ✔️ | ready | [![sass](https://snyk.io/advisor/npm-package/sass/badge.svg)](https://snyk.io/advisor/npm-package/sass) |
149| [PostCSS] | CSS | ✔️ | ready | [![postcss](https://snyk.io/advisor/npm-package/postcss/badge.svg)](https://snyk.io/advisor/npm-package/postcss) |
150| [TSArch] | Architecture | ⌛ | in progress | [![hint](https://snyk.io/advisor/npm-package/tsarch/badge.svg)](https://snyk.io/advisor/npm-package/tsarch) |
151| [Webhint] | Webhint | ✔️ | moved \*\*\* | [![hint](https://snyk.io/advisor/npm-package/hint/badge.svg)](https://snyk.io/advisor/npm-package/hint) |
152| [TestCafe] | E2E-Test-Runner | ⌛ | will be evaluated \*\*\*\* | [![testcafe](https://snyk.io/advisor/npm-package/testcafe/badge.svg)](https://snyk.io/advisor/npm-package/typescript) |
153| [TSLint] | Code-Checker | ❌ | removed \*\* | [![tslint](https://snyk.io/advisor/npm-package/tslint/badge.svg)](https://snyk.io/advisor/npm-package/tslint) |
154| [Cypress] | E2E-Test-Runner | ❌ | excluded \* | [![cypress](https://snyk.io/advisor/npm-package/cypress/badge.svg)](https://snyk.io/advisor/npm-package/cypress) |
155
156> \*
157> Arguments agains [Cypress]:
158>
159> - reinvent wheel
160> - detect css selectors
161> - BDD test syntax
162> - principals
163> - large tooling
164> - a lot of binaries
165> - many dependencies
166> - ci integration vs selenium hub
167>
168> It is difficult to keep focus with Cypress as it is more a nice tool than an effective tool. It is expected that a lot of time will be invested to justify the requirements of a project.
169
170> \*\* TSLint is deprecated.
171
172> \*\*\* Webhint is not practical for the development of components, since component tags often have no relation to standard HTML. In addition, the webhint package alone is over 100 MB in size. I have good by using a IDE webhint plugin, like [VSCode webhint](https://marketplace.visualstudio.com/items?itemName=webhint.vscode-webhint).
173
174> \*\*\*\* [TestCafe] The idea that defined TestCafe architecture was that you don't really need an external driver to run end-to-end tests in the browser. That's interesting.
175
176## Ecosystem structure
177
178Vanilla Java-/TypeScript are supported by default. That means for example custom elements and any plain Java-/TypeScript code.
179
180- [`@leanup/cli`](https://www.npmjs.com/package/@leanup/cli) ✔️
181- [`@leanup/cli-vanilla`](https://www.npmjs.com/package/@leanup/cli-vanilla) (optional) ✔️
182
183### Frameworks
184
185Vanilla Java-/TypeScript are supported by default. That means for example custom elements and any plain Java-/TypeScript code.
186
187The selection of the following frameworks depends in parts on the following references:
188
189- [report](https://ashleynolan.co.uk/blog/frontend-tooling-survey-2019-results#js-framework-essential),
190- [benchmark](https://krausest.github.io/js-framework-benchmark/2020/table_chrome_80.html) and
191- [survey](https://2019.stateofjs.com/front-end-frameworks)
192
193Currently the following framework extensions are available:
194
195- [`@leanup/cli-angular`](https://www.npmjs.com/package/@leanup/cli-angular) ✔️
196- [`@leanup/cli-angularjs`](https://www.npmjs.com/package/@leanup/cli-angularjs) ✔️
197- [`@leanup/cli-aurelia`](https://www.npmjs.com/package/@leanup/cli-aurelia) ✔️
198- [`@leanup/cli-inferno`](https://www.npmjs.com/package/@leanup/cli-inferno) ✔️
199- [`@leanup/cli-lit-element`](https://www.npmjs.com/package/@leanup/cli-lit-element) ✔️
200- [`@leanup/cli-preact`](https://www.npmjs.com/package/@leanup/cli-preact) ✔️
201- [`@leanup/cli-react`](https://www.npmjs.com/package/@leanup/cli-react) ✔️
202- [`@leanup/cli-solid`](https://www.npmjs.com/package/@leanup/cli-solid) ✔️
203- [`@leanup/cli-svelte`](https://www.npmjs.com/package/@leanup/cli-svelte) ✔️
204- [`@leanup/cli-vue`](https://www.npmjs.com/package/@leanup/cli-vue) ✔️
205- [`@leanup/cli-vue3`](https://www.npmjs.com/package/@leanup/cli-vue3) ✔️
206
207### Extensions
208
209A separate package contains some nice but not required addons for webpack.
210
211- [`@leanup/cli-addons`](https://www.npmjs.com/package/@leanup/cli-addons) ✔️
212- [`@leanup/cli-cucumber`](https://www.npmjs.com/package/@leanup/cli-cucumber) ✔️
213- [`@leanup/cli-graphql`](https://www.npmjs.com/package/@leanup/cli-graphql) ✔️
214- [`@leanup/cli-pwa`](https://www.npmjs.com/package/@leanup/cli-pwa) ✔️
215- [`@leanup/cli-webhint`](https://www.npmjs.com/package/@leanup/cli-webhint) ✔️
216
217### Thinks
218
219There a separate packages for important application features.
220
221- [`@leanup/git-hooks`](https://www.npmjs.com/package/@leanup/git-hooks) ✔️
222- [`@leanup/form`](https://www.npmjs.com/package/@leanup/form) ✔️
223- [`@leanup/lib`](https://www.npmjs.com/package/@leanup/lib) ✔️
224- [`@leanup/ui`](https://www.npmjs.com/package/@leanup/ui) ⌛ (in progress)
225
226## Alternatives
227
228- Angular [![@angular/cli](https://snyk.io/advisor/npm-package/@angular/cli/badge.svg)](https://snyk.io/advisor/npm-package/@angular/cli)
229- Neutrino [![neutrino](https://snyk.io/advisor/npm-package/neutrino/badge.svg)](https://snyk.io/advisor/npm-package/neutrino)
230- Rome [![neutrino](https://snyk.io/advisor/npm-package/rome/badge.svg)](https://snyk.io/advisor/npm-package/rome)
231
232[babel]: https://babeljs.io
233[typescript]: https://typescriptlang.org
234[webpack]: https://webpack.js.org
235[mocha]: https://mochajs.org
236[chai]: https://www.chaijs.com
237[sinon]: https://sinonjs.org
238[nyc]: https://istanbul.js.org
239[storybook]: https://storybook.js.org
240[svelte devtools]: https://github.com/RedHatter/svelte-devtools
241[nightwatch.js]: https://nightwatchjs.org
242[tslint]: https://palantir.github.io/tslint
243[eslint]: https://eslint.org
244[graphql]: https://graphql.org
245[sass]: https://sass-lang.com
246[less]: http://lesscss.org
247[lerna]: https://lerna.js.org
248[workbox]: https://developers.google.com/web/tools/workbox
249[ant-design]: https://ant.design
250[allsure]: http://allure.qatools.ru
251[bootstrap]: https://getbootstrap.com
252[material]: https://material.io
253[cucumber]: https://cucumber.io
254[cypress]: https://www.cypress.io
255[webhint]: https://www.webhint.io
256[testcafe]: https://devexpress.github.io/testcafe/
257[robotframework]: https://robotframework.org
258[tailwindcss]: https://tailwindcss.com
259[postcss]: https://postcss.org
260[esbuild]: https://esbuild.github.io
261[snowpack]: https://www.snowpack.dev/
262[vite]: https://vitejs.dev/
263[openapi]: https://openapis.org
264[nexus iq]: https://blog.sonatype.com/using-nexus-iq-server-with-webpack
265[tsarch]: https://github.com/MaibornWolff/ts-arch
266[windicss]: https://windicss.org
267[swc]: https://swc.rs
268[Lit]: https://lit.dev
269[Angular]: https://angular.io
270[Vue]: https://v3.vuejs.org
271[Solid]: https://www.solidjs.com
272[Bootstrap]: https://getbootstrap.com