Skip to content
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.

Commit

Permalink
Use tsc for compilation (#27)
Browse files Browse the repository at this point in the history
* Compile using tsc

* Use typescript parser for linting and remove babel

* Remove babel config
  • Loading branch information
dmaretskyi committed Aug 5, 2020
1 parent 9ddb5e3 commit 6ec9158
Show file tree
Hide file tree
Showing 5 changed files with 178 additions and 72 deletions.
25 changes: 0 additions & 25 deletions babel.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

require('source-map-support').install();

module.exports = require('./dist/index');
module.exports = require('./dist/src/index');
23 changes: 10 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
"license": "GPL-3.0",
"files": [
"dist",
"src",
"index.js"
],
"main": "index.js",
"browser": "dist/index.js",
"browser": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"scripts": {
"build": "npm run clean && npm run build:babel",
"build:babel": "babel ./src --out-dir ./dist --ignore \"**/*.test.js\" --source-maps",
"build": "npm run clean && npm run build:tsc",
"build:tsc": "tsc",
"benchmark": "npm run build && npm run benchmark:node && npm run benchmark:browser",
"benchmark:node": "del-cli .benchmark && node benchmark.js",
"benchmark:browser": "browser-runner benchmark.js --timeout 0",
Expand All @@ -35,6 +37,7 @@
"> 5%"
],
"jest": {
"preset": "ts-jest/presets/js-with-ts",
"testEnvironment": "node"
},
"dependencies": {
Expand All @@ -57,32 +60,26 @@
"through2": "^3.0.1"
},
"devDependencies": {
"@babel/cli": "^7.7.0",
"@babel/core": "^7.4.5",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-proposal-export-default-from": "^7.5.2",
"@babel/preset-env": "^7.4.5",
"@dxos/benchmark-suite": "^1.0.0-beta.1",
"@dxos/browser-runner": "^1.0.0-beta.8",
"@dxos/random-access-multi-storage": "^1.1.0-beta.3",
"babel-eslint": "^10.0.2",
"babel-jest": "^24.8.0",
"babel-plugin-add-module-exports": "^1.0.2",
"babel-plugin-inline-import": "^3.0.0",
"@typescript-eslint/parser": "^3.8.0",
"coveralls": "^3.0.7",
"del-cli": "^3.0.0",
"end-of-stream-promise": "^1.0.0",
"jest": "^26.2.2",
"random-access-memory": "^3.1.1",
"semistandard": "^14.2.0",
"tempy": "^0.5.0",
"ts-jest": "^26.1.4",
"typescript": "^3.9.7",
"wait-for-expect": "^3.0.2"
},
"publishConfig": {
"access": "public"
},
"semistandard": {
"parser": "babel-eslint",
"parser": "@typescript-eslint/parser",
"env": [
"jest",
"node",
Expand Down
19 changes: 19 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"allowJs": true,
"composite": true,
"sourceMap": true,
"declarationMap": true,
"skipLibCheck": true,
"esModuleInterop": true,
"target": "ES2018",
"module": "commonjs",
"outDir": "dist"
},
"include": [
"src"
],
"exclude": [
"src/**/*.test.js"
]
}

0 comments on commit 6ec9158

Please sign in to comment.