##Publishing
Currently CFPM only supports publishing from GitHub
To publish a package, your GitHub repo must conform to a few simple standards. The first is for your repository to include a **cfpm.json** file. Below is a basic example of a cfpm.json file. { "name" : "package_name", "version" : "v0.0.1", "repository" : "https://github.com/Username/RepoName", "author": "Author Name", "homepage": "http://example.com", "description" : "A Short description of the package", "keywords" : "package, cf package, etc", "license" : "MIT" } You can easily create a package file by installing cfpm and calling cfpm init ----- Package Names must be unique. Please search CFPM first to ensure your package name is not taken ----- The second thing that is required is to name your component after your package name. For example, your package name is 'utils', your main component file will be named 'utils.cfc' in the root folder. The last thing is setting up the webhook to ensure that your package gets updated when you push code. * Visit your repository on Github * Edit the repository Settings * Select Webooks and Services * Add Webhook * Set Payload URL: https://cfpm.io/publish/github/your-api-token Your API Token can be found on your profile page * Select "Send me everything" * Click "Add Webhook" That's It! You package will now automatically be published when you make your next push ----- ###Versioning CFPM allows for versioning of packages to ensure that users of your package can maintain a stable environment. ####Adding Versions CFPM monitors the versions from Github releases. To create a new version, click the "releases" tab and then "Draft a new release" Versions can be typed up any different way, but we recommend using semver ([http://semver.org/](http://semver.org/)) to keep track of your version numbers The release title will be displayed on CFPM so please ensure it matches the actual version changes Once you have filled in the Tag version and Title (you can add a description but it isn't required) you can Publish the Release. CFPM will pick up the change and publish the new version for users to download ####Development Branches While many developers use master as their development branch along with their mainline branch, we recommend using mainline branches as the last stable build. This allows users of your package to stay up with the latest and greatest your package has to offer but still gives them a little bit of stability when it comes to updating their system ##Requiring other Packages (Dependencies) CFPM allows you to require other packages to support your package. The easiest way to do this is install cfpm and calling cfpm init cfpm add cfpm This does several things * Adds and/or updates your .gitignore to ignore /vendor and cfpm.py * Adds the package to your cfpm.json * Installs cfpm.cfc (which you will need to commit) * Installs the package(s) you have required Once you have downloaded and installed things, you can then include your required package into your package using cfpm.cfc component { function init(){ this.cfpm = new cfpm(); this.utils = this.cfpm.require('utils'); return this; } } After that, add all the new files (excluding /vendor and cfpm.py) to your repo and push to your reposity. Your package now has a dependency.
If you have any problems or questions, please email me at william.h.giles@gmail.com