Skip to content

Commit

Permalink
chore(npm): improve codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Oct 15, 2023
1 parent 7862e58 commit 4649ff5
Show file tree
Hide file tree
Showing 123 changed files with 6,280 additions and 3,554 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ body:
attributes:
value: |
## Ask for help through appropriate channels
If you feel unsure about the cause of the problem, consider asking for help on for example [StackOverflow](https://stackoverflow.com/questions/ask) or our [Discord](https://discord.gg/mZyBkA936X) before posting a bug report. The issue tracker is not a help forum.
If you feel unsure about the cause of the problem, consider asking for help on for example [StackOverflow](https://stackoverflow.com/questions/ask) or our [Discord](https://discord.gg/JdEbBAKw6X) before posting a bug report. The issue tracker is not a help forum.
- type: markdown
attributes:
value: |
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ body:
For anything else, such as questions or getting help, please see:
- [The Athenna help page](https://athenna.io/help)
- [Our `#help` channel in Discord](https://discord.gg/j6FKKQQrW9)
- [Our `#help` channel in Discord](https://discord.gg/JdEbBAKw6X)
- The [AthennaIO](https://stackoverflow.com/questions/tagged/AthennaIO) tag on [StackOverflow](https://stackoverflow.com/questions/ask)
- type: checkboxes
id: no-post
Expand Down
2 changes: 1 addition & 1 deletion .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/athennaio) or [Discord channel](https://discord.gg/mZyBkA936X) for questions.
Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/athennaio) or [Discord channel](https://discord.gg/JdEbBAKw6X) for questions.

<!-- Love Athenna? Please consider supporting our collective: 👉 https://opencollective.com/athennaio/donate -->
15 changes: 3 additions & 12 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: '18.x'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
Expand All @@ -24,17 +24,8 @@ jobs:
- name: Compile code
run: npm run build

- name: Copy README to build
run: cp README.md build/README.md | true

- name: Copy LICENSE to build
run: cp LICENSE.md build/LICENSE.md | true

- name: Copy templates to build
run: cp -r templates build/templates | true

- name: Copy configurer to build
run: cp -r configurer build/configurer | true
- name: Install production dependencies
run: cd build && npm ci --omit=dev

- name: Automatic GitHub Release
uses: justincy/[email protected]
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:
strategy:
matrix:
node-version:
- 16.13.1
- 18.x
- 20.x
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -39,8 +38,7 @@ jobs:
strategy:
matrix:
node-version:
- 16.13.1
- 18.x
- 20.x
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
74 changes: 0 additions & 74 deletions bin/artisan.ts

This file was deleted.

50 changes: 0 additions & 50 deletions bin/http.ts

This file was deleted.

12 changes: 12 additions & 0 deletions bin/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @athenna/core
*
* (c) João Lenon <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

console.log('Hello from #bin/main!')
console.log(process.env.APP_ENV)
console.log(process.env.NODE_ENV)
44 changes: 3 additions & 41 deletions bin/repl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,6 @@
* file that was distributed with this source code.
*/

import { Ignite } from '#src'

/*
|--------------------------------------------------------------------------
| Core testing
|--------------------------------------------------------------------------
|
| This property helps the @athenna/core package to test the implementation
| of the Ignite class. With this env as "true", Athenna will not resolve
| the application root path because the package is not inside a node_modu
| les folder when running locally and in pipelines.
|
*/

process.env.CORE_TESTING = 'false'

/*
|--------------------------------------------------------------------------
| Ignite
|--------------------------------------------------------------------------
|
| Here is where your application will bootstrap. Ignite class will be res
| ponsible to bootstrap your application partial or complete. Is not reco
| mmended to bootstrap the Athenna application completelly by calling the
| "fire" method, you should always let the type of application determine if
| the application should be fully bootstrapped or not.
|
*/

const ignite = await new Ignite().load(import.meta.url, { bootLogs: false })

/*
|--------------------------------------------------------------------------
| REPL Session
|--------------------------------------------------------------------------
|
| Bootstrap the repl application.
|
*/

await ignite.repl()
console.log('Hello from #bin/repl!')
console.log(process.env.APP_ENV)
console.log(process.env.NODE_ENV)
8 changes: 7 additions & 1 deletion bin/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ import { request } from '@athenna/http/testing/plugins'
import { command } from '@athenna/artisan/testing/plugins'
import { Runner, assert, specReporter } from '@athenna/test'

process.env.CORE_TESTING = 'true'
if (process.argv.includes('--cmd')) {
console.log(process.argv)
console.log('Hello from #bin/test!')
console.log(process.env.APP_ENV)
console.log(process.env.NODE_ENV)
process.exit(0)
}

await Runner.setTsEnv()
.addPlugin(assert())
Expand Down
5 changes: 0 additions & 5 deletions bin/tsconfig.build.json

This file was deleted.

22 changes: 0 additions & 22 deletions node

This file was deleted.

Loading

0 comments on commit 4649ff5

Please sign in to comment.