Skip to content

Commit 641545e

Browse files
committed
Initial commit
1 parent 510cd40 commit 641545e

40 files changed

+8647
-1
lines changed

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.dockerignore
2+
.git
3+
docker-compose.yml
4+
Dockerfile
5+
node_modules
6+
dist
7+
data
8+
logs

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
end_of_line = lf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
indent_style = space
10+
indent_size = 2

.github/workflows/nodejs.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Node CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version: [12.x, 15.x]
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Use Node.js ${{ matrix.node-version }}
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: ${{ matrix.node-version }}
18+
- name: npm install
19+
run: |
20+
npm install
21+
- name: npm run build
22+
run: |
23+
npm run build --if-present
24+
npm run lint
25+
- name: npm test
26+
run: |
27+
npm test

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
dist/
3+
.tmp
4+
logs/
5+
data
6+
test-results.xml

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v12.18.3

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 2,
4+
"singleQuote": true,
5+
"trailingComma": "none",
6+
"semicolons": true,
7+
"quoteProps": "as-needed",
8+
"arrowParens": "avoid"
9+
}

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM node:12.16.3-slim
2+
3+
WORKDIR /code
4+
5+
COPY package.json package-lock.json ./
6+
RUN npm install

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.PHONY = default deps build test start-mooc-backend clean start-database start-backoffice-frontend
2+
3+
# Shell to use for running scripts
4+
SHELL := $(shell which bash)
5+
IMAGE_NAME := codelytv/typescript-ddd-skeleton
6+
SERVICE_NAME := app
7+
MOOC_APP_NAME := mooc
8+
BACKOFFICE_APP_NAME := backoffice
9+
10+
# Test if the dependencies we need to run this Makefile are installed
11+
DOCKER := $(shell command -v docker)
12+
DOCKER_COMPOSE := $(shell command -v docker-compose)
13+
deps:
14+
ifndef DOCKER
15+
@echo "Docker is not available. Please install docker"
16+
@exit 1
17+
endif
18+
ifndef DOCKER_COMPOSE
19+
@echo "docker-compose is not available. Please install docker-compose"
20+
@exit 1
21+
endif
22+
23+
default: build
24+
25+
# Build image
26+
build:
27+
docker build -t $(IMAGE_NAME):dev .

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
For now, you have all the code example available in this other repository: https://github.com/CodelyTV/typescript-ddd-example
44

5-
The idea is that we'll move the basic parts (folder structure and bare minimum code to serve as skeleton) to this repository (`typescript-ddd-skeleton`) once we completelly finish the `typescript-ddd-example` code. Current progress: ~95%
5+
The idea is that we'll move the basic parts (folder structure and bare minimum code to serve as skeleton) to this repository (`typescript-ddd-skeleton`) once we completely finish the `typescript-ddd-example` code. Current progress: ~95%

cucumber.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const common = [
2+
'--require-module ts-node/register' // Load TypeScript module
3+
];
4+
5+
const mooc_backend = [
6+
...common,
7+
'tests/apps/mooc/backend/features/**/*.feature',
8+
'--require tests/apps/mooc/backend/features/step_definitions/*.steps.ts'
9+
].join(' ');
10+
11+
module.exports = {
12+
mooc_backend
13+
};

jest.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
preset: 'ts-jest',
3+
testEnvironment: 'node',
4+
cacheDirectory: '.tmp/jestCache'
5+
};

0 commit comments

Comments
 (0)