Skip to content

Commit

Permalink
fresh start
Browse files Browse the repository at this point in the history
  • Loading branch information
dormeiri committed Feb 24, 2023
0 parents commit 3fe85b5
Show file tree
Hide file tree
Showing 117 changed files with 49,333 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
insert_final_newline = true
max_line_length = 180
trim_trailing_whitespace = true
quote_type = single

[*.md]
max_line_length = 180
indent_size = 2
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/dist
tools/generators/**/files
124 changes: 124 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:node/recommended",
"plugin:import/recommended",
"plugin:json/recommended",
"prettier"
],
"plugins": [
"node",
"prettier"
],
"rules": {
"prettier/prettier": "error",
"block-scoped-var": "error",
"no-var": "error",
"prefer-const": "error",
"eol-last": "error",
"prefer-arrow-callback": "error",
"no-trailing-spaces": "error",
"quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"no-restricted-properties": [
"error",
{
"object": "describe",
"property": "only"
},
{
"object": "it",
"property": "only"
}
],
"eqeqeq": [
"error",
"always",
{
"null": "ignore"
}
],
"import/no-default-export": "error",
"import/no-unresolved-import": "off",
"import/no-unresolved": "off",
"import/order": [
"error",
{
"newlines-between": "always",
"alphabetize": {
"order": "asc"
}
}
]
},
"overrides": [
{
"files": [
"**/*.mjs"
],
"parserOptions": {
"ecmaVersion": "latest"
}
},
{
"files": "**/jest.config.js",
"rules": {
"node/no-unpublished-require": "off"
}
},
{
"files": [
"**/*.ts",
"**/*.tsx"
],
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-warning-comments": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/camelcase": "off",
"node/no-missing-import": "off",
"node/no-empty-function": "off",
"node/no-unsupported-features/es-syntax": "off",
"node/no-missing-require": "off",
"node/shebang": "off",
"no-dupe-class-members": "off",
"require-atomic-updates": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"node/no-extraneous-import": "off",
"import/no-extraneous-dependencies": [
"error",
{
"includeTypes": false
}
]
},
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module"
}
}
]
}
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
dist
coverage
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

.npmrc
/.verdaccio/storage
5 changes: 5 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# npx nx affected:lint --base=master
# npx nx affected:test --base=master
1 change: 1 addition & 0 deletions .nxignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tools/generators/**/files
22 changes: 22 additions & 0 deletions .verdaccio/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
storage: ./storage

auth:
htpasswd:
file: ./htpasswd

uplinks:
npmjs:
url: https://registry.npmjs.org
cache: true

packages:
"**/*":
access: $all
publish: $authenticated
unpublish: $authenticated
proxy: npmjs

logs:
type: stdout
format: pretty
level: http
1 change: 1 addition & 0 deletions .verdaccio/htpasswd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test:KaPEXKLb3GKZs:autocreated 2022-10-17T08:25:26.259Z
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"nrwl.angular-console",
"dbaeumer.vscode-eslint",
"streetsidesoftware.code-spell-checker",
"editorconfig.editorconfig",
]
}
26 changes: 26 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"eslint.validate": [
"json"
],
"eslint.enable": true,
"editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnType": true,
"eslint.format.enable": true,
"json.format.enable": false,
"[json]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[css]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
"files.associations": {
"*.css": "tailwindcss"
},
"editor.quickSuggestions": {
"strings": true
},
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
}
}
75 changes: 75 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Contributing

Check out the Noodle [ecosystem](docs/ecosystem.md) for more details on how Noodle works.

## Setup locally

```bash
npm install
```

## Useful commands

### Common

```bash
npx nx lint <project name>
npx nx test <project name>
npx nx build <project name>
```

_Read more about [running tasks with Nx](https://nx.dev/core-features/run-tasks)_

### Generating a new package

```bash
npm run generate:package <project name>
```

## Testing packages locally

### With link

In the package `dist` folder run `npm link`

And then in your consumer run `npm link @noodle-graph@<project>`

Run `npm unlink` in the package `dist` folder to remove the link.

Run `nx build <project>` to take changes you make into the consumer.

### With local registry

We are using [verdaccio](https://verdaccio.org/) for the local registry.

We have some commands to make it even more easy:

```bash
npm run local-registry help
```

See more in [local-registry.mjs](tools/scripts/local-registry.mjs)

#### Publish locally

```bash
npm run local-registry publish <project name>
```

By default, the version is `0.0.0-local.1` with the tag `local` and the registry is `http://localhost:4873`, you can explore more in [publish.mjs](tools/scripts/publish.mjs) and [local-registry.mjs](tools/scripts/local-registry.mjs)

_In local environment, the version is being overwritten if it is already exist._

#### Installing a local package

npm:

```bash
npm install @noodle-graph/<package name>@local --registry=http://localhost:4873
```

yarn:

```bash
yarn add @noodle-graph/<package name>@local --registry=http://localhost:4873
```
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2023 Dor Meiri

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Noodle 🍜 (UNDER CONSTRUCTION 🏗️)

Architecture diagram that maintains itself.

<img src="./docs/img/basicExampleGraph.png" width="400" alt="example"/>

---

- [Quick start](#quick-start)
- [Contributing](#contributing)

## Quick start

### 1. Install

```bash
npm install --location=global @noodle-graph/cli
```

### 2. Add [Noodle comments](./packages/scanner/README.md#noodle-comment)

[Simple example](./examples/basic/someService/index.js)

### 3. Create [config file](./packages/cli/README.md#scan-config-file)

[Simple example](./examples/basic/noodle.json)

### 4. Run `noodle scan`

See more in the [CLI package](https://github.com/noodle-graph/monorepo/tree/master/packages/cli).

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md)
Loading

0 comments on commit 3fe85b5

Please sign in to comment.