From f92b652bf97f245e1ffa3fb81f0816e242ea45d8 Mon Sep 17 00:00:00 2001 From: jem Date: Tue, 30 Jun 2020 09:09:59 +0200 Subject: [PATCH] test releasing as lib --- .github/workflows/release.yml | 10 +++++----- package.json | 16 ++++++++++++++-- shadow-cljs.edn | 4 ++++ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1599b21..2eccc59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,9 +40,9 @@ jobs: - name: build em run: | - shadow-cljs release frontend - sha256sum public/js/main.js > target/dda-masto-embedd.js.sha256 - sha512sum public/js/main.js > target/dda-masto-embedd.js.sha512 + shadow-cljs release lib + sha256sum target/lib.js > target/dda-masto-embedd.js.sha256 + sha512sum target/lib.js > target/dda-masto-embedd.js.sha512 - name: Create Release id: create_release @@ -62,7 +62,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: public/js/main.js + asset_path: target/lib.js asset_name: dda-masto-embed.js asset_content_type: application/json @@ -93,7 +93,7 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | mkdir -p target/npm-build - cp public/js/main.js target/npm-build/ + cp target/lib.js target/npm-build/ cp target/dda-masto-embedd.js.sha256 target/npm-build/ cp target/dda-masto-embedd.js.sha512 target/npm-build/ cp package.json target/npm-build/ diff --git a/package.json b/package.json index 38d609b..0e4b8ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,11 @@ { "name": "dda-masto-embed", - "version": "0.0.1", + "description": "Renders mastodon statuses to a website using just JS, no additional server needed.", + "author": "meissa GmbH", + "version": "0.0.2", + "homepage": "https://github.com/DomainDrivenArchitecture/dda-masto-embed", + "repository": "https://github.com/DomainDrivenArchitecture/dda-masto-embed", + "license": "APACHE2.0", "private": false, "devDependencies": { "shadow-cljs": "^2.8.104", @@ -11,5 +16,12 @@ "eslint": ">=4.18.2", "lodash.template": ">=4.5.0", "mastodon-api": "^1.3.0" - } + }, + "main": "mastodon-bot.js", + "keywords": [ + "cljs", + "mastodon", + "status", + "bootstrap" + ] } diff --git a/shadow-cljs.edn b/shadow-cljs.edn index e5cc392..e140666 100644 --- a/shadow-cljs.edn +++ b/shadow-cljs.edn @@ -13,6 +13,10 @@ {:test {:target :node-test :output-to "target/node-tests.js" :autorun true} + :lib {:target :node-library + :output-to "target/lib.js" + :exports {:init dda.masto-embed.app/init} + :release {:compiler-options {:optimizations :simple}}} :frontend {:target :browser :module-hash-names true :modules {:main {:init-fn dda.masto-embed.app/init}}}}}