Skip to content

Commit

Permalink
Merge pull request #152 from AthennaIO/develop
Browse files Browse the repository at this point in the history
refactor(scripts): use scripts to build code
  • Loading branch information
jlenon7 authored Mar 22, 2023
2 parents e5b71f9 + cb17775 commit e507ae7
Show file tree
Hide file tree
Showing 10 changed files with 132 additions and 185 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
- name: Run tests
run: npm run test:coverage

- name: Test code transpilation
run: npm run build
- name: Test code compilation
run: sh scripts/build

windows:
runs-on: windows-latest
Expand All @@ -65,5 +65,5 @@ jobs:
- name: Run tests
run: npm run test:coverage

- name: Test code transpilation
run: npm run build
- name: Test code compilation
run: sh scripts/build
13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,15 @@ out
.yarn/install-state.gz
.pnp.*

# Transpiled code path
dist
build
# Compiled code
./dist
./build
*.js
*.d.ts
*.js.map
!tests/Stubs/**/*.js
!tests/Stubs/**/*.d.ts
!tests/Stubs/**/*.js.map

# IDE
.idea
Expand All @@ -127,7 +133,6 @@ build
.env
.env.testing
.env.production
!tests/Stubs/.env

# MacOS folder mapper file
.DS_Store
80 changes: 0 additions & 80 deletions bin/build.ts

This file was deleted.

16 changes: 16 additions & 0 deletions node
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/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"

Expand Down
116 changes: 58 additions & 58 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e507ae7

Please sign in to comment.