Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: publish

on:
push:
tags: [ "v[0-9]+.[0-9]+.[0-9]+" ]

jobs:

publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: "20"
cache: npm
registry-url: "https://registry.npmjs.org"

- name: Configure git user
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"

- run: npm ci
- run: npm run build
- run: npm run docs
- run: npm test

- name: Publish package
working-directory: ./lib
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish docs
run: |
set -x

mv ./docs /tmp/docs

git reset HEAD --hard
git fetch origin ghpages:ghpages
git checkout ghpages
git rm -rf --ignore-unmatch .
git clean -fxd

cp -R /tmp/docs/. .

git add .

! git diff --staged --quiet --exit-code || exit 0

git commit -m "Updated docs (${GITHUB_SHA::7})"
git push origin ghpages

- name: Create release draft
run: gh release create ${{ github.ref_name }} --generate-notes --draft
env:
GH_TOKEN: ${{ github.token }}
11 changes: 6 additions & 5 deletions .github/workflows/master.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: test

on:
push:
Expand All @@ -7,13 +7,14 @@ on:
branches: [ master ]

jobs:
build:

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: "20"
cache: npm
- run: npm ci
- run: npm run build
Expand Down
145 changes: 4 additions & 141 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,141 +1,4 @@
/lib/
/docs/
*.tgz

# IntelliJ Idea file-based project settings
*.iws
/out/
.idea

# VSCode
*.tsbuildinfo

# Android studio
.gradle/
local.properties
.DS_Store
build/
captures/
.externalNativeBuild
local.properties

# Cache files for SublimeText
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache

# Workspace files are user-specific
*.sublime-workspace

# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
*.sublime-project

# sFTP configuration file
sftp-config.json

# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
bh_unicode_properties.cache

# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings

# Node
*.moved-aside
*.xccheckout
*.xcscmblueprint
# Out of memory reports
report.*.json

# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Dependency directories
node_modules
flow-typed
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# Build generated
build/
DerivedData/

# OSX
*.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Linux
*~

# Temporary files which can be created if a process still has a handle
# open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# Windows
*.bak
*.tmp
*.swp

# Image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle bin used on file shares
$RECYCLE.BIN/

# Installer files
*.cab
*.msi
*.msm
*.msp

# Shortcuts
*.lnk
node_modules/
lib/
docs/
coverage/
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "avoid",
"endOfLine": "auto",
"singleAttributePerLine": true
}
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Savva Mikhalevski
Copyright (c) 2025 Savva Mikhalevski

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading