Skip to content

Commit

Permalink
build: configure typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwremmel committed Aug 16, 2020
1 parent ca4e74b commit 287cc78
Show file tree
Hide file tree
Showing 8 changed files with 1,487 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
5 changes: 5 additions & 0 deletions babel-register.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

require('@babel/register')({
extensions: ['.js', '.ts', '.tsx'],
});
21 changes: 21 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict';

module.exports = function (api) {
api.cache(true);

const config = {
comments: true,
presets: [
'@babel/preset-typescript',
[
'@babel/preset-env',
{
targets: {node: true},
},
],
],
sourceMaps: true,
};

return config;
};
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
console.log('It works!');
'use strict';

require('./babel-register')
require('./src/index');
1,432 changes: 1,432 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,14 @@
"bugs": {
"url": "https://github.com/check-run-reporter/action/issues"
},
"homepage": "https://www.check-run-reporter.com"
"homepage": "https://www.check-run-reporter.com",
"devDependencies": {
"typescript": "^3.9.7"
},
"dependencies": {
"@babel/core": "^7.11.1",
"@babel/preset-env": "^7.11.0",
"@babel/preset-typescript": "^7.10.4",
"@babel/register": "^7.10.5"
}
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('It works!');
13 changes: 13 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"esModuleInterop": true,
"module": "commonjs",
"moduleResolution": "node",
"noEmit": true,
"strict": true,
"target": "es2019"
},
"include": [
"src/**/*.ts"
]
}

0 comments on commit 287cc78

Please sign in to comment.