generated from AthennaIO/Template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ts): move project to TS and add configurer
- Loading branch information
Showing
41 changed files
with
5,448 additions
and
3,534 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
@@ -20,9 +20,20 @@ jobs: | |
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Transpile code | ||
run: npm run build | ||
|
||
- name: Install jq | ||
run: sudo apt-get -y install jq | ||
|
||
- name: Change import aliases to build | ||
run: jq '.imports."#src"="./build/index.js" | .imports."#src/*"="./build/*.js"' package.json > tmp.json && mv tmp.json package.json | ||
|
||
- 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' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/** | ||
* @athenna/mail | ||
* | ||
* (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. | ||
*/ | ||
|
||
import { Path, File, Exec } from '@athenna/common' | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| TypeScript build file path | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Where the TypeScript build file will be saved. | ||
*/ | ||
|
||
const path = Path.nodeModules('@athenna/tsconfig.build.json') | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| TypeScript Config | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Create the tsconfig file for building the project. | ||
*/ | ||
|
||
const tsconfig = await new File('../tsconfig.json').getContentAsJson() | ||
|
||
delete tsconfig['ts-node'] | ||
|
||
tsconfig.compilerOptions.rootDir = '../../src' | ||
tsconfig.compilerOptions.outDir = '../../build' | ||
|
||
tsconfig.include = ['../../src'] | ||
tsconfig.exclude = ['../../bin', '../../node_modules', '../../tests'] | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Compilation | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Saving the file in some path, deleting old "build" folder, executing | ||
| compilation and deleting the tsconfig file generated. | ||
*/ | ||
|
||
const file = new File(path, '') | ||
await file.setContent(JSON.stringify(tsconfig)) | ||
await Exec.command(`rimraf ../build && tsc --project ${path}`) | ||
await file.remove() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
version: '2.1' | ||
|
||
version: '3.1' | ||
services: | ||
smtp: | ||
container_name: athenna_smtp | ||
image: kurzdigital/fake-smtp | ||
ports: | ||
- "5025:5025" | ||
- "5080:5080" | ||
- '5025:5025' | ||
- '5080:5080' | ||
|
Oops, something went wrong.