Skip to content

Commit

Permalink
Merge pull request #1 from vahidvdn/feature/migrate-to-nx
Browse files Browse the repository at this point in the history
Feature/migrate to nx
  • Loading branch information
vahidvdn authored Jul 12, 2024
2 parents ea159a2 + 1d7c5a2 commit ae08008
Show file tree
Hide file tree
Showing 30 changed files with 4,966 additions and 7 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
push:
branches:
- main
pull_request:

permissions:
actions: read
contents: read

jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0



# Connect your workspace on nx.app and uncomment this to enable task distribution.
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "build" targets have been requested
# - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build"


# Cache node_modules
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'

- run: npm ci
- uses: nrwl/nx-set-shas@v4

# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World
- run: npx nx affected -t lint test build
43 changes: 42 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
*/node_modules
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
dist
tmp
/out-tsc

# dependencies
node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db

.nx/cache
.nx/workspace-data
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [

"nrwl.angular-console",
"esbenp.prettier-vscode"
]
}
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Here is some steps in each `README` file:

## How to Run

After opening the design pattern directory, for each one you need to do the following:
After opening the design pattern directory, run:

```
$ npm install
Expand All @@ -31,18 +31,21 @@ $ npm install
To run the design pattern:

```
$ npm run start
$ npm run -w PATTERN_NAME start
```

For instance **PATTERN_NAME** can be strategy-pattern


To run the bad practice:

```
$ npm run start:bad
$ npm run -w PATTERN_NAME start:bad
```

## Contributing

Contributing to a community project is always welcome.
Contributing to a community project is always welcome. ✨ This workspace has been generated by [Nx, Smart Monorepos · Fast CI.](https://nx.dev)

## Checklist

Expand All @@ -61,4 +64,4 @@ Any support is welcome. You can give the project a star, if you liked it ⭐

## License

MIT
MIT
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export class AbstractConditionHandler implements ConditionHandler {
}
return true;
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "strategy-pattern",
"scripts": {
"start": "ts-node strategy-pattern",
"start:bad": "ts-node bad-practice"
Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"namedInputs": {
"default": [
"{projectRoot}/**/*",
"sharedGlobals"
],
"production": [
"default"
],
"sharedGlobals": []
},
"nxCloudAccessToken": "NjIxYmNjNzYtNjg2NS00ZDlmLThlZGItYzhjNjczMTQ3YmNkfHJlYWQtd3JpdGU="
}
Loading

0 comments on commit ae08008

Please sign in to comment.