diff options
author | Unknown | 2018-04-02 14:08:43 +0100 |
---|---|---|
committer | Unknown | 2018-04-02 14:08:43 +0100 |
commit | ae2c5fe141a11e598032d1b3ac26aafc4d961799 (patch) | |
tree | 2557e1b4b9da2fab3df4c1df9c418272217e1ce7 /README.md | |
parent | 484a85333c029a80935fe4b1a6b65e7c18e58a71 (diff) |
add documentation and main repo
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 61 |
1 files changed, 60 insertions, 1 deletions
@@ -1,2 +1,61 @@ # pkg93 -soon + +## Installation +Unfinished! + +## Making a repository +Firstly, make sure that [CORS is enabled on your webserver](https://enable-cors.org/server.html). +If it isn't on, your users will be unable to download packages! +Secondly you need to create a repo.json in the folder where you want your repository to be in. +Here's an example: +```json +{ + "name": "Example of a repo.json", + "motd": "This is an example repo.json", + "packages": [ + "examplepkg1", + "examplepkg2", + "examplepkg3" + ] +} +``` +Finally put all the packages in seperate folders named after the package. +The end result should look like this: +``` +example-repo +├── repo.json +├── examplepkg1 +│ │ (package files go here) +│ └── package.json +├── examplepkg2 +│ │ (package files go here) +│ └── package.json +└── examplepkg3 +│ │ (package files go here) + └── package.json +``` + +## Making a package +Firstly, you want to make a new folder called the name of the package. +Then, you want to make a file called package.json in the folder. +In it, there should be 4 keys. +- `"name"`: **Must be the same as the folder name and command name!** +- `"version"`: An array of 3 numbers, 1st number is major, 2nd number is minor, 3rd number is patch. +- `"inject"`: It should be the name of the injection script. +- `"uninstall"`: Optional, It should be the name of the uninstaller script, if it doesn't exist pkg93 will simply delete the command for you. +Here's a example: +```json +{ + "name": "examplepkg", + "version": [1, 3, 7], + "inject": "installer.js", + "uninstall": "mypointlessuninstaller.js" +} +``` +And the directory structure: +``` +examplepkg +├── package.json +├── installer.js +└── mypointlessuninstaller.js +``` |