Add readme and update packaging command

This commit is contained in:
Vivian Lim 2020-07-24 20:13:24 -07:00
parent 69ee8edb7f
commit 04542d000e
3 changed files with 16 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
build
node_modules
dist

13
package-readme.md Normal file
View File

@ -0,0 +1,13 @@
# Ctrl-v image pasting for SMF forums
by viviridian <hi@vvn.space>
## Installation
Unzip and move all the non-patch files into the corresponding folders
Then apply the patch with:
patch -p1 < dist/mod.patch
## Usage
In the post composer, users will be able to press Ctrl-V to paste any images on their clipboard into their message.
An "inline" image attachment is created in the background. This attachment is not bound to a specific post, only the user, and is probably not affected by cleanup actions.
You can review and delete individual inline attachments in the usual attachments admin control panel.

View File

@ -6,7 +6,8 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rimraf ./build && webpack --mode=development && cp ./node_modules/awesome-notifications/dist/style.css ./build/awesome-notifications.css",
"devdeploy": "npm run build && cp ./build/bundle.js ~/git/smfdev/web/data/Themes/default/scripts/compose-extras.js && cp ./build/awesome-notifications.css ~/git/smfdev/web/data/Themes/default/css/awesome-notifications.css"
"devdeploy": "npm run build && cp ./build/bundle.js ~/git/smfdev/web/data/Themes/default/scripts/compose-extras.js && cp ./build/awesome-notifications.css ~/git/smfdev/web/data/Themes/default/css/awesome-notifications.css",
"dist": "rimraf ./dist && mkdir -p ./dist/Themes/default/scripts && mkdir -p ./dist/Themes/default/css && cp ./build/bundle.js ./dist/Themes/default/scripts/compose-extras.js && cp ./build/awesome-notifications.css ./dist/Themes/default/css/awesome-notifications.css && cp ./mod.patch ./dist/ && cp ./package-readme.md ./dist/readme.md && cd dist && zip ./smf-paste-img.zip * -r"
},
"author": "viviridian",
"license": "UNLICENSED",