Skip to content

Commit 81e7f99

Browse files
author
Dylan Bulmer
authored
Initial commit
0 parents  commit 81e7f99

11 files changed

Lines changed: 127 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
branches:
9+
- "main"
10+
paths-ignore:
11+
- "**/*.md"
12+
- "**/*.txt"
13+
14+
jobs:
15+
analyze:
16+
uses: CodrJS/cicd/.github/workflows/codeql.yml@main

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Test and Publish JSR Module
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- "**"
8+
pull_request:
9+
branches:
10+
- main
11+
release:
12+
types:
13+
- created
14+
15+
jobs:
16+
test:
17+
uses: CodrJS/cicd/.github/workflows/deno-test.yml@main
18+
publish:
19+
uses: CodrJS/cicd/.github/workflows/deno-publish-jsr.yml@main
20+
needs: test
21+
secrets: inherit

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
coverage/
2+
.env*.local

LICENSE

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) 2024-present Dylan Bulmer
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# @codr/ts-jsr-template
2+
3+
[![JSR Scope](https://jsr.io/badges/@codr)](https://jsr.io/@codr)
4+
[![JSR](https://jsr.io/badges/@codr/<package>)](https://jsr.io/@codr/<package>)
5+
[![JSR Score](https://jsr.io/badges/@codr/<package>/score)](https://jsr.io/@codr/<package>)
6+
[![CodeQL](https://github.com/CodrJS/ts-jsr-template/actions/workflows/codeql.yml/badge.svg)](https://github.com/CodrJS/ts-jsr-template/actions/workflows/codeql.yml)
7+
8+
## Purpose
9+
10+
Codr has the `@codr` namespace for the JavaScript Resistry (jsr). Modules
11+
published to JSR should by compatible for at least Node and Deno.
12+
13+
## Getting Started
14+
15+
Click "Use this template" in Github, then "Create a new repository."
16+
17+
## Contributing
18+
19+
```shell
20+
# Clone the repo
21+
git clone git@github.com:CodrJS/ts-jsr-template.git
22+
23+
# Cache deno dependencies
24+
deno cache
25+
26+
# Lint, format, and test the code
27+
deno lint
28+
deno fmt
29+
deno test
30+
```

deno.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "@codr/ts-template",
3+
"version": "0.0.1",
4+
"exports": "./mod.ts",
5+
"fmt": {
6+
"lineWidth": 80,
7+
"indentWidth": 2,
8+
"useTabs": false,
9+
"semiColons": true,
10+
"singleQuote": false
11+
},
12+
"publish": {
13+
"include": ["LICENSE", "README.md", "src/**/*.ts"],
14+
"exclude": [".github", "*.test.ts", ".gitignore"]
15+
}
16+
}

deno.lock

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

mod.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./src/mod.ts";

src/add.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function add(a: number, b: number): number {
2+
return a + b;
3+
}

src/mod.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// export files from here.
2+
export { add } from "./add.ts";

0 commit comments

Comments
 (0)