generated from AthennaIO/Template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from AthennaIO/develop
refactor(scripts): use scripts to build code
- Loading branch information
Showing
11 changed files
with
85 additions
and
92 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 |
---|---|---|
|
@@ -21,14 +21,8 @@ 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: Compile code | ||
run: sh scripts/build | ||
|
||
- name: Automatic GitHub Release | ||
uses: justincy/[email protected] | ||
|
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 was deleted.
Oops, something went wrong.
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,22 @@ | ||
#!/bin/bash | ||
|
||
# This file is useful for development purposes because | ||
# it allows you to run TypeScript files without having | ||
# to add the --loader option every time. | ||
|
||
# Usage: | ||
|
||
# ./node --version | ||
# ./node bin/test.ts | ||
# ./node --inspect bin/test.ts | ||
|
||
# Usage with "sh" or "bash": | ||
|
||
# sh node --version | ||
# sh node bin/test.ts | ||
# sh node --inspect bin/test.ts | ||
|
||
# Node.js executable with all arguments required to run the application. | ||
node="node --loader ts-node/esm --experimental-import-meta-resolve --no-warnings" | ||
|
||
$node $@ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,6 +1,6 @@ | ||
{ | ||
"name": "@athenna/test", | ||
"version": "3.2.2", | ||
"version": "3.2.3", | ||
"description": "The Athenna test runner. Built on top of Japa.", | ||
"license": "MIT", | ||
"author": "João Lenon <[email protected]>", | ||
|
@@ -10,39 +10,41 @@ | |
"keywords": [ | ||
"esm", | ||
"japa", | ||
"testing", | ||
"test-runner", | ||
"classes", | ||
"decorators", | ||
"athenna" | ||
], | ||
"scripts": { | ||
"node": "cross-env NODE_OPTIONS=\"--experimental-import-meta-resolve\" ts-node", | ||
"build": "npm run node --silent -- bin/build.ts", | ||
"lint:fix": "eslint \"{src,tests}/**/*.ts\" --fix", | ||
"test": "npm run --silent lint:fix && npm run node --silent -- bin/test.ts", | ||
"test:debug": "cross-env DEBUG=api:* npm run node --silent -- bin/test.ts --inspect", | ||
"lint:fix": "eslint \"{bin,src,tests}/**/*.ts\" --fix", | ||
"test": "npm run --silent lint:fix && sh node bin/test.ts", | ||
"test:debug": "cross-env DEBUG=api:* sh node --inspect bin/test.ts", | ||
"test:coverage": "c8 npm run --silent test" | ||
}, | ||
"files": [ | ||
"build/*.js", | ||
"build/*.d.ts", | ||
"build/**/*.js", | ||
"build/**/*.d.ts", | ||
"templates/**" | ||
"src/*.js", | ||
"src/*.d.ts", | ||
"src/**/*.js", | ||
"src/**/*.d.ts", | ||
"templates" | ||
], | ||
"type": "module", | ||
"main": "./build/index.js", | ||
"types": "./build/index.d.ts", | ||
"main": "./src/index.js", | ||
"types": "./src/index.d.ts", | ||
"exports": { | ||
".": "./build/index.js" | ||
".": "./src/index.js" | ||
}, | ||
"imports": { | ||
"#bin/*": "./bin/*.js", | ||
"#bin": "./bin/index.js", | ||
"#src/*": "./src/*.js", | ||
"#src": "./src/index.js", | ||
"#tests/*": "./tests/*.js", | ||
"#tests": "./tests/index.js" | ||
}, | ||
"devDependencies": { | ||
"@athenna/common": "^3.3.1", | ||
"@athenna/common": "^3.4.4", | ||
"@japa/assert": "^1.3.6", | ||
"@japa/run-failed-tests": "^1.1.0", | ||
"@japa/runner": "^2.2.2", | ||
|
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,5 @@ | ||
#!/bin/bash | ||
|
||
sh scripts/clean | ||
|
||
./node_modules/.bin/tsc --project scripts/tsconfig.build.json |
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,4 @@ | ||
#!/bin/bash | ||
|
||
find src -name "*.js" -type f -delete | ||
find src -name "*.d.ts" -type f -delete |
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,5 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"include": ["../**/*"], | ||
"exclude": ["../bin", "../build", "../tests", "../scripts", "../node_modules"] | ||
} |
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