Skip to content

Commit

Permalink
Merge pull request #64 from AthennaIO/develop
Browse files Browse the repository at this point in the history
Move project to TS
  • Loading branch information
jlenon7 authored Mar 29, 2023
2 parents 7f9b7d1 + 80121b1 commit 15bed3a
Show file tree
Hide file tree
Showing 58 changed files with 4,020 additions and 13,183 deletions.
62 changes: 62 additions & 0 deletions .athennarc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"services": [],
"preloads": [],
"providers": [
"@athenna/core/providers/CoreProvider"
],
"commands": {
"make:exception": {
"path": "@athenna/core/commands/MakeExceptionCommand",
"destination": "./src/exceptions"
},
"make:facade": {
"path": "@athenna/core/commands/MakeFacadeCommand",
"destination": "./src/providers/facades"
},
"make:provider": {
"path": "@athenna/core/commands/MakeProviderCommand",
"destination": "./src/providers"
},
"make:service": {
"path": "@athenna/core/commands/MakeServiceCommand",
"destination": "./src/services"
},
"make:test": {
"path": "@athenna/core/commands/MakeTestCommand",
"destination": "./tests"
},
"make:command": {
"path": "@athenna/artisan/commands/MakeCommandCommand",
"destination": "./src/commands"
},
"configure": "@athenna/artisan/commands/ConfigureCommand",
"template:customize": "@athenna/artisan/commands/TemplateCustomizeCommand",
"serve": {
"path": "@athenna/core/commands/ServeCommand",
"entrypoint": "#bin/main",
"stayAlive": true
},
"test": {
"path": "@athenna/core/commands/TestCommand",
"entrypoint": "#bin/test",
"loadAllCommands": true,
"stayAlive": true
},
"repl": {
"path": "@athenna/core/commands/ReplCommand",
"entrypoint": "#bin/repl",
"stayAlive": true
},
"build": "@athenna/core/commands/BuildCommand",
"new": "#src/commands/new.command"
},
"templates": {
"exception": "node_modules/@athenna/core/templates/exception.edge",
"facade": "node_modules/@athenna/core/templates/facade.edge",
"provider": "node_modules/@athenna/core/templates/provider.edge",
"service": "node_modules/@athenna/core/templates/service.edge",
"test": "node_modules/@athenna/core/templates/test.edge",
"testFn": "node_modules/@athenna/core/templates/testFn.edge",
"command": "node_modules/@athenna/artisan/templates/command.edge"
}
}
10 changes: 10 additions & 0 deletions .athennarc.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"services": [],
"preloads": [],
"providers": [
"@athenna/core/providers/CoreProvider"
],
"commands": {
"new": "#src/commands/new.command"
}
}
11 changes: 0 additions & 11 deletions .env.example

This file was deleted.

7 changes: 6 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -20,9 +20,14 @@ jobs:

- name: Install dependencies
run: npm install

- name: Compile code
run: sh node artisan build

- name: Automatic GitHub Release
uses: justincy/[email protected]
id: release

- name: Publish to NPM Registry
run: npm publish --access public
if: steps.release.outputs.released == 'true'
Expand Down
47 changes: 44 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,23 @@ on:
- develop

jobs:
qodana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@main
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

linux:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 14.15.4
- 16.13.1
- 18.x
steps:
- uses: actions/checkout@v2
Expand All @@ -25,9 +36,39 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Create .env.test file
run: cp .env.example .env.test
- name: Install dependencies
run: npm install

- name: Run tests
run: npm run test:coverage

- name: Test code compilation
run: sh node artisan build

- name: Link the package and run the CLI
run: npm link . && athenna --version

windows:
runs-on: windows-latest
strategy:
matrix:
node-version:
- 18.x
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

- name: Run tests
run: npm run test:coverage

- name: Test code compilation
run: sh node artisan build

- name: Link the package and run the CLI
run: npm link . && athenna --version
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,24 @@ out
.yarn/install-state.gz
.pnp.*

# Compiled code
./dist
./build
*.js
*.d.ts
*.js.map
!.github/ci.js
!tests/Stubs/**/*.js
!tests/Stubs/**/*.d.ts
!tests/Stubs/**/*.js.map

# IDE
.idea
.fleet
.vscode

# Environment variables file
.env
.env.test
.env.production

# MacOS folder mapper file
Expand Down
9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

Athenna is a community driven project. You are free to contribute in any of the following ways.

- [Coding style](#coding-style)
- [Fix bugs by creating PR's](#fix-bugs-by-creating-prs)
- [Report security issues](#report-security-issues)
- [Contributing](#contributing)
- [Coding style](#coding-style)
- [Fix bugs by creating PR's](#fix-bugs-by-creating-prs)
- [Report security issues](#report-security-issues)

## Coding style

Expand All @@ -30,4 +31,4 @@ Go through the following points, before creating a new PR.
## Report security issues

All the security issues, must be reported via [email](mailto:[email protected]) and not using any of the public
channels.
channels.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Cli ⌨️

> Athenna CLI to create new projects and install components.
> Athenna CLI to create new projects and install components. Built with Athenna.
[![GitHub followers](https://img.shields.io/github/followers/athennaio.svg?style=social&label=Follow&maxAge=2592000)](https://github.com/athennaio?tab=followers)
[![GitHub stars](https://img.shields.io/github/stars/AthennaIO/Cli.svg?style=social&label=Star&maxAge=2592000)](https://github.com/AthennaIO/Cli/stargazers/)
[![GitHub stars](https://img.shields.io/github/stars/athennaio/cli.svg?style=social&label=Star&maxAge=2592000)](https://github.com/athennaio/cli/stargazers/)

<p>
<a href="https://www.buymeacoffee.com/athenna" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
</p>

<p>
<img alt="GitHub language count" src="https://img.shields.io/github/languages/count/AthennaIO/Cli?style=for-the-badge&logo=appveyor">
<img alt="GitHub language count" src="https://img.shields.io/github/languages/count/athennaio/cli?style=for-the-badge&logo=appveyor">

<img alt="Repository size" src="https://img.shields.io/github/repo-size/AthennaIO/Cli?style=for-the-badge&logo=appveyor">
<img alt="Repository size" src="https://img.shields.io/github/repo-size/athennaio/cli?style=for-the-badge&logo=appveyor">

<img alt="License" src="https://img.shields.io/badge/license-MIT-brightgreen?style=for-the-badge&logo=appveyor">

<img alt="Commitizen" src="https://img.shields.io/badge/commitizen-friendly-brightgreen?style=for-the-badge&logo=appveyor">
</p>

<img src=".github/logo.svg" width="200px" align="right" hspace="30px" vspace="100px">
<img src="https://raw.githubusercontent.com/AthennaIO/Cli/9d2247f0afce10b754e171b0ac23062eeb2f5024/.github/logo.svg" width="200px" align="right" hspace="30px" vspace="100px">

## Links

Expand All @@ -31,4 +31,12 @@
---

Made with 🖤 by [Athenna Team](https://github.com/AthennaIO) :wave:
<p align='center'>
With 💜 by <a href='https://github.com/AthennaIO'>Athenna community</a>
</p>

<p align='center'>
<a href='https://github.com/AthennaIO/Cli/graphs/contributors'>
<img src='https://contrib.rocks/image?repo=AthennaIO/Cli'/>
</a>
</p>
Loading

0 comments on commit 15bed3a

Please sign in to comment.