Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-leroux/typescriptdemo
Toy project to create a default configuration for woring with TypeScript, ESLint, Mocha and Chai in the same NodeJS project
https://github.com/s-leroux/typescriptdemo
Last synced: about 1 month ago
JSON representation
Toy project to create a default configuration for woring with TypeScript, ESLint, Mocha and Chai in the same NodeJS project
- Host: GitHub
- URL: https://github.com/s-leroux/typescriptdemo
- Owner: s-leroux
- License: mit
- Created: 2024-10-01T07:55:38.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-05T10:39:12.000Z (2 months ago)
- Last Synced: 2024-11-05T11:42:14.434Z (2 months ago)
- Language: JavaScript
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stage 0
Install docker and npm (any version) on the host computer.
After that we will work in a specific container.# Stage 1: Create and start the container:
```
sh$ npm run build-container
sh$ npm run shellnode@52939f3b198e:~$ pwd
/home
node@52939f3b198e:~$ ls -l
total 12
-rw-rw-r-- 1 node node 841 Oct 1 07:58 DOCKERFILE
-rw-rw-r-- 1 node node 1071 Oct 1 07:56 LICENSE
-rw-rw-r-- 1 node node 1136 Oct 1 08:15 package.json
node@52939f3b198e:~$ whoami
node
node@52939f3b198e:~$ exit
exitsh$
```# Start 2: Run the node application
```
sh$ npm start
# or
sh$ npm run shell
node@2b9634cf5c20:~$ exec yarn start-in-container
```# Stage 3: Run Mocha
```
sh$ npm test
# or
sh$ npm run shell
node@2b9634cf5c20:~$ exec yarn test-in-container
```# Stage 4: Run ESLint
```
sh$ npm run lint
# or
sh$ npm run shell
node@2b9634cf5c20:~$ exec yarn lint-in-container
```