Skip to content

Commit

Permalink
Reorganise ./dist directory and move ./mockserver (#5)
Browse files Browse the repository at this point in the history
* Reorganise ./dist directory and move ./mockserver

* fix(pre-commit): remove exclusions for non-existent directories
  • Loading branch information
iainsproat authored Mar 21, 2023
1 parent 34c5bba commit 1f8e68e
Show file tree
Hide file tree
Showing 25 changed files with 11 additions and 19 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
dist/
mockserver/
lib/
node_modules/
vitest.config.ts
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ repos:
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-vcs-permalinks
exclude: ^dist/|^mockserver/
exclude: ^dist/
- id: trailing-whitespace
exclude: ^schemas/spec|^dist/|^mockserver/
exclude: ^dist/
- id: end-of-file-fixer
exclude: ^schemas/spec|^dist/|^mockserver/
exclude: ^dist/

- repo: https://github.com/Jarmos-san/shellcheck-precommit
rev: 'v0.2.0'
Expand All @@ -33,15 +33,15 @@ repos:
types:
- ts
language: system
exclude: ^dist/|^mockserver/
exclude: ^dist/
- id: eslint
name: eslint
entry: yarn run lint
pass_filenames: false
language: system
types:
- ts
exclude: ^dist/|^mockserver/
exclude: ^dist/
- id: build-dist
name: build dist package
entry: yarn run package
Expand All @@ -63,7 +63,7 @@ repos:
language: system
types:
- ts
exclude: ^dist/|^mockserver/
exclude: ^dist/

- repo: https://github.com/specklesystems/pre-commit
rev: '0.2.0'
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
dist/
mockserver/
lib/
node_modules/
*.cjs
Expand Down
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ outputs:
description: 'The required name of the image of the built function.'
runs:
using: 'node16' #FIXME bump to node18 when available
main: 'dist/index.js'
main: 'dist/action/index.js'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"build:image": "docker build -t speckle/speckle-automate-github-action:local .",
"coverage": "vitest run --coverage --run",
"lint": "eslint **/*.ts",
"package": "ncc build --target es2020 --source-map --license licenses.txt -o dist src/main.ts",
"package:mockserver": "ncc build --target es2020 --source-map --license licenses.txt -o mockserver src/tests/mock-server.ts",
"package": "ncc build --target es2020 --source-map --license licenses.txt -o dist/action src/main.ts",
"package:mockserver": "ncc build --target es2020 --source-map --license licenses.txt -o dist/testing/mockserver src/tests/mock-server.ts",
"precommit": "pre-commit run --all-files",
"prettier:check": "prettier --check '**/*.ts'",
"prettier:fix": "prettier --write '**/*.ts'",
"run:mockserver": "node mockserver/index.js",
"run:mockserver": "node dist/testing/mockserver/index.js",
"test": "vitest --run"
},
"dependencies": {
Expand Down
8 changes: 1 addition & 7 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
export default {
exclude: [
'node_modules/**/*',
'lib/**/*',
'dist/**/*',
'.yarn/**/*',
'mockserver/**/*'
]
exclude: ['node_modules/**/*', 'lib/**/*', 'dist/**/*', '.yarn/**/*']
}

0 comments on commit 1f8e68e

Please sign in to comment.