File tree Expand file tree Collapse file tree 6 files changed +76
-6
lines changed Expand file tree Collapse file tree 6 files changed +76
-6
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to npm
2+ on :
3+ release :
4+ types : [created]
5+ jobs :
6+ build :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v3
10+ # Setup .npmrc file to publish to npm
11+ - uses : actions/setup-node@v3
12+ with :
13+ node-version : ' 16.x'
14+ registry-url : ' https://registry.npmjs.org'
15+ - run : |
16+ npm install
17+ npm run build
18+ npm publish --access public
19+ env:
20+ NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Release Build
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ jobs :
9+ build :
10+
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Create Release
15+ id : create_release
16+ uses : actions/create-release@v1
17+ env :
18+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19+ VERSION : ${{ github.ref }}
20+ with :
21+ tag_name : ${{ github.ref }}
22+ release_name : ${{ github.ref }}
23+ draft : false
24+ prerelease : false
Original file line number Diff line number Diff line change 1+ .eslintrc
2+ .gitignore
3+ tsconfig.json
4+ index.ts
Original file line number Diff line number Diff line change 1+ # Obsidian Plugin API
2+
3+ Standartized way of exposing and using Obsidian Plugin APIs
4+
5+ ## Installation
6+
7+ ``` shell
8+ npm install --save-dev @vanakat/plugin-api
9+ ```
10+
11+ ## Usage
12+
13+ This module exposes 2 functions:
14+
15+ * ` registerAPI(name, api, plugin) ` - registers plugin API in global variable (` window ` )
16+ * ` pluginApi(name) ` - returns plugin API based on its name
17+
18+ ## License
19+
20+ MIT
Original file line number Diff line number Diff line change 11{
2- "name" : " obsidian- plugin-api" ,
2+ "name" : " @vanakat/ plugin-api" ,
33 "version" : " 0.1.0" ,
44 "description" : " Obsidian helper for inter-plugin API communication" ,
5- "main" : " index.ts" ,
5+ "main" : " index.js" ,
6+ "types" : " index.d.ts" ,
67 "scripts" : {
7- "test " : " echo \" Error: no test specified \" && exit 1 "
8+ "build " : " tsc "
89 },
910 "repository" : {
1011 "type" : " git" ,
11- "url" : " git+https://github.com/MunGell /plugin-api.git"
12+ "url" : " git+https://github.com/vanakat /plugin-api.git"
1213 },
1314 "keywords" : [
1415 " obsidian" ,
1920 "author" :
" Shmavon Gazanchyan <[email protected] > (https://github.com/MunGell)" ,
2021 "license" : " MIT" ,
2122 "bugs" : {
22- "url" : " https://github.com/MunGell /plugin-api/issues"
23+ "url" : " https://github.com/vanakat /plugin-api/issues"
2324 },
24- "homepage" : " https://github.com/MunGell /plugin-api#readme" ,
25+ "homepage" : " https://github.com/vanakat /plugin-api#readme" ,
2526 "dependencies" : {
2627 "@typescript-eslint/eslint-plugin" : " ^5.2.0" ,
2728 "@typescript-eslint/parser" : " ^5.2.0" ,
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
3+ "declaration" : true ,
34 "inlineSourceMap" : true ,
45 "inlineSources" : true ,
56 "module" : " ESNext" ,
You can’t perform that action at this time.
0 commit comments