Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Replaced old-style octal literals #63

Closed
wants to merge 3 commits into from

2 participants

M1C Amjad Masad
M1C

Partial fix for #62

M1C

The 2nd commit wasn't intended, but you can still pull it if you want to :)

Amjad Masad
Owner

You're right.
Turns out my coffee-script version is 1.1 and the octal and eval thing is not an issue on my version.
It maybe a good idea to add a package.json file with module versions to avoid issues like that in the future. Nonetheless the issues you've mentioned must be fixed.

I'm pulling the first two commits. The problem with the third one is that its catching a general error (that could be anything) and showing a specific message.

Thanks!

Amjad Masad amasad closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 23, 2012
  1. M1C

    Fixed bug with coffee-script 1.3.1 it now enforces javascript strict …

    M1C authored
    …mode which doesn't allow old-style octal literals
  2. M1C
Commits on Apr 24, 2012
  1. M1C

    Improved the error message ("SECURITY_ERR: DOM Exception 18") when tr…

    M1C authored
    …ying to run jsrepl from the harddisk.
This page is out of date. Refresh to see the latest.
Showing with 36 additions and 7 deletions.
  1. +6 −6 Cakefile
  2. +25 −0 README.md
  3. +5 −1 repl.coffee
12 Cakefile
View
@@ -61,7 +61,7 @@ ensurePathExists = (the_path) ->
current_path = '.'
for part in parts
current_path += '/' + part
- fs.mkdirSync(current_path, 0755) if not path.existsSync current_path
+ fs.mkdirSync(current_path, 0o755) if not path.existsSync current_path
# Builds the interpreter engine including all dependencies for a given language.
buildEngine = (name, lang, callback) ->
@@ -150,15 +150,15 @@ squash = (srcs, outname, minifier, callback) ->
# Bakes the pies, brews the coffee and sets up the lunch table.
task 'bake', 'Build everything for deployment', ->
exec 'rm -rf tmp build', ->
- fs.mkdirSync 'tmp', 0755
- fs.mkdirSync 'build', 0755
+ fs.mkdirSync 'tmp', 0o755
+ fs.mkdirSync 'build', 0o755
console.log "Baking worker."
exec 'cp sandbox.html build', ->
squash WORKER_FILES, 'sandbox.js', DEFAULT_MINIFIER, ->
console.log "Baking languages."
- fs.mkdirSync 'tmp/engines', 0755
- fs.mkdirSync 'build/engines', 0755
+ fs.mkdirSync 'tmp/engines', 0o755
+ fs.mkdirSync 'build/engines', 0o755
langs = loadLanguagesList()
pending_langs = ([i, j] for i,j of langs)
buildNextLang = (callback) ->
@@ -176,7 +176,7 @@ task 'bake', 'Build everything for deployment', ->
fs.readFileSync 'build/jsrepl.js', 'utf8')
fs.writeFileSync 'build/jsrepl.js', contents
# Remove temp folder.
- exec 'rm -rf tmp', 0755, ->
+ exec 'rm -rf tmp', 0o755, ->
console.log 'Done.'
# Watches all coffee files and compiles them live to Javascript.
25 README.md
View
@@ -38,6 +38,31 @@ A sandboxed polyglot browser REPL.
## Getting Started
+###Building JSREPL
+
+#### Build-Dependencies
+##### [node.js](http://nodejs.org/)
+
+##### [npm](http://npmjs.org/)
+`curl http://npmjs.org/install.sh | sh`
+
+##### [CoffeeScript](http://jashkenas.github.com/coffee-script/)
+Using npm (has to be version 1.2.0):
+`npm install -g coffee-script@1.2.0`
+
+#### Getting the source
+##### Cloning the repository
+`git clone git://github.com/replit/jsrepl.git`
+
+##### Source-Dependencies
+`git submodule update --init --recursive`
+
+#### Bake it
+`cake bake`
+
+
+###Including JSREPL
+
Include the built jsrepl script with the id "jsrepl-script".
```html
6 repl.coffee
View
@@ -144,7 +144,11 @@ class Sandbox extends EventEmitter
postCreate()
else
# Workers are supported! \o/
- @worker = new Worker base
+ try
+ @worker = new Worker base
+ catch error
+ throw new Error('Could not create worker, are you trying to run this from file://?')
+ return
@workerIsIframe = false
@worker.addEventListener 'message', @onmsg, false
postCreate()
Something went wrong with that request. Please try again.