Skip to content

Commit

Permalink
Move to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
bguerout committed Nov 25, 2023
1 parent 59fd2ed commit efe8d34
Show file tree
Hide file tree
Showing 38 changed files with 1,009 additions and 600 deletions.
37 changes: 0 additions & 37 deletions .eslintrc

This file was deleted.

55 changes: 55 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:node/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["tsconfig.test.json"],
"sourceType": "module"
},
"settings": {
"import/resolver": {
"typescript": true,
"node": true
}
},
"plugins": [
"@typescript-eslint",
"mocha"
],
"env": {
"node": true,
"es6": true,
"mocha": true
},
"rules": {
"quote-props": ["error", "consistent"],
"mocha/no-skipped-tests": "error",
"mocha/no-exclusive-tests": "error",
"node/no-unpublished-import": [
"error", {
"allowModules": ["slow-stream"]
}
],
"node/no-unsupported-features/es-syntax": [
"error",
{
"version": ">=13.0.0",
"ignores": ["modules"]
}
],
"node/no-missing-import": [
"error", {
"allowModules": [],
"resolvePaths": ["/path/to/a/modules/directory"],
"tryExtensions": [".js", ".ts"]
}
]
}
}
27 changes: 27 additions & 0 deletions .tools/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail

readonly PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."

rm -rf "${PROJECT_DIR}/dist"

cd "${PROJECT_DIR}"

echo "Building oleoduc (esm version)..."
tsc -p tsconfig.json
cat >"./dist/mjs/package.json" <<!EOF
{
"type": "module"
}
!EOF

echo "Building oleoduc (cjs version)..."
tsc -p tsconfig.cjs.json
cat >"./dist/cjs/package.json" <<!EOF
{
"type": "commonjs"
}
!EOF

cd -

17 changes: 0 additions & 17 deletions .tools/create-per-distribution-package-json.sh

This file was deleted.

Loading

0 comments on commit efe8d34

Please sign in to comment.