Skip to content

Commit

Permalink
Switch to putting compiled typescript in a build directory to clarify…
Browse files Browse the repository at this point in the history
… what is going in there

This project builds both the src and the tests when building so that building fails if the tests don't compile too. That way, it's safe to run the tests with transpile-only, which is fast, but we still check the typecheck the tests at some point.
  • Loading branch information
airhorns committed Sep 10, 2020
1 parent c6b0215 commit 1e1649a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dist
build
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
testPathIgnorePatterns: ["/dist/", "/node_modules/"],
testPathIgnorePatterns: ["/build/", "/node_modules/"],
};
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "fastify-passport",
"version": "0.0.1",
"description": "Simple, unobtrusive authentication for Fastify.",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"scripts": {
"build": "rm -rf ./dist && mkdir dist && tsc && git rev-parse HEAD > BUILD_SHA",
"build": "rm -rf ./build && mkdir build && tsc && git rev-parse HEAD > BUILD_SHA",
"lint": "eslint '*/**/*.{js,ts,tsx}'",
"lintfix": "prettier --loglevel warn --write \"src/**/*.{ts,tsx}\" && eslint '*/**/*.{js,ts,tsx}' --quiet --fix",
"prepublishOnly": "yarn run build",
Expand Down

0 comments on commit 1e1649a

Please sign in to comment.