Skip to content

Commit

Permalink
add sdk-js RFC (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanhofer authored Mar 25, 2023
1 parent 4992681 commit 704c83d
Show file tree
Hide file tree
Showing 10 changed files with 578 additions and 0 deletions.
1 change: 1 addition & 0 deletions rfcs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RFC stands for _request for comments_. RFCs are written proposals that seek feed

**RFC's**

- [RFC-004 JavaScript SDK](sdk-js/RFC.md)
- [RFC-003 `@inlang/core/lint`](@inlang_core_lint/RFC.md)
- [RFC-002 Tech Stack](tech-stack/RFC.md)
- [RFC-001 Core Architecture](core-architecture/RFC.md)
533 changes: 533 additions & 0 deletions rfcs/sdk-js/RFC.md

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions source-code/sdk-js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "@inlang/sdk-js",
"type": "module",
"scripts": {
"build": "tsc --build ./tsconfig.build.json",
"dev": "npm run tsc:watch",
"---- TEST ----------------------------------------------------------": "",
"test": "tsc && vitest",
"tsc": "tsc --noEmit",
"tsc:watch": "tsc --noEmit --watch",
"vitest": "vitest run --passWithNoTests --coverage",
"vitest:watch": "vitest watch --passWithNoTests --coverage",
"---- LINT ----------------------------------------------------------": "",
"lint": "cd ../.. && npm run lint:base ./source-code/sdk-js",
"lint:fix": "cd ../.. && npm run lint:fix:base ./source-code/sdk-js",
"format": "cd ../.. && npm run format:base ./source-code/sdk-js",
"format:fix": "cd ../.. && npm run format:fix:base ./source-code/sdk-js",
"---- OTHER ---------------------------------------------------------": "",
"clean": "rm -r -f ./dist ./.turbo ./coverage ./node_modules"
}
}
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions source-code/sdk-js/src/runtime/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { test } from "vitest"

test.skip("dummy")
Empty file.
8 changes: 8 additions & 0 deletions source-code/sdk-js/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Exclude test and source map files when building for production
{
"extends": "./tsconfig.json",
"exclude": ["**/*.test.ts", "**/*.test-d.ts"],
"compilerOptions": {
"sourceMap": false
}
}
12 changes: 12 additions & 0 deletions source-code/sdk-js/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "configs/typescript/tsconfig.base.json",
"include": ["src/**/*.ts"],
"compilerOptions": {
// DOM because of fetch. TODO: extract fetch from this package and
// let fetch be provided by the environment.
"lib": ["ESNext", "DOM"],
"types": [],
"outDir": "./dist",
"rootDir": "./src"
}
}

0 comments on commit 704c83d

Please sign in to comment.