Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify javascript for inclusion in gem #1

Merged
merged 2 commits into from
Jul 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Or install it yourself as:

1. Add `@import 'cfa_styleguide_main';` to application.scss.

1. Add `//= require cfa_styleguide_main` to application.js.

1. Add `mount Cfa::Styleguide::Engine => "/cfa"` to routes.rb.

1. Visit `<your hostname>/cfa/styleguide` to view the styleguide
Expand All @@ -38,6 +40,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To

1. Rename `main.scss` to `cfa_styleguide_main.scss`

1. Rename `application.js` to `cfa_styleguide_main.js`

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/codeforamerica/cfa-styleguide-gem. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
Expand All @@ -48,4 +52,4 @@ The gem is available as open source under the terms of the [MIT License](https:/

## Code of Conduct

Everyone interacting in the Cfa::Styleguide project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/cfa-product-styleguide/blob/master/CODE_OF_CONDUCT.md).
Everyone interacting in the Cfa::Styleguide project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/codeforamerica/cfa-product-styleguide/blob/master/CODE_OF_CONDUCT.md).
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ var inputGroupSelector = (function() {
})();

$(document).ready(function() {
incrementer.init();
radioSelector.init();
checkboxSelector.init();
followUpQuestion.init();
Expand Down
6 changes: 6 additions & 0 deletions spec/feature/hello_world_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@

expect(page.status_code).to eq 200
end

scenario 'can access standard cfa js' do
visit '/assets/cfa_styleguide_main.js'

expect(page.status_code).to eq 200
end
end