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

Commit

Permalink
A few more instructions about how to get the lexer running in a browser.
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Mar 27, 2011
1 parent be24d86 commit b1d9b9d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "http://rubygems.org"
gemspec

unless ENV['TM_RUBY']
if !ENV['TM_RUBY'] && File.directory?('../cucumber')
@dependencies.reject!{|dep| dep.name == 'cucumber'}
gem 'cucumber', :path => '../cucumber'
end
14 changes: 13 additions & 1 deletion README_JAVASCRIPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,16 @@ Or: (using therubyracer)

rake js/lib/gherkin/lexer/i18n/en.js && ruby js/example/print.rb spec/gherkin/fixtures/1.feature

That prints gherkin to stdout - almost like the original. Well, not quite, but you get the idea. We're firing events.
That prints gherkin to stdout - almost like the original. Well, not quite, but you get the idea. We're firing events.

Trying out the lexer in a browser (only tried with Chrome)
==========================================================

After you have built the lexer (see steps above), pull in the Ace editor:

git submodule update --init

(This is not *really* needed in order to test the lexer, but it's nice to see gherkin.js playing
nice along with Ace - they will most likely be used together). Open the demo page:

open js/example/index.html
2 changes: 1 addition & 1 deletion js/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<body>
<div id="editor"># This is just a demo of syntax highlighting
# And very basic syntax checking (based on gherkin.js)
# Try to introduce a syntax error (Replace Scenario with a different
# Try to introduce a syntax error (Replace When with a different
# string). This will colour that line red.
Feature: Hello World
Scenario: Look Ma
Expand Down

0 comments on commit b1d9b9d

Please sign in to comment.