-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from greasify/dev
feat: dev
- Loading branch information
Showing
107 changed files
with
5,654 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: NPM Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
id-token: write | ||
|
||
jobs: | ||
cache-and-install: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
id: pnpm-install | ||
with: | ||
version: 9 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- name: Setup pnpm cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build packages | ||
run: pnpm build | ||
|
||
- name: Publish packages | ||
shell: bash | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken="${{ secrets.NPM_TOKEN }}"" > ~/.npmrc | ||
pnpm publish --access public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('@crashmax/prettier-config') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
# create-greasify | ||
## Scaffolding your first userscript project | ||
|
||
```sh | ||
npm create greasify | ||
``` | ||
|
||
```sh | ||
yarn create greasify | ||
``` | ||
|
||
```sh | ||
pnpm create greasify | ||
``` | ||
|
||
## The supported template presets are | ||
|
||
| TypeScript | JavaScript | | ||
| ----------------------------------- | ----------------------------- | | ||
| [vanilla-ts](/templates/vanilla-ts) | [vanilla](/templates/vanilla) | | ||
| [reatom-ts](/templates/reatom-ts) | [reatom](/templates/reatom) | | ||
| [solid-ts](/templates/solid-ts) | [solid](/templates/solid) | | ||
| [preact-ts](/templates/preact-ts) | [preact](/templates/preact) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"name": "create-greasify", | ||
"description": "Create a greasify userscript project.", | ||
"version": "0.0.0", | ||
"type": "module", | ||
"bin": { | ||
"create-greasify": "./dist/bin.js" | ||
}, | ||
"files": [ | ||
"dist", | ||
"templates", | ||
"!templates/*/node_modules", | ||
"!templates/*/dist" | ||
], | ||
"keywords": [ | ||
"cli", | ||
"create", | ||
"vite", | ||
"userscript", | ||
"templates" | ||
], | ||
"scripts": { | ||
"start": "pnpm build && node dist/bin.js", | ||
"dev": "tsup --watch", | ||
"build": "tsup", | ||
"build:templates": "pnpm build && pnpm -r --filter=./templates/* run build", | ||
"format": "prettier --write src", | ||
"format:templates": "pnpm -r --filter=./templates/* run format", | ||
"type-check": "tsc --noEmit", | ||
"create-greasify": "pnpm build && node dist/bin.js" | ||
}, | ||
"devDependencies": { | ||
"@crashmax/prettier-config": "5.0.2", | ||
"@crashmax/tsconfig": "2.2.0", | ||
"@octokit/types": "13.5.0", | ||
"@types/minimist": "1.2.5", | ||
"@types/node": "20.10.4", | ||
"@types/prompts": "2.4.9", | ||
"tsup": "8.2.4", | ||
"typescript": "5.5.4" | ||
}, | ||
"dependencies": { | ||
"kolorist": "1.8.0", | ||
"minimist": "1.2.8", | ||
"prompts": "2.4.2" | ||
} | ||
} |
Oops, something went wrong.