Skip to content

Commit

Permalink
fix: add file to help transpile with tsc and add config on jest for t…
Browse files Browse the repository at this point in the history
…hat transpile
  • Loading branch information
Murzbul committed Feb 12, 2023
1 parent 0eb66a5 commit cd6b661
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ module.exports = {
"dist/src/**/*.{js,jsx,ts,tsx}",
"!<rootDir>/node_modules/",
"!dist/src/initTestServer.{js,ts}",
"!dist/src/**/*.d.ts",
"!dist/src/**/*.d.ts.map",
"!dist/src/register.{js,ts}",
"!dist/src/seed.{js,ts}",
"!dist/src/exceptions.{js,ts}",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"scripts": {
"build": "etsc",
"build-tsc": "tsc -p tsconfig.json --incremental",
"build-tsc": "node rimraf_cpy.mjs && tsc -p tsconfig.json --incremental",
"ci": "npm run cpy-ci && npm run ts-check && npm run lint",
"circular": "madge --circular dist/src/index.js",
"circular-graph": "madge --circular --image graph.svg dist/src/index.js",
Expand Down
13 changes: 13 additions & 0 deletions rimraf_cpy.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import rimraf from "rimraf";
console.log("prebuild");
rimraf.sync("./dist");

console.log("postbuild");
import cpy from "cpy";
cpy([
"src/**/*.graphql", // Copy all .graphql files
"!src/**/*.{ts,js}", // Ignore already built files
"src/**/*.json",
"src/**/*.hbs"],
"dist/src"
);

0 comments on commit cd6b661

Please sign in to comment.