Skip to content

Commit fac4dea

Browse files
Scaffold an empty project (#1)
- Add tsconfig setup - Add prettier - Setup CI for testing and publishing
1 parent f9346eb commit fac4dea

8 files changed

Lines changed: 203 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [22.x, 24.x]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: "npm"
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Check formatting
31+
run: npm run format:check
32+
33+
- name: Build project
34+
run: npm run build

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish NPM Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "24.x"
21+
registry-url: "https://npm.pkg.github.com/"
22+
23+
- name: Install dependencies
24+
run: npm install
25+
26+
- name: Build package
27+
run: npm run build
28+
29+
- name: Publish to GitHub Packages Registry
30+
run: npm publish
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
2+
@runtimed:registry=https://npm.pkg.github.com/
3+
always-auth=true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# anaconda_extension
2+
23
Anaconda-specific integrations for Runt

package-lock.json

Lines changed: 65 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "@runtimed/anaconda",
3+
"version": "0.1.0",
4+
"description": "Anaconda integrations for the Runt Web",
5+
"homepage": "https://github.com/runtimed/anaconda_extension#readme",
6+
"bugs": {
7+
"url": "https://github.com/runtimed/anaconda_extension/issues"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/runtimed/anaconda_extension.git"
12+
},
13+
"author": "Anil Kulkarni",
14+
"type": "module",
15+
"main": "dist/index.js",
16+
"exports": {
17+
".": {
18+
"import": "./dist/index.js",
19+
"types": "./dist/index.d.ts"
20+
}
21+
},
22+
"files": [
23+
"dist",
24+
"README.md"
25+
],
26+
"publishConfig": {
27+
"registry": "https://npm.pkg.github.com"
28+
},
29+
"scripts": {
30+
"test": "echo \"Error: no test specified\" && exit 1",
31+
"format": "prettier --write .",
32+
"format:check": "prettier --check .",
33+
"build": "npx tsc"
34+
},
35+
"dependencies": {
36+
"@runtimed/extensions": "^0.2.0"
37+
},
38+
"devDependencies": {
39+
"prettier": "^3.6.2",
40+
"typescript": "^5.9.2"
41+
}
42+
}

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { BackendExtension } from "@runtimed/extensions";
2+
3+
const extension: BackendExtension = {};
4+
export default extension;

tsconfig.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"include": ["src"],
3+
"compilerOptions": {
4+
"baseUrl": ".",
5+
"outDir": "dist",
6+
"esModuleInterop": true,
7+
"target": "es2024",
8+
"moduleDetection": "force",
9+
"module": "ESNext",
10+
"moduleResolution": "bundler",
11+
"declarationMap": true,
12+
"declaration": true,
13+
"lib": ["es2024"],
14+
"strict": true,
15+
"skipLibCheck": true,
16+
"isolatedModules": true,
17+
"allowImportingTsExtensions": true,
18+
"rewriteRelativeImportExtensions": true,
19+
"noUncheckedIndexedAccess": true,
20+
"noImplicitOverride": true
21+
}
22+
}

0 commit comments

Comments
 (0)