UNPKG

16.7 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- [What makes the difference](#what-makes-the-difference)
30- [Principles](#principles)
31- [Arguments](#arguments)
32 - [Pro](#pro)
33 - [Contra](#contra)
34- [Demo's](#demos)
35- [Tools](#tools)
36- [Ecosystem structure](#ecosystem-structure)
37 - [Frameworks](#frameworks)
38 - [Extensions](#extensions)
39 - [Thinks](#thinks)
40- [Alternatives](#alternatives)
41
42## Motivation
43
44- Learnability
45- Controllability
46- Universality
47- Flexibility
48- Scalability
49- Durability
50- Transparency
51
52## What makes the difference
53
54> <cite>Stop the transitive knowledge.</cite>
55
56We use the minimal configuration and build no overhead stuff on top of the popular tools and make every native command transparent.
57
58## Principles
59
60- convention over configuration
61- pure commands under the hood
62- don't repeat yourself
63- following the generic instead of the influenced way
64- keep the dependencies always up to date
65
66## Arguments
67
68The arguments for and against this concept are documented here:
69
70### Pro
71
72- select only one pure and popular tool for each use case (e.g. bundling, unit-test)
73- there are extensible configuration files for each tool
74- due to the flat dependencies we can always stay up to date
75- the CLI bundles all the necessary tools in a portable/scalable way
76- the risk to get vulnerabilites in dependencies is lower
77- leanup's own code is kept to a minimum
78
79### Contra
80
81> - please give feedback
82> - please show us your perspective
83
84## Demo's
85
86There are some working examples:
87
88- [https://github.modevel.de/poc/](https://github.modevel.de/poc/)
89- [PoC - Flexible web application architecture](https://github.com/martinoppitz/poc-flexible-web-application-architecture#readme)
90- [Hello World - Comparison](https://github.com/martinoppitz/hello-world-comparison#readme)
91
92## Tools
93
94| Tool/Technology | Description | Status | Note | Rating |
95| ---------------- | :---------------: | :----: | :------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
96| [TypeScript] | Language | ✔️ | ready | [![typescript](https://snyk.io/advisor/npm-package/typescript/badge.svg)](https://snyk.io/advisor/npm-package/typescript) |
97| [Webpack] | Bundler | ✔️ | ready | [![webpack](https://snyk.io/advisor/npm-package/webpack/badge.svg)](https://snyk.io/advisor/npm-package/webpack) |
98| [Snowpack] | Bundler | ⌛ | in progress | [![webpack](https://snyk.io/advisor/npm-package/snowpack/badge.svg)](https://snyk.io/advisor/npm-package/snowpack) |
99| [Vite] | Bundler | ⌛ | in progress | [![webpack](https://snyk.io/advisor/npm-package/vite/badge.svg)](https://snyk.io/advisor/npm-package/vite) |
100| [ESBuild] | Transpiler | ✔️ | ready | [![esbuild](https://snyk.io/advisor/npm-package/esbuild/badge.svg)](https://snyk.io/advisor/npm-package/esbuild) |
101| [Babel] | Transpiler | ✔️ | ready | [![@babel/core](https://snyk.io/advisor/npm-package/@babel/core/badge.svg)](https://snyk.io/advisor/npm-package/@babel/core) |
102| [Mocha] | Unit-Test-Runner | ✔️ | ready | [![mocha](https://snyk.io/advisor/npm-package/mocha/badge.svg)](https://snyk.io/advisor/npm-package/mocha) |
103| [Chai] | Assertion | ✔️ | ready | [![chai](https://snyk.io/advisor/npm-package/typescript/badge.svg)](https://snyk.io/advisor/npm-package/chai) |
104| [Sinon] | Mocking | ✔️ | ready | [![sinon](https://snyk.io/advisor/npm-package/sinon/badge.svg)](https://snyk.io/advisor/npm-package/sinon) |
105| [NYC] | Code-Coverage | ✔️ | ready | [![nyc](https://snyk.io/advisor/npm-package/nyc/badge.svg)](https://snyk.io/advisor/npm-package/nyc) |
106| [ESLint] | Code-Checker | ✔️ | ready | [![eslint](https://snyk.io/advisor/npm-package/eslint/badge.svg)](https://snyk.io/advisor/npm-package/eslint) |
107| [Nightwatch.js] | E2E-Test-Runner | ✔️ | ready | [![nightwatch](https://snyk.io/advisor/npm-package/nightwatch/badge.svg)](https://snyk.io/advisor/npm-package/nightwatch) |
108| [Allsure] | Report | ✔️ | ready |
109| [Cucumber] | BDD | ✔️ | ready | [![cucumber](https://snyk.io/advisor/npm-package/cucumber/badge.svg)](https://snyk.io/advisor/npm-package/cucumber) |
110| [robotframework] | BDD | ⌛ | will be evaluated | |
111| [Storybook] | Documentation | ⌛ | in progress | [![storybook](https://snyk.io/advisor/npm-package/storybook/badge.svg)](https://snyk.io/advisor/npm-package/storybook) |
112| [OpenAPI] | API | ✔️ | ready | |
113| [GraphQL] | API | ✔️ | ready | [![graphql](https://snyk.io/advisor/npm-package/graphql/badge.svg)](https://snyk.io/advisor/npm-package/graphql) |
114| [Workbox] | PWA | ✔️ | ready | [![workbox](https://snyk.io/advisor/npm-package/workbox/badge.svg)](https://snyk.io/advisor/npm-package/workbox) |
115| [Lerna] | Mono-Repo | ✔️ | ready | [![lerna](https://snyk.io/advisor/npm-package/lerna/badge.svg)](https://snyk.io/advisor/npm-package/lerna) |
116| [Ant-Design] | Design-System | ✔️ | proved | [![antd](https://snyk.io/advisor/npm-package/antd/badge.svg)](https://snyk.io/advisor/npm-package/antd) |
117| [Bootstrap] | Design-System | ✔️ | proved | [![bootstrap](https://snyk.io/advisor/npm-package/bootstrap/badge.svg)](https://snyk.io/advisor/npm-package/bootstrap) |
118| [Material] | Design-System | ✔️ | proved | [![@material/textfield](https://snyk.io/advisor/npm-package/@material/textfield/badge.svg)](https://snyk.io/advisor/npm-package/@material/textfield) |
119| [Tailwindcss] | Design-System | ✔️ | proved | [![tailwindcss](https://snyk.io/advisor/npm-package/tailwindcss/badge.svg)](https://snyk.io/advisor/npm-package/tailwindcss) |
120| [WindiCSS] | Design-System | ✔️ | proved | [![tailwindcss](https://snyk.io/advisor/npm-package/windicss/badge.svg)](https://snyk.io/advisor/npm-package/windicss) |
121| [Nexus IQ] | Vulnerabiliy-Gate | ✔️ | ready | |
122| [Less] | CSS | ✔️ | ready | [![less](https://snyk.io/advisor/npm-package/less/badge.svg)](https://snyk.io/advisor/npm-package/less) |
123| [Sass] | CSS | ✔️ | ready | [![sass](https://snyk.io/advisor/npm-package/sass/badge.svg)](https://snyk.io/advisor/npm-package/sass) |
124| [PostCSS] | CSS | ✔️ | ready | [![postcss](https://snyk.io/advisor/npm-package/postcss/badge.svg)](https://snyk.io/advisor/npm-package/postcss) |
125| [TSArch] | Architecture | ⌛ | in progress | [![hint](https://snyk.io/advisor/npm-package/tsarch/badge.svg)](https://snyk.io/advisor/npm-package/tsarch) |
126| [Webhint] | Webhint | ✔️ | moved \*\*\* | [![hint](https://snyk.io/advisor/npm-package/hint/badge.svg)](https://snyk.io/advisor/npm-package/hint) |
127| [TestCafe] | E2E-Test-Runner | ⌛ | will be evaluated \*\*\*\* | [![testcafe](https://snyk.io/advisor/npm-package/testcafe/badge.svg)](https://snyk.io/advisor/npm-package/typescript) |
128| [TSLint] | Code-Checker | ❌ | removed \*\* | [![tslint](https://snyk.io/advisor/npm-package/tslint/badge.svg)](https://snyk.io/advisor/npm-package/tslint) |
129| [Cypress] | E2E-Test-Runner | ❌ | excluded \* | [![cypress](https://snyk.io/advisor/npm-package/cypress/badge.svg)](https://snyk.io/advisor/npm-package/cypress) |
130
131> \*
132> Arguments agains [Cypress]:
133>
134> - reinvent wheel
135> - detect css selectors
136> - BDD test syntax
137> - principals
138> - large tooling
139> - a lot of binaries
140> - many dependencies
141> - ci integration vs selenium hub
142>
143> 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.
144
145> \*\* TSLint is deprecated.
146
147> \*\*\* 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).
148
149> \*\*\*\* [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.
150
151## Ecosystem structure
152
153Vanilla Java-/TypeScript are supported by default. That means for example custom elements and any plain Java-/TypeScript code.
154
155- [`@leanup/cli`](https://www.npmjs.com/package/@leanup/cli) ✔️
156- [`@leanup/cli-vanilla`](https://www.npmjs.com/package/@leanup/cli-vanilla) (optional) ✔️
157
158### Frameworks
159
160Vanilla Java-/TypeScript are supported by default. That means for example custom elements and any plain Java-/TypeScript code.
161
162The selection of the following frameworks depends in parts on the following references:
163
164- [report](https://ashleynolan.co.uk/blog/frontend-tooling-survey-2019-results#js-framework-essential),
165- [benchmark](https://krausest.github.io/js-framework-benchmark/2020/table_chrome_80.html) and
166- [survey](https://2019.stateofjs.com/front-end-frameworks)
167
168Currently the following framework extensions are available:
169
170- [`@leanup/cli-angular`](https://www.npmjs.com/package/@leanup/cli-angular) ✔️
171- [`@leanup/cli-angularjs`](https://www.npmjs.com/package/@leanup/cli-angularjs) ✔️
172- [`@leanup/cli-aurelia`](https://www.npmjs.com/package/@leanup/cli-aurelia) ✔️ (will be removed in v1.1)
173- [`@leanup/cli-inferno`](https://www.npmjs.com/package/@leanup/cli-inferno) ✔️
174- [`@leanup/cli-lit-element`](https://www.npmjs.com/package/@leanup/cli-lit-element) ✔️
175- [`@leanup/cli-preact`](https://www.npmjs.com/package/@leanup/cli-preact) ✔️
176- [`@leanup/cli-react`](https://www.npmjs.com/package/@leanup/cli-react) ✔️
177- [`@leanup/cli-solid`](https://www.npmjs.com/package/@leanup/cli-solid) ✔️
178- [`@leanup/cli-svelte`](https://www.npmjs.com/package/@leanup/cli-svelte) ✔️
179- [`@leanup/cli-vue`](https://www.npmjs.com/package/@leanup/cli-vue) ✔️
180- [`@leanup/cli-vue3`](https://www.npmjs.com/package/@leanup/cli-vue3) ✔️
181
182### Extensions
183
184A separate package contains some nice but not required addons for webpack.
185
186- [`@leanup/cli-addons`](https://www.npmjs.com/package/@leanup/cli-addons) ✔️
187- [`@leanup/cli-cucumber`](https://www.npmjs.com/package/@leanup/cli-cucumber) ✔️
188- [`@leanup/cli-graphql`](https://www.npmjs.com/package/@leanup/cli-graphql) ✔️
189- [`@leanup/cli-pwa`](https://www.npmjs.com/package/@leanup/cli-pwa) ✔️
190- [`@leanup/cli-webhint`](https://www.npmjs.com/package/@leanup/cli-webhint) ✔️
191
192### Thinks
193
194There a separate packages for important application features.
195
196- [`@leanup/git-hooks`](https://www.npmjs.com/package/@leanup/git-hooks) ✔️
197- [`@leanup/form`](https://www.npmjs.com/package/@leanup/form) ✔️
198- [`@leanup/lib`](https://www.npmjs.com/package/@leanup/lib) ✔️
199- [`@leanup/ui`](https://www.npmjs.com/package/@leanup/ui) ⌛ (in progress)
200
201## Alternatives
202
203- Angular [![@angular/cli](https://snyk.io/advisor/npm-package/@angular/cli/badge.svg)](https://snyk.io/advisor/npm-package/@angular/cli)
204- Neutrino [![neutrino](https://snyk.io/advisor/npm-package/neutrino/badge.svg)](https://snyk.io/advisor/npm-package/neutrino)
205- Rome [![neutrino](https://snyk.io/advisor/npm-package/rome/badge.svg)](https://snyk.io/advisor/npm-package/rome)
206
207[babel]: https://babeljs.io
208[typescript]: https://typescriptlang.org
209[webpack]: https://webpack.js.org
210[mocha]: https://mochajs.org
211[chai]: https://www.chaijs.com
212[sinon]: https://sinonjs.org
213[nyc]: https://istanbul.js.org
214[storybook]: https://storybook.js.org
215[svelte devtools]: https://github.com/RedHatter/svelte-devtools
216[nightwatch.js]: https://nightwatchjs.org
217[tslint]: https://palantir.github.io/tslint
218[eslint]: https://eslint.org
219[graphql]: https://graphql.org
220[sass]: https://sass-lang.com
221[less]: http://lesscss.org
222[lerna]: https://lerna.js.org
223[workbox]: https://developers.google.com/web/tools/workbox
224[ant-design]: https://ant.design
225[allsure]: http://allure.qatools.ru
226[bootstrap]: https://getbootstrap.com
227[material]: https://material.io
228[cucumber]: https://cucumber.io
229[cypress]: https://www.cypress.io
230[webhint]: https://www.webhint.io
231[testcafe]: https://devexpress.github.io/testcafe/
232[robotframework]: https://robotframework.org
233[tailwindcss]: https://tailwindcss.com
234[postcss]: https://postcss.org
235[esbuild]: https://esbuild.github.io
236[snowpack]: https://www.snowpack.dev/
237[vite]: https://vitejs.dev/
238[openapi]: https://openapis.org
239[nexus iq]: https://blog.sonatype.com/using-nexus-iq-server-with-webpack
240[tsarch]: https://github.com/MaibornWolff/ts-arch
241[windicss]: https://windicss.org