mirror of
https://github.com/sern-handler/tools
synced 2026-06-06 01:16:59 +00:00
poster
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,3 +8,4 @@
|
||||
# Documentation here: https://yarnpkg.com/features/zero-installs
|
||||
!.yarn/cache
|
||||
#.pnp.*
|
||||
node_modules/**/*
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
yarnPath: .yarn/releases/yarn-3.6.3.cjs
|
||||
@@ -5,7 +5,7 @@
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"scripts": {
|
||||
"bundle": "microbundle --target node",
|
||||
"bundle": "microbundle --target node",
|
||||
"watch": "microbundle watch",
|
||||
"test": "microbundle --target node && node ./test/index.test.mjs"
|
||||
},
|
||||
@@ -22,8 +22,6 @@
|
||||
"microbundle": "^0.15.1",
|
||||
"typescript": "^5.0.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
|
||||
2
packages/poster/.gitignore
vendored
Normal file
2
packages/poster/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
dist/
|
||||
.shadow-cljs
|
||||
1
packages/poster/.nrepl-port
Normal file
1
packages/poster/.nrepl-port
Normal file
@@ -0,0 +1 @@
|
||||
57733
|
||||
16
packages/poster/package.json
Normal file
16
packages/poster/package.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "poster",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"shadow-cljs": "^2.8.52",
|
||||
"source-map-support": "^0.5.13"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
||||
11
packages/poster/shadow-cljs.edn
Normal file
11
packages/poster/shadow-cljs.edn
Normal file
@@ -0,0 +1,11 @@
|
||||
;; shadow-cljs configuration
|
||||
{:source-paths
|
||||
["src"]
|
||||
|
||||
:dependencies
|
||||
[]
|
||||
|
||||
:builds
|
||||
{:poster {:target :node-library
|
||||
:output-to "dist/index.js"
|
||||
:exports-var core.poster/add}}}
|
||||
16
packages/poster/src/core/poster.cljs
Normal file
16
packages/poster/src/core/poster.cljs
Normal file
@@ -0,0 +1,16 @@
|
||||
(ns core.poster)
|
||||
|
||||
(def base-url (new js/URL "https://discord.com/api/v10/applications/"))
|
||||
|
||||
(def excluded-keys #{ "command" "absPath" })
|
||||
|
||||
(defn make-global [appid token]
|
||||
"makes a url which posts to global"
|
||||
(new js/URL (str appid "/commands") base-url))
|
||||
|
||||
(defn poster [ appid token]
|
||||
(let [global-url (make-global appid token)]
|
||||
#js {
|
||||
|
||||
|
||||
}))
|
||||
@@ -4,10 +4,10 @@
|
||||
"module": "./dist/index.mjs",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs"
|
||||
"import": "./dist/index.mjs"
|
||||
},
|
||||
"./djs": {
|
||||
"import": "./dist/djs/index.mjs"
|
||||
"import": "./dist/djs/index.mjs"
|
||||
}
|
||||
},
|
||||
"version": "0.0.3-alpha",
|
||||
|
||||
Reference in New Issue
Block a user