A grunt task to automate the deployment of your status page themes to your Sorry account.
This task takes your themes source code, bundles it up into a deployable zip and uploads it to your status page through the Sorry API.
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-sorry-theme-deploy --save-dev
Run this task with the
grunt sorry-theme-deploy command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Some options such as 'page' and 'host' may also be supplied as command line parameters.
In your project's Gruntfile, add a section named
sorry_theme_deploy to the data object passed into
This is your API Token which is available from within your Sorry account.
The ID of the page to which you wish to deploy your theme. You can find this in the address bar of your Sorry account when viewing your page. i.e. a URL of
http://app.sorryapp.com/pages/my-page means your page ID is
This is the location (relative to the Gruntfile) in which we'll store the bundled version of your theme before uploading it.
This is only applicable to Sorry development staff who wish to point the script at development and staging endpoints.
We need somewhere to keep your Sorry login credentials. In the root of your project create a file called
sorry.json which contains your access token. You should never check your Sorry credentials in to version control! Load them from an external file like this, which is outside of the repo or excluded by .gitignore.
Now you can configure your grunt task, loading your Sorry login details from the external file you created above.
You can also see from this config that we define the themes files as being in a directory named
src. These files could be anywhere you like, but we always recommend this as a sensible default.
Now your options are configured you can deploy your theme to your chosen page. Whist you can define your target page in the configuration, to give you flexibility we suggest using the command line argument
grunt sorry-theme-deploy --sorry-page=my-page
If you do not pass in an accessToken with your config,
grunt-sorry-theme-deploy will fallback to the following environment variables:
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Once you are happy that your contribution is ready for production please send us a pull request, at which point we'll review the code and merge it in.
For transparency and insight into our release cycle, and for striving to maintain backward compatibility, This project will be maintained under the Semantic Versioning guidelines as much as possible.
Releases will be numbered with the following format:
And constructed with the following guidelines:
For more information on SemVer, please visit http://semver.org/.
© Copyright 2014 - Sorry. See LICENSE for details.