Skip to content

Commit 52ee457

Browse files
JavierCaneismanapa
andauthored
Merge pull request #1 from CodelyTV/remove-web
feat: add swc and remove all web related dependencies ci: unify lint and tests workflows in order to speed-up feedback loop doc: update readme instructions removing web related references feat: replace ts-jest with SWC (and update the other deps 👼) chore: fix security issues feat: replace web content with pure TypeScript examples doc: link to other skeleton repositories feat: remove Webpack as it is not needed for bare minimum TypeScript feat: remove Cypress in order to leave this repository with the bare minimum needed to run TypeScript and move Cypress to typescript-web-skeleton Co-authored-by: ismanapa <[email protected]>
2 parents 90e1443 + a1dc389 commit 52ee457

29 files changed

+3808
-12465
lines changed

.eslintrc.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ module.exports = {
44
"plugin:@typescript-eslint/recommended",
55
"plugin:prettier/recommended",
66
],
7-
plugins: ["eslint-plugin-html", "simple-import-sort", "import"],
7+
plugins: ["simple-import-sort", "import"],
88
parserOptions: {
99
ecmaVersion: 12,
1010
sourceType: "module",
1111
},
1212
rules: {
13-
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
1413
"simple-import-sort/imports": "error",
1514
"simple-import-sort/exports": "error",
1615
"import/first": "error",
1716
"import/newline-after-import": "error",
1817
"import/no-duplicates": "error",
1918
},
20-
ignorePatterns: ["webpack.*.js"],
2119
};
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
name: lint
1+
name: CI
22

33
on: push
44

55
jobs:
6-
lint:
6+
unit:
77
runs-on: ubuntu-latest
8-
8+
name: 🚀 Lint and test
9+
timeout-minutes: 5
910
steps:
10-
- uses: actions/checkout@v2
11+
- name: 👍 Checkout
12+
uses: actions/checkout@v2
1113

12-
- name: Cache node modules
14+
- name: 📦 Cache node modules
1315
uses: actions/cache@v2
1416
env:
1517
cache-name: cache-node-modules
@@ -21,8 +23,11 @@ jobs:
2123
${{ runner.os }}-build-
2224
${{ runner.os }}-
2325
24-
- name: Install Dependencies
26+
- name: 📥 Install dependencies
2527
run: npm install
2628

27-
- name: Lint
29+
- name: 💅 Lint code style
2830
run: npm run lint
31+
32+
- name: ✅ Run tests
33+
run: npm run test

.github/workflows/test.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
8-
# Dependency directories
91
node_modules/
10-
11-
# Optional npm cache directory
12-
.npm
13-
14-
# Optional eslint cache
15-
.eslintcache
16-
17-
# Output of 'npm pack'
18-
*.tgz
19-
20-
# Yarn Integrity file
21-
.yarn-integrity
22-
23-
# dotenv environment variables file
24-
.env
25-
.env.test
26-
27-
# Build output
28-
dist

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 CodelyTV
3+
Copyright (c) 2022 Codely Enseña y Entretiene SL
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 21 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,41 @@
1-
# TypeScript Bootstrap (base / project starter)
1+
# 🔷🌱 TypeScript Skeleton
22

3-
This is a repository intended to serve as a starting point if you want to bootstrap a project in TypeScript.
3+
Template intended to serve as a starting point if you want to bootstrap a project in TypeScript.
4+
5+
The purpose of this repository is to leave it with the bare minimum dependencies and tools needed to run TypeScript snippets or start you project without any opinionated decision already made.
46

57
## Features
68

79
- [TypeScript](https://www.typescriptlang.org/) (v4)
8-
- [Webpack](https://webpack.js.org/) (v5)
9-
- [Babel](https://babeljs.io/) with [preset-env](https://babeljs.io/docs/en/babel-preset-env)
1010
- [Prettier](https://prettier.io/)
1111
- [ESLint](https://eslint.org/) with:
1212
- [Simple Import Sort](https://github.com/lydell/eslint-plugin-simple-import-sort/)
1313
- [Import plugin](https://github.com/benmosher/eslint-plugin-import/)
14-
- [HTML plugin](https://github.com/BenoitZugmeyer/eslint-plugin-html)
1514
- And a few other ES2015+ related rules
1615
- [Jest](https://jestjs.io) with [DOM Testing Library](https://testing-library.com/docs/dom-testing-library/intro)
17-
- [Cypress](https://www.cypress.io/) with [Testing Library](https://testing-library.com/docs/cypress-testing-library/)
1816
- [GitHub Action workflows](https://github.com/features/actions) set up to run tests and linting on push
17+
- [SWC](https://swc.rs/): Execute your tests in less than 200ms
1918

2019
## Running the app
2120

22-
```
23-
# install dependencies
24-
npm install
25-
26-
# run in dev mode on port 8080
27-
npm run dev
28-
29-
# generate production build
30-
npm run build
31-
32-
# run generated content in dist folder on port 8080
33-
npm run start
34-
```
35-
36-
## Testing
37-
38-
### Jest with Testing Library
39-
40-
```
41-
npm run test
42-
```
43-
44-
### Cypress
45-
46-
```
47-
# run in dev mode on port 8080
48-
npm run dev
21+
- Install the dependencies: `npm install`
22+
- Execute the tests: `npm run test`
23+
- Check linter errors: `npm run lint`
24+
- Fix linter errors: `npm run lint:fix`
4925

50-
# open Cypress to run tests on dev mode
51-
npm run cy:open
26+
## Related skeleton templates
5227

53-
# open Cypress on CLI
54-
npm run cy:run
55-
```
28+
Opinionated TypeScript skeletons ready for different purposes:
5629

57-
## Linting
30+
- [🔷🕸️ TypeScript Web Skeleton](https://github.com/CodelyTV/typescript-web-skeleton)
31+
- [🔷🌍 TypeScript API Skeleton](https://github.com/CodelyTV/typescript-api-skeleton)
32+
- [🔷✨ TypeScript DDD Skeleton](https://github.com/CodelyTV/typescript-ddd-skeleton)
5833

59-
```
60-
# run linter
61-
npm run lint
34+
This very same basic skeleton philosophy implemented in other programming languages:
6235

63-
# fix lint issues
64-
npm run lint:fix
65-
```
36+
- [✨ JavaScript Basic Skeleton](https://github.com/CodelyTV/javascript-basic-skeleton)
37+
- [☕ Java Basic Skeleton](https://github.com/CodelyTV/java-basic-skeleton)
38+
- [📍 Kotlin Basic Skeleton](https://github.com/CodelyTV/kotlin-basic-skeleton)
39+
- [🧬 Scala Basic Skeleton](https://github.com/CodelyTV/scala-basic-skeleton)
40+
- [🦈 C# Basic Skeleton](https://github.com/CodelyTV/csharp-basic-skeleton)
41+
- [🐘 PHP Basic Skeleton](https://github.com/CodelyTV/php-basic-skeleton)

babel.config.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

cypress.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

cypress/fixtures/example.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

cypress/integration/home.spec.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)