Reusable UI components
JavaScript Ruby CSS HTML Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app/views/dough Applys condition for displaying tooltip title in component Dec 18, 2017
assets TP: 7317, Comment: Adds Karma tests for Back to Top component Jan 9, 2018
config/locales Removes custom attribute interpolation Jan 2, 2015
docs TP: 8647, Comment: Adds Tooltip trigger and content helpers Nov 28, 2017
lib Comment: Bumps version of Dough to 5.27 Mar 7, 2018
loopback/dough Move loopback avoid symlink recursion Aug 14, 2014
script Add post stage to clean workspace and add gem build stage Mar 7, 2018
spec Use action view renderer for Rails 5 Action View Mar 7, 2018
vendor/assets Update Modernizr build to add Geolocation API test. Oct 14, 2014
.bowerrc TP: 8647, Comment: Adds Tooltip trigger and content helpers Nov 28, 2017
.gitignore Running Karma tests in different screen sizes Apr 6, 2016
.hound.yml Add rubocop and fix code styling Oct 21, 2014
.jscsrc JS variables in camel case - option in JSHint only, not JSCS Aug 11, 2014
.jshintrc JSHint compliance Sep 24, 2014
.rspec add developer .rspec options May 20, 2014
.rubocop.yml Update rubocop to check method definitions have parens Nov 13, 2014
.ruby-gemset Merge dough-ruby into dough Jun 12, 2014
.ruby-version Unpinning SASS-Rails and updating Ruby version Dec 21, 2016
.travis.yml Install bower globally on Travis Mar 7, 2018
Dockerfile Add post stage to clean workspace and add gem build stage Mar 7, 2018
Gemfile Add repo to Jenkins Dec 14, 2017
Jenkinsfile Add post stage to clean workspace and add gem build stage Mar 7, 2018
LICENSE Merge dough-ruby into dough Jun 12, 2014
README.md Update README May 7, 2015
Rakefile Make sure we have the rake tasks from our dummy app. Needed for build Oct 21, 2014
bower.json Fix jquery to 1.11.* to match frontend Sep 22, 2015
build.sh TP: 8729, Comment: Disable GitHub pages Dec 5, 2017
dough-ruby.gemspec Comment: Updates Rails version in gemspec to 5 Mar 7, 2018
gulpfile.js Make sure jsdoc has run before deploy task has run May 7, 2015
package.json TP: 7317, Comment: Adds Karma tests for Back to Top component Jan 9, 2018
test.sh Running Karma tests in different screen sizes Apr 6, 2016

README.md

Dough

A reusable UI component library from the Money Advice Service, free for use on any Rails based project. More info and a fuller introduction available on our blog.

Code Climate

Prerequisites

Installation

Clone the repository:

$ git clone https://github.com/moneyadviceservice/dough.git

Make sure all dependencies are available:

$ npm install -g bower
$ bower install
$ npm install

How to use a local copy of Dough

Dough is a bower module embedded inside a ruby gem.

Use these instructions when you're working on Dough and want to see the effects within another project. For example, if you're working on Pension Calculator, you want to use a local copy of Dough.

For the purpose of this example, PROJECT refers to Pension Calculator, or whatever you're working on.

Make sure you have the latest bundle in PROJECT

cd PROJECT
bundle install

Link dough-ruby to your local copy, in PROJECT's Gemfile

DO NOT COMMIT THIS!!!

# Add this to the top of the file if it doesn't exist already
gem 'dough-ruby', path: '~/Sites/dough' # or whatever your local Dough is

Set up bower link in Dough

cd ~/Sites/dough # or whatever your local Dough is
bower link

Connect the link above to PROJECT

cd PROJECT
bower link dough

Troubleshooting

If you don't see your local CSS after following the steps

rm -r tmp/cache

Running Javascript tests

Make sure you ran npm install.

$ ./node_modules/karma/bin/karma start spec/js/karma.conf.js --single-run

Javascript style checking

Make sure you ran npm install.

./node_modules/jshint/bin/jshint ./assets/js --config .jshintrc
./node_modules/jscs/bin/jscs js

To prevent commiting JavaScript files that violate JSHint and JSCS rules:

cat > .git/hooks/pre-commit <<EOF
!/bin/sh
./script/git-pre-commit-jshint.sh
EOF
chmod +x .git/hooks/pre-commit

JavaScript documentation

Dough's JS documentation follows the jsDoc syntax and is generated using Gulp.

To generate documentation

gulp jsdoc

To generate and deploy documentation to the gh-pages branch.

gulp build

The jsDoc theme used is jaguar-jsdoc.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Keep your feature branch focused and short lived
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

Releases

31/7/14 - v1.0.0 - breaking change - VisibilityToggler component renamed to Collapsable