Skip to content
This repository has been archived by the owner on May 26, 2019. It is now read-only.

Commit

Permalink
Merge pull request #998 from mwils/master
Browse files Browse the repository at this point in the history
Added spellchecking during build
  • Loading branch information
michaelrkn committed Nov 27, 2015
2 parents 4bd6759 + 5cc767f commit 7d363cd
Show file tree
Hide file tree
Showing 6 changed files with 290 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ language: ruby
sudo: false
rvm:
- "1.9.3"
addons:
apt:
packages:
- aspell-en
script: bundle exec rspec spec && bundle exec middleman build --verbose
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source 'https://rubygems.org'

gem 'middleman-spellcheck',:git => "https://github.com/mwils/middleman-spellcheck.git", :branch => 'class'
gem "redcarpet"
gem "activesupport", '~> 4.1.11'
gem "highline"
Expand Down
13 changes: 13 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ GIT
specs:
coderay (1.1.0.rc1)

GIT
remote: https://github.com/mwils/middleman-spellcheck.git
revision: 9edeaa3d7ef793f2eded94eacd3fb48d3b64a3de
branch: class
specs:
middleman-spellcheck (0.8.0)
middleman-core (~> 3.2)
nokogiri

GEM
remote: https://rubygems.org/
remote: https://rails-assets.org/
Expand Down Expand Up @@ -227,6 +236,7 @@ DEPENDENCIES
listen
middleman (~> 3.0)
middleman-alias
middleman-spellcheck!
middleman-swiftype!
poltergeist
pry
Expand All @@ -240,3 +250,6 @@ DEPENDENCIES
tzinfo-data
underscore-rails
wdm (>= 0.1.0)

BUNDLED WITH
1.10.6
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,21 @@ The Guides' content is in the `source` folder. The left nav bar is produced from
`data/pages.yml`. `lib` contains Middleman plugins, and `spec` contains tests
for those plugins.

## Developing with the Guides
## Dependencies

The Guides are built with Middleman, which runs on Ruby 1.9.3 or newer
(2.0.0 recommended).

During build, Middleman will require Aspell to look for misspellings. On Macs, it can be installed via Homebrew:

``` sh
brew install aspell --with-lang-en
```

On Windows, you can download an [installer](http://aspell.net/win32/), but unfortunately it is unmaintained. On Linux, you can install with your distribution's package manager. On all platforms, you can also [build the most recent version from source](http://aspell.net/man-html/Installing.html).

## Developing with the Guides

To get started:

``` sh
Expand All @@ -28,6 +38,11 @@ bundle exec middleman

Then visit [http://localhost:4567/](http://localhost:4567/).

### Spellchecking

If you have a false hit during spellchecking, you can add the word to `/data/spelling-exceptions.txt`.
Words are line seperated and case insensitive.

### Troubleshooting tips for Windows devs

For Windows developers using [RubyInstaller](http://rubyinstaller.org/), you'll need to [download the DevKit](http://rubyinstaller.org/downloads) and install it using instructions:
Expand Down
2 changes: 2 additions & 0 deletions config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def current_chapter(mm_instance, current_page)
# Build
###
configure :build do
set :spellcheck_allow_file, "./data/spelling-exceptions.txt"
activate :spellcheck, ignore_selector: '.CodeRay', page: /^(?!.*stylesheets|.*javascript|.*fonts|.*images|.*analytics).*$/
activate :minify_css
activate :minify_javascript, ignore: /.*examples.*js/
activate :html_proofer
Expand Down
254 changes: 254 additions & 0 deletions data/spelling-exceptions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
foo
accessor
actionhttp
activesupport
addon
addons
ajax
allget
amd
americentric
api
apis
app's
async
asynchronicity
asynchrony
attribute's
autocomplete
autofocus
autoruns
autosave
backburner
backend
backends
beforeeach
belongsto
bindingsee
bookmarklet
boolean
breakpoint
bugfix
bugfixes
camelcase
camelize
chainable
checkbox
checkboxes
cli
clickable
cli's
config
consolesending
controllerslog
createpost
css
customevents
customizations
dasherize
dasherized
data's
databinding
datatype
datepicker
de
debounce
deletedelete
dependenciesnode
deprecations
deserialization
deserialize
deserializer
deserializing
destructuring
django
dom
draggable
ds
durations
ebryn
ECMAScript
embeddedrecordmixin
embeddedrecordsmixin
emberjs
enumerables
env
erroring
evented
facto
falsy
fastboot
filename
findget
firefox
fixesurgent
formaction
formenctype
formmethod
formnovalidate
formtarget
frontend
fullname
gc
geolocation
github
github's
globals
globbing
google
hardcode
hashchange
hasmany
hoc
homebrew
html
htmlbars
http
https
iframe
iframes
indexeddb
inflector
initializer
initializers
inline
inputmode
instantiation
interop
ios
javascript
JavaScript's
jquery
jquery's
js
jshint
json
jsonapi
jsonapiadapter
jsonapiserializer
jsonserializer
keycode
laravel
li
lifecycle
login
lookup
lookups
maxlength
metadata
metamorph
methodobservable
minifying
miscellaneousturn
mixin
mixins
modularity
Mozilla
mut
mysql
namespace
nav
naïve
normalizeresponse
npm
onerror
online
ons
optimizations
param
param's
params
pascalcased
performant
phantomjs
pipelining
pluralizations
polyfill
polyfills
poppopobject
popups
postgresql
pre
preload
prepend
promise's
prs
pseudocode
pushpushobject
qunit
readme
readonly
recordarrays
refactor
relayout
repo
rerender
rerendering
restadapter
reversereverseobjects
routinglog
rsvp
runloop
runloops
runtime
sandboxed
selectiondirection
semver
serializer
serializer's
serializers
shiftshiftobject
sideload
sideloaded
sideloading
spellcheck
sql
stacktraces
stateful
stylesheets
subclassing
subexpression
suboptimal
substate
substates
tabindex
teardown
templates's
templateshovering
templateslog
templating
testee
testem
textarea
textfield
tildeio
todo
todo's
tomhuda
tomster
tradeoffs
transitionto
truthiness
typeahead
ui
ul
unshiftunshiftobject
unsilence
untrusted
updatepatch
upvote
uri
url
url's
urls
usecase
verburl
versa
versioning
viewport
websocket
websockets
wildcard
workflow
xhr
xss

0 comments on commit 7d363cd

Please sign in to comment.