Skip to content
Closed
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
20 changes: 14 additions & 6 deletions lib/node.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/node.ls
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ module.exports = !(LiveScript) ->
LiveScript <<<< events.EventEmitter.prototype

require.extensions.'.ls' = (module, filename) ->
js = LiveScript.compile (fs.read-file-sync filename, 'utf8'), {filename, +bare, map: "embedded"} .code
file = (fs.read-file-sync filename, 'utf8')
if (filename.substr -7) is 'json.ls'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. that's not our codestyle
  2. doesn't work with foobarjson.ls.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vendethiel can you give me some hints or instructions for the code style? I am a beginner when it comes to livescript and functional programming.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just look at the rest of the codebase

and for the second point, check one more char

js = 'module.exports = ' + LiveScript.compile file, {filename, +json}
else
js = LiveScript.compile file, {filename, +bare, map: "embedded"} .code
try
module._compile js, filename
catch
Expand Down