Skip to content

Commit

Permalink
Work
Browse files Browse the repository at this point in the history
  • Loading branch information
cb1kenobi committed Jun 1, 2024
1 parent d4c6885 commit 26d63b3
Show file tree
Hide file tree
Showing 22 changed files with 128 additions and 79 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

A library of Titanium SDK platform APIs.

## Roadmap

- [ ] Build SDK (e.g. scons)
- [ ] Build API docs
- [ ] SDK management
- [ ] Get releases
- [ ] Get branches
- [ ] Get builds
- [ ] Get installed SDKs
- [ ] Apps
- [ ] Create new app
- [ ] Modules
- [ ] Create new module

## Old Readme

### Features

* Detects installed Titanium SDKs and modules
Expand Down
3 changes: 3 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"organizeImports": {
"enabled": true
},
"files": {
"ignore": ["dist/**"]
},
"linter": {
"enabled": true,
"rules": {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"check": "biome check --apply .",
"coverage": "vitest run --coverage",
"lint": "biome lint --apply .",
"test": "vitest"
"test": "vitest",
"typecheck": "turbo run typecheck"
},
"devDependencies": {
"@biomejs/biome": "1.7.3",
Expand Down
10 changes: 8 additions & 2 deletions packages/android/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@
"./types": "./dist/types/index.d.ts"
},
"scripts": {
"build": "tsc"
"build": "rimraf dist && tsc",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@titaniumlib/util": "workspace:*"
},
"devDependencies": {
"typescript": "5.4.5"
"rimraf": "5.0.7",
"typescript": "5.4.5",
"vitest": "1.6.0"
}
}
4 changes: 3 additions & 1 deletion packages/android/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { mult } from '@titaniumlib/util';

export function bar() {
console.log('bar!');
console.log('bar!', mult(3, 5));
}
25 changes: 3 additions & 22 deletions packages/android/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"composite": true,
"declaration": true,
"declarationMap": true,
"esModuleInterop": false,
"forceConsistentCasingInFileNames": true,
"inlineSources": false,
"isolatedModules": true,
"lib": ["esnext"],
"module": "nodenext",
"moduleResolution": "nodenext",
"noImplicitAny": false,
"noUnusedLocals": false,
"noUnusedParameters": false,
"outDir": "./dist",
"preserveWatchOutput": true,
"removeComments": true,
"rootDir": "./src",
"skipLibCheck": true,
"strict": true,
"sourceMap": true,
"target": "esnext"
"rootDir": "./src"
},
"include": ["src"]
"include": ["./src"]
}
10 changes: 8 additions & 2 deletions packages/ios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@
"./types": "./dist/types/index.d.ts"
},
"scripts": {
"build": "tsc"
"build": "rimraf dist && tsc",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@titaniumlib/util": "workspace:*"
},
"devDependencies": {
"typescript": "5.4.5"
"rimraf": "5.0.7",
"typescript": "5.4.5",
"vitest": "1.6.0"
}
}
4 changes: 3 additions & 1 deletion packages/ios/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { mult } from '@titaniumlib/util';

