-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
66 additions
and
0 deletions.
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
jobs: | ||
release: | ||
|
@@ -28,3 +29,14 @@ jobs: | |
run: cargo publish -p markup_fmt | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8.10.5 | ||
run_install: true | ||
- name: Publish to npm | ||
run: | | ||
cp target/wasm32-unknown-unknown/release/dprint_plugin_markup.wasm dprint_plugin/deployment/npm/plugin.wasm | ||
pnpm -F dprint-plugin-markup publish --provenance --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,5 @@ | ||
/target | ||
node_modules/ | ||
pnpm-lock.yaml | ||
*.js | ||
*.d.ts |
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,8 @@ | ||
import * as path from 'node:path' | ||
import * as URL from 'node:url' | ||
|
||
export function getPath() { | ||
return path.join(path.dirname(URL.fileURLToPath(import.meta.url)), 'plugin.wasm') | ||
} | ||
|
||
export type * from './config.js' |
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,32 @@ | ||
{ | ||
"name": "dprint-plugin-markup", | ||
"description": "markup_fmt as dprint plugin.", | ||
"version": "0.2.1", | ||
"author": "Pig Fang <[email protected]>", | ||
"repository": "g-plane/markup_fmt", | ||
"license": "MIT", | ||
"type": "module", | ||
"keywords": [ | ||
"dprint", | ||
"dprint-plugin" | ||
], | ||
"files": [ | ||
"*.wasm", | ||
"*.js", | ||
"*.d.ts" | ||
], | ||
"main": "index.js", | ||
"exports": { | ||
".": "./index.js" | ||
}, | ||
"scripts": { | ||
"build": "json2ts ../schema.json -o config.d.ts --no-additionalProperties && tsc -p .", | ||
"prepublishOnly": "pnpm build" | ||
}, | ||
"devDependencies": { | ||
"@gplane/tsconfig": "^6.1.0", | ||
"@types/node": "^20.10.3", | ||
"json-schema-to-typescript": "^13.1.1", | ||
"typescript": "^5.3.2" | ||
} | ||
} |
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,6 @@ | ||
{ | ||
"extends": "@gplane/tsconfig", | ||
"compilerOptions": { | ||
"sourceMap": false | ||
} | ||
} |
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
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 @@ | ||
packages: | ||
- dprint_plugin/deployment/npm |