Shared grunt configuration for Elgg 2.0 plugins and sites.
module.exports = require('elgg-grunt');
Your local server needs to point to the /dist/ directory, which is where the built files will end up.
{
"baseUrl": "http://localhost:8080/dist/"
}
Just grunt watch
; no flags or subcommands.
This gives you the default local build, and
automatically updates as you make changes.
Load up the app at baseUrl
to see it in action.
NB: You need to start the server yourself. How to do that is different based on each environment.
TODO(evan): Provide a default local server.
This project and any project that relies on this one to provide its Gruntfile configuration can use the following commands to quickly push new versions to NPM.
# Bugfix releases (e.g. 1.0.x)
grunt release:patch
npm publish
# New feature releases (e.g. 1.x.0)
grunt release:minor
npm publish
# Backwards-incompatible releases (e.g. x.0.0)
grunt release:major
npm publish
Each of these will generate the appropriate changelog updates assuming you have been diligent to adhere to the recommended commit message format.
Add .travis.yml to your app:
language: node_js
node_js:
- '0.11'
script: grunt travis
branches:
only:
- master
Travis-CI can push your app to gh-pages/staging/production every time all your tests pass. This example walks you through auto-pushing to GitHub pages:
You can follow the instructions here:
https://github.com/X1011/git-directory-deploy
language: node_js
node_js:
- '0.11'
script: grunt travis
after_success: bin/deploy.sh gh-pages
branches:
only:
- master
Note that this also includes a after_success: bin/deploy.sh
script.
You need to copy deploy.sh
from the ng-elgg repo until continuous deployment
is supported out of the box.
gem install travis
cd my_project
travis encrypt GITHUB_TOKEN=XXXXX --add
Replace XXXXX
with your GitHub command line token for the repository.