export function foo() {
console.log('foo!');
console.log('foo!', mult(4, 7));
}
25 changes: 3 additions & 22 deletions packages/ios/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"composite": true,
"declaration": true,
"declarationMap": true,
"esModuleInterop": false,
"forceConsistentCasingInFileNames": true,
"inlineSources": false,
"isolatedModules": true,
"lib": ["esnext"],
"module": "nodenext",
"moduleResolution": "nodenext",
"noImplicitAny": false,
"noUnusedLocals": false,
"noUnusedParameters": false,
"outDir": "./dist",
"preserveWatchOutput": true,
"removeComments": true,
"rootDir": "./src",
"skipLibCheck": true,
"strict": true,
"sourceMap": true,
"target": "esnext"
"rootDir": "./src"
},
"include": ["src"]
"include": ["./src"]
}
18 changes: 18 additions & 0 deletions packages/util/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"private": true,
"name": "@titaniumlib/util",
"type": "module",
"exports": {
".": "./dist/index.js",
"./types": "./dist/types/index.d.ts"
},
"scripts": {
"build": "rimraf dist && tsc",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"rimraf": "5.0.7",
"typescript": "5.4.5",
"vitest": "1.6.0"
}
}
6 changes: 6 additions & 0 deletions packages/util/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function mult(x: number, y: number): number {
if (x === 4) {
throw new Error('x is 4');
}
return x * y;
}
8 changes: 8 additions & 0 deletions packages/util/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["./src"]
}
23 changes: 23 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions public/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"build:types:temp": "tsc --emitDeclarationOnly --outDir temp --project tsconfig.build.json",
"build:types:roll": "rollup --config rollup.dts.config.ts --configPlugin typescript && rimraf temp",
"build:types:check": "tsc --project tsconfig.check.json",
"prepublishOnly": "pnpm run build"
"prepublishOnly": "pnpm run build",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "15.2.3",
Expand All @@ -32,7 +33,8 @@
"rollup-plugin-dts": "6.1.1",
"rollup-plugin-esbuild": "6.1.1",
"tslib": "2.6.2",
"typescript": "5.4.5"
"typescript": "5.4.5",
"vitest": "1.6.0"
},
"bugs": "https://github.com/tidev/titaniumlib/issues",
"repository": "https://github.com/tidev/titaniumlib",
Expand Down
2 changes: 2 additions & 0 deletions public/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export default defineConfig([
minifySyntax: true
}),
typescript({
composite: false,
declaration: false,
declarationMap: false,
outDir: './dist',
rootDir: './src',
sourceMap: true,
Expand Down
4 changes: 3 additions & 1 deletion public/src/ios/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export { foo } from '@titaniumlib/ios';
import { foo } from '@titaniumlib/ios';
export { foo };

console.log('Hello, iOS!');
foo();
File renamed without changes.
2 changes: 1 addition & 1 deletion public/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "./tsconfig.base.json",
"extends": "../tsconfig.base.json",
"include": ["./src"]
}
21 changes: 2 additions & 19 deletions public/tsconfig.check.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"composite": true,
"declaration": true,
"declarationMap": true,
"esModuleInterop": false,
"forceConsistentCasingInFileNames": true,
"inlineSources": false,
"isolatedModules": true,
"lib": ["esnext"],
"module": "nodenext",
"moduleResolution": "nodenext",
"noEmit": true,
"noImplicitAny": false,
"noUnusedLocals": false,
"noUnusedParameters": false,
"preserveWatchOutput": true,
"removeComments": true,
"strict": true,
"target": "esnext"
"noEmit": true
},
"include": ["dist/**/*"]
}
7 changes: 5 additions & 2 deletions public/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"extends": "./tsconfig.base.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"composite": false,
"declaration": false,
"esModuleInterop": true
"declarationMap": false,
"esModuleInterop": true,
"sourceMap": false
},
"include": ["./rollup.config.ts", "./rollup.dts.config.ts"]
}
5 changes: 4 additions & 1 deletion public/tsconfig.base.json → tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"compilerOptions": {
"allowJs": true,
"composite": false,
"declaration": true,
"esModuleInterop": true,
"declarationMap": true,
"esModuleInterop": false,
"forceConsistentCasingInFileNames": true,
"inlineSources": false,
"isolatedModules": true,
Expand All @@ -16,6 +18,7 @@
"removeComments": true,
"skipLibCheck": true,
"strict": true,
"sourceMap": true,
"target": "esnext"
}
}
5 changes: 3 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["package.json"],
"globalDependencies": ["package.json", "tsconfig.base.json"],
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": ["dist/**"]
}
},
"typecheck": {}
}
}

0 comments on commit 26d63b3

Please sign in to comment.