Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lancejpollard committed Sep 17, 2024
1 parent 39814b6 commit 624459c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 17 deletions.
29 changes: 20 additions & 9 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@
"project": ["./tsconfig.json"]
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "import", "simple-import-sort", "sort-exports", "typescript-sort-keys", "sort-keys", "prettier"],
"plugins": [
"@typescript-eslint",
"import",
"simple-import-sort",
"sort-exports",
"typescript-sort-keys",
"sort-keys",
"prettier"
],
"extends": ["prettier"],
"rules": {
"curly": 2,
Expand Down Expand Up @@ -64,18 +72,21 @@
],
"space-before-blocks": "off",
"@typescript-eslint/space-before-blocks": ["error", "always"],
"@typescript-eslint/type-annotation-spacing": ["error", { "after": true }],
"@typescript-eslint/type-annotation-spacing": [
"error",
{ "after": true }
],
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"sort-exports/sort-exports": ["error", { "sortDir": "asc" }],
"typescript-sort-keys/interface": "error",
"typescript-sort-keys/string-enum": "error",
"sort-keys": 0,
"sort-keys/sort-keys-fix": 2,
"sort-exports/sort-exports": ["off", { "sortDir": "asc" }],
"typescript-sort-keys/interface": "off",
"typescript-sort-keys/string-enum": "off",
"sort-keys": "off",
"sort-keys/sort-keys-fix": "off",
"prettier/prettier": 2,
"@typescript-eslint/no-unused-vars": "off",
"default-case": "error",
"default-case-last": "error"
"default-case": "off",
"default-case-last": "off"
}
}
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import st from '@lancejpollard/script-tree'

const D: Record<string, string> = {
Expand Down Expand Up @@ -403,7 +405,7 @@ export const numerals = [

export const symbols = [...vowels, ...consonants, ...numerals]

const tree = st.fork(symbols) as any
const tree = st.fork(symbols)
const make = (text: string) => st.form(text, tree) as string

export default make
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@termsurf/tone",
"version": "3.2.0",
"version": "3.3.0",
"main": "./host/index.js",
"license": "MIT",
"dependencies": {
Expand Down Expand Up @@ -45,14 +45,14 @@
"webpack-cli": "^5.1.4"
},
"scripts": {
"make": "tsc && tsc-alias",
"toss": "rm -rf host",
"make": "pnpm toss && tsc && tsc-alias",
"make:1": "webpack",
"make:keyboard:code": "tsx text/keyboard",
"make:keyboard:kmn": "cd text/keyboard && kmc build --color --debug tone.kmn",
"make:keyboard:kps": "cd text/keyboard && kmc build --color --debug tone.kps -o tone.kmp",
"make:keyboard": "pnpm make:keyboard:code && pnpm make:keyboard:kmn && pnpm make:keyboard:kps",
"make:keyboard:windows": "pnpm make:keyboard:code && cd text/keyboard && kmc build --color windows-package-installer",
"move": "pnpm make && git add . && git commit -am 'save' && npm version patch && pnpm host && git push",
"scan": "concurrently --kill-others \"tsc -w\" \"tsc-alias -w\"",
"lint": "eslint --ext .ts ./make",
"lint:tool": "npm run lint -- --fix",
Expand Down
6 changes: 3 additions & 3 deletions test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import tone, { SYMBOLS } from './index.js'
import tone, { symbols } from './index.js'

make('byu^dy')
make('diU--U-m')
Expand Down Expand Up @@ -28,9 +28,9 @@ make('ky~O!n')
// make('suprkAlUfrAdjUlIstIkEkspiAlOdoxOs')
// make('spri^qkl')

console.log(SYMBOLS)
console.log(symbols)

function make(a: string) {
console.log('text => ' + a)
console.log(' font => ' + tone.make(a))
console.log(' font => ' + tone(a))
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"typeRoots": ["node_modules/@types"],
"noImplicitAny": true
},
"include": [".", "package.d.ts"],
"include": ["*.ts", "package.d.ts"],
"exclude": ["node_modules", "host"]
}

0 comments on commit 624459c

Please sign in to comment.