-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 832eaa9
Showing
28 changed files
with
5,937 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[{package.json,*.yml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"@dzek69/eslint-config-base", | ||
"@dzek69/eslint-config-typescript", | ||
"@dzek69/eslint-config-import", | ||
"@dzek69/eslint-config-import-typescript" | ||
], | ||
"env": { | ||
"node": true | ||
}, | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"project": "./tsconfig.lint.json" | ||
}, | ||
"ignorePatterns": [], | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"src/*.spec.*", "src/**/*.spec.*" | ||
], | ||
"env": { | ||
"jest": true | ||
}, | ||
"rules": { | ||
"func-names": "off", | ||
"global-require": "off", | ||
"max-lines": "off", | ||
"max-lines-per-function": "off", | ||
"max-statements": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/no-magic-numbers": "off", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"no-unused-labels": "off" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build docs and push to ezez.dev | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
|
||
env: | ||
PROJECT_NAME: temperature-gradient | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Build documentation | ||
run: | | ||
VER=$(cat ./package.json | jq -r .version) | ||
echo Detected version: $VER | ||
if [[ "$VER" == *"+"* ]]; then echo "WIP/+ version detected, skipping"; exit 1; fi | ||
yarn | ||
yarn docs | ||
echo "APP_VERSION=$VER" >> "$GITHUB_ENV" | ||
cat $GITHUB_ENV | ||
- name: Deploy versioned documentation | ||
uses: easingthemes/ssh-deploy@main | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.DOCS_SERVER_PRIVATE_KEY }} | ||
REMOTE_HOST: ${{ secrets.DOCS_SERVER_HOST }} | ||
REMOTE_USER: ${{ secrets.DOCS_SERVER_USER }} | ||
REMOTE_PORT: ${{ secrets.DOCS_SERVER_PORT }} | ||
SOURCE: "docs/" | ||
TARGET: "/docs/${{ env.PROJECT_NAME }}/${{ env.APP_VERSION }}" | ||
|
||
- name: Deploy latest documentation | ||
uses: easingthemes/ssh-deploy@main | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.DOCS_SERVER_PRIVATE_KEY }} | ||
REMOTE_HOST: ${{ secrets.DOCS_SERVER_HOST }} | ||
REMOTE_USER: ${{ secrets.DOCS_SERVER_USER }} | ||
REMOTE_PORT: ${{ secrets.DOCS_SERVER_PORT }} | ||
ARGS: "-rlgoDzvc -i --delete" | ||
SOURCE: "docs/" | ||
TARGET: "/docs/${{ env.PROJECT_NAME }}/latest" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/.idea/ | ||
/docs/ | ||
/dist/ | ||
/esm/ | ||
/node_modules/ | ||
|
||
/*.tgz | ||
*.log | ||
*.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/.idea/ | ||
/build-scripts/ | ||
/test/ | ||
|
||
/babel.config.cjs | ||
/jest.config.cjs | ||
/yarn.lock | ||
/*.tgz | ||
/*.log | ||
/.yarnclean | ||
/nodemon.json | ||
/.editorconfig | ||
/tsconfig.* | ||
/.eslintrc.json | ||
/pagesconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
|
||
## [UNRELEASED] | ||
(nothing yet) | ||
|
||
## [0.0.1] - 2024-04-25 | ||
### Added | ||
- first version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Jacek Nowacki | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
WIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import fs from "fs-extra"; | ||
import { run } from "./utils.mjs"; | ||
|
||
const contents = `{"type": "commonjs"}`; | ||
|
||
(async () => { | ||
console.info("[CJS compile post-processing started]"); | ||
await fs.writeFile("./dist/package.json", contents); | ||
console.info("Written dist/package.json with commonjs type fix"); | ||
await run("resolve-tspaths", ["--project", "tsconfig.cjs.json"]); | ||
console.info("Resolved TypeScript import paths"); | ||
console.info("[CJS compile post-processing ended]"); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {run} from "./utils.mjs"; | ||
|
||
(async () => { | ||
console.info("[ESM compile post-processing started]"); | ||
await run("resolve-tspaths", ["--project", "tsconfig.esm.json"]); | ||
console.info("Resolved TypeScript import paths"); | ||
console.info("[ESM compile post-processing ended]"); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { spawn } from "child_process"; | ||
|
||
const run = (command, args) => { | ||
return new Promise((resolve, reject) => { | ||
const cmd = spawn(command, args, { | ||
stdio: ["ignore", "inherit", "inherit"], | ||
}); | ||
|
||
cmd.on("close", (code) => { | ||
if (!code) { | ||
resolve(); | ||
return; | ||
} | ||
|
||
reject(new Error(`Program exited with code ${code}`)); | ||
}); | ||
|
||
cmd.on("error", () => { | ||
reject(new Error(`Can't start program`)); | ||
}); | ||
}); | ||
}; | ||
|
||
export { | ||
run | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
// testMatch: [], | ||
collectCoverageFrom: [ | ||
'src/**/*.{mjs,js,jsx,ts,tsx}', | ||
'!**/*.d.ts' | ||
], | ||
setupFiles: [ | ||
'<rootDir>/test/bootstrap.cjs' | ||
], | ||
testEnvironmentOptions: { | ||
url: 'http://localhost:8080', | ||
}, | ||
moduleNameMapper: { | ||
'^(.*)\.js$': '$1', | ||
}, | ||
transform: { | ||
'\\.[jt]sx?$': ['babel-jest', { configFile: './test/babel.config.cjs' }] | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"watch": ["src"], | ||
"ext": "ts,json", | ||
"ignore": ["src/**/*.spec.ts"], | ||
"exec": "node --loader ts-node/esm ./src/index.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"name": "@ezez/temperature-gradient", | ||
"version": "0.0.1", | ||
"repository": "git@github.com:dzek69/ezez-temperature-gradient.git", | ||
"author": "Jacek Nowacki", | ||
"license": "MIT", | ||
"scripts": { | ||
"test": "NODE_ENV=test jest", | ||
"docs": "typedoc src/index.ts --skipErrorChecking --out docs --includeVersion", | ||
"compile": "pnpm run compile:esm && pnpm run compile:cjs", | ||
"compile:esm": "rm -rf esm && tsc --project tsconfig.esm.json && node ./build-scripts/compile.esm.after.mjs", | ||
"compile:cjs": "rm -rf dist && tsc --project tsconfig.cjs.json && node ./build-scripts/compile.cjs.after.mjs", | ||
"typecheck": "tsc --noEmit", | ||
"lint": "eslint src --ext .ts,.tsx,.js,.jsx,.mjs", | ||
"lint:fix": "pnpm run lint --fix", | ||
"prepack": "pnpm run compile", | ||
"prepublishOnly": "pnpm audit && pnpm run lint && pnpm run test && pnpm run docs", | ||
"prepare": "husky install", | ||
"start:dev": "nodemon", | ||
"start:dev:compatibility": "TS_NODE_FILES=true pnpm run start:dev", | ||
"updates": "pnpm dlx npm-check-updates --dep prod", | ||
"updates:dev": "pnpm dlx npm-check-updates --dep dev", | ||
"updates:all": "pnpm dlx npm-check-updates" | ||
}, | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.js", | ||
"types": "./esm/index.d.ts", | ||
"default": "./esm/index.js" | ||
} | ||
}, | ||
"main": "./dist/index.js", | ||
"types": "./esm/index.d.ts", | ||
"module": "./esm/index.js", | ||
"type": "module", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@babel/core": "^7.22.20", | ||
"@babel/preset-env": "^7.22.20", | ||
"@babel/preset-typescript": "^7.22.15", | ||
"@dzek69/eslint-config-base": "^2.5.0", | ||
"@dzek69/eslint-config-import": "^1.3.0", | ||
"@dzek69/eslint-config-import-typescript": "^1.0.1", | ||
"@dzek69/eslint-config-typescript": "^1.1.1", | ||
"@knodes/typedoc-plugin-pages": "^0.23.4", | ||
"@types/jest": "^29.5.5", | ||
"@typescript-eslint/eslint-plugin": "^5.61.0", | ||
"@typescript-eslint/parser": "^5.61.0", | ||
"babel-plugin-module-extension": "^0.1.3", | ||
"eslint": "^8.44.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"fs-extra": "^11.1.1", | ||
"husky": "^8.0.3", | ||
"jest": "^29.7.0", | ||
"must": "^0.13.4", | ||
"nodemon": "^3.1.0", | ||
"prettier": "^2.8.8", | ||
"resolve-tspaths": "^0.8.15", | ||
"ts-node": "^10.9.2", | ||
"typedoc": "^0.23.28", | ||
"typescript": "^5.2.2" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-push": "pnpm run prepublishOnly && pnpm run compile" | ||
} | ||
}, | ||
"libraryTemplate": { | ||
"version": "3.11.2", | ||
"language": "typescript", | ||
"fixDefaultForCommonJS": true, | ||
"jsx": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"pages": [ | ||
{ | ||
"title": "Test", | ||
"source": "./tutorials/Test.md" | ||
} | ||
], | ||
"source": "tutorials" | ||
} |
Oops, something went wrong.