File tree 6 files changed +76
-6
lines changed
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 1
1
{
2
- "name" : " obsidian- plugin-api" ,
2
+ "name" : " @vanakat/ plugin-api" ,
3
3
"version" : " 0.1.0" ,
4
4
"description" : " Obsidian helper for inter-plugin API communication" ,
5
- "main" : " index.ts" ,
5
+ "main" : " index.js" ,
6
+ "types" : " index.d.ts" ,
6
7
"scripts" : {
7
- "test " : " echo \" Error: no test specified \" && exit 1 "
8
+ "build " : " tsc "
8
9
},
9
10
"repository" : {
10
11
"type" : " git" ,
11
- "url" : " git+https://github.com/MunGell /plugin-api.git"
12
+ "url" : " git+https://github.com/vanakat /plugin-api.git"
12
13
},
13
14
"keywords" : [
14
15
" obsidian" ,
19
20
"author" :
" Shmavon Gazanchyan <[email protected] > (https://github.com/MunGell)" ,
20
21
"license" : " MIT" ,
21
22
"bugs" : {
22
- "url" : " https://github.com/MunGell /plugin-api/issues"
23
+ "url" : " https://github.com/vanakat /plugin-api/issues"
23
24
},
24
- "homepage" : " https://github.com/MunGell /plugin-api#readme" ,
25
+ "homepage" : " https://github.com/vanakat /plugin-api#readme" ,
25
26
"dependencies" : {
26
27
"@typescript-eslint/eslint-plugin" : " ^5.2.0" ,
27
28
"@typescript-eslint/parser" : " ^5.2.0" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"compilerOptions" : {
3
+ "declaration" : true ,
3
4
"inlineSourceMap" : true ,
4
5
"inlineSources" : true ,
5
6
"module" : " ESNext" ,
You can’t perform that action at this time.
0 commit comments