From cd9f1b721bc6017e5b50702f852d2bb2f8cdb491 Mon Sep 17 00:00:00 2001 From: Stefan Bohacek Date: Sun, 2 Jun 2024 15:33:05 -0400 Subject: [PATCH] Added build script. --- README.md | 3 +-- package.json | 12 ++++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 package.json diff --git a/README.md b/README.md index 7dfc3eb..6e85b3c 100644 --- a/README.md +++ b/README.md @@ -89,8 +89,7 @@ After making changes to the JS and CSS files, make sure to minify them. ```sh npm install terser -g npm install minify -g -terser fediverse-share-button/script.js > fediverse-share-button/script.min.js -minify fediverse-share-button/styles.css > fediverse-share-button/styles.min.css +npm run build ``` ## Attributions diff --git a/package.json b/package.json new file mode 100644 index 0000000..ce85d7a --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "name": "fediverse-share-button", + "version": "1.0.0", + "description": "Let your site's visitors share your work with the fediverse!", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "terser fediverse-share-button/script.js > fediverse-share-button/script.min.js && minify fediverse-share-button/styles.css > fediverse-share-button/styles.min.css" + }, + "author": "Stefan Bohacek", + "license": "MIT" +}