Skip to content

Commit c02bab9

Browse files
authored
fix: fine tune after using a couple of times (#2)
* updates * us tr for lowercase * correct usage of tr
1 parent ad455e8 commit c02bab9

File tree

12 files changed

+54
-86
lines changed

12 files changed

+54
-86
lines changed

setup.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ setup() {
137137
# - the package name with hyphens replaced by underscores
138138
export_name="${export_name//-/_}"
139139
# - and in lowercase
140-
export_name="${export_name,,}"
140+
export_name="$(echo "$export_name" | tr '[:upper:]' '[:lower:]')"
141141

142142
github_username="${3:-$(ask_for "Your GitHub username")}"
143143
author_name="${4:-$(ask_for "Your name" "$(git config user.name 2>/dev/null)")}"

template/.github/actions/setup-npm-publish/action.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

template/.github/actions/setup-npm-publish/create-npmrc.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

template/.github/workflows/release.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@ jobs:
5353
- name: Yarn
5454
uses: ./.github/actions/setup-yarn
5555

56-
- name: Configure Publishing
57-
uses: ./.github/actions/setup-npm-publish
58-
with:
59-
NpmRegistryUrl: https://registry.npmjs.org/
60-
NpmRcFile: .npmrc
61-
6256
- name: Preflight
6357
run: |
6458
just lint
@@ -73,6 +67,5 @@ jobs:
7367
run: just publish latest
7468

7569
- if: ${{ needs.Process.outputs.prs_created == 'true' }}
76-
env:
77-
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
78-
run: just publish next
70+
run: echo "PRs created or updated; no releases."
71+

template/.yarnrc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ enableGlobalCache: false
33
nodeLinker: node-modules
44
yarnPath: .yarn/releases/yarn-4.0.2.cjs
55
npmAlwaysAuth: true
6-
npmAuthToken: "${NPM_AUTH_TOKEN:-}"
6+
npmAuthToken: "${NPM_AUTH_TOKEN:-''}"
7+
npmRegistryServer: 'https://registry.npmjs.org'

template/README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@
22

33
Your description
44

5-
## Usage
5+
## Features
6+
7+
- Feature 1
8+
- Feature 2
9+
10+
## Installation
611

712
```
813
npm install <PACKAGE NAME>
914
```
1015

16+
## Usage
1117

1218
````ts
13-
import { <EXPORT NAME> } from '<EXPORT NAME>';
19+
import { <EXPORT NAME> } from '<PACKAGE NAME>';
1420
````
1521

1622
<!--- @@inject: dist/docs/modules.md#Functions --->
@@ -20,3 +26,20 @@ import { <EXPORT NAME> } from '<EXPORT NAME>';
2026
<!--- @@inject: dist/docs/interfaces/*.md#Properties --->
2127
REPLACE THIS BLOCK WITH AS MANY REFERENCE TO GENERATED INTERFACE DOCUMENTATION AS YOU NEED
2228
<!--- @@inject-end: dist/docs/interfaces/*.md#Properties --->
29+
30+
31+
## Contributing
32+
33+
This project uses ASDF and Yarn.
34+
35+
1. clone repo
36+
2. make branch: `git checkout [fix|feat|docs|chore]/blah-blah` (see [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
37+
3. run `./tools.sh`
38+
4. run `just setup`
39+
5. run `just demo`
40+
6. run `just unittest`
41+
7. run `just lint`
42+
43+
## Todo
44+
45+
- [ ] Add more tests

template/justfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ unittest:
2626
@vitest --dir ./src
2727

2828
integrationtest:
29-
tsx e2e/produces-rendered-svg.test.ts
29+
@echo "Add your integration tests here"
30+
31+
dev:
32+
@tsx \
33+
--watch \
34+
./src/demo/index.ts
3035

3136
build:
3237
@tsup \
@@ -40,7 +45,7 @@ docs:
4045
--plugin typedoc-plugin-markdown \
4146
--tsconfig ./tsconfig.lib.json \
4247
--out dist/docs \
43-
./src/remark-nomnoml.ts \
48+
./src/<EXPORT NAME>.ts \
4449
--hideBreadcrumbs true \
4550
--namedAnchors true \
4651
--disableSources \

template/package.json

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22
"name": "<PACKAGE NAME>",
33
"version": "0.0.1",
44
"dependencies": {
5-
"hast-util-from-html-isomorphic": "2.0.0",
6-
"hast-util-to-html": "^9.0.0",
7-
"hast-util-to-string": "^3.0.0",
8-
"hastscript": "^9.0.0",
9-
"mdast": "3.0.0",
10-
"nomnoml": "1.6.2",
11-
"tslib": "^2.3.0",
12-
"unified": "11.0.4",
13-
"unist-util-visit-parents": "6.0.1",
14-
"vfile": "6.0.1"
155
},
166
"devDependencies": {
177
"@arethetypeswrong/cli": "^0.15.3",
@@ -32,7 +22,6 @@
3222
"is-ci": "^3.0.1",
3323
"jsonc-eslint-parser": "^2.4.0",
3424
"lint-staged": "^15.2.7",
35-
"open": "^10.1.0",
3625
"prettier": "^3.2.2",
3726
"puppeteer": "^22.11.2",
3827
"remark": "15.0.1",
@@ -47,13 +36,14 @@
4736
"vite": "^5.3.1",
4837
"vitest": "^1.6.0"
4938
},
50-
"main": "./dist/<EXPORT NAME>.js",
51-
"types": "./dist/<EXPORT NAME>.d.ts",
39+
"type": "module",
40+
"main": "./dist/<EXPORT NAME>.cjs",
41+
"types": "./dist/<EXPORT NAME>.d.cts",
5242
"exports": {
5343
".": {
54-
"import": "./dist/<EXPORT NAME>.js",
55-
"require": "./dist/<EXPORT NAME>.js",
56-
"types": "./dist/<EXPORT NAME>.d.ts"
44+
"import": "./dist/<EXPORT NAME>.cjs",
45+
"require": "./dist/<EXPORT NAME>.cjs",
46+
"types": "./dist/<EXPORT NAME>.d.cts"
5747
}
5848
},
5949
"files": [
@@ -69,5 +59,9 @@
6959
"author": {
7060
"name": "<YOUR NAME>",
7161
"email": "<YOUR GITHUB USERNAME>@users.noreply.github.com"
62+
},
63+
"repository": {
64+
"type": "github",
65+
"url": "<PACKAGE REPO>"
7266
}
7367
}

template/src/demo/index.ts

Whitespace-only changes.

template/tsconfig.base.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@
77
"rootDir": ".",
88
"sourceMap": true,
99
"declaration": true,
10-
"moduleResolution": "node",
10+
"jsx": "react",
1111
"emitDecoratorMetadata": true,
1212
"experimentalDecorators": true,
1313
"importHelpers": true,
14+
"moduleResolution": "Bundler",
1415
"target": "es2019",
15-
"module": "commonjs",
16-
"lib": ["es2020", "dom"],
16+
"module": "ES2015",
17+
"lib": ["es2020"],
1718
"skipLibCheck": true,
1819
"skipDefaultLibCheck": true,
1920
"isolatedModules": true,
20-
"baseUrl": ".",
21+
"baseUrl": "./src",
2122
"outDir": "./dist"
2223
},
2324
"exclude": ["node_modules", "tmp"]

0 commit comments

Comments
 (0)