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

Auto parse json.ls with lsc #884

Closed
wants to merge 1 commit into from
Closed

Auto parse json.ls with lsc #884

wants to merge 1 commit into from

Conversation

nekdolan
Copy link

This change lets you auto compile required json.ls files in ls scripts with the node-livescript executable.

@@ -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

@gkz gkz closed this in 2f7876b May 15, 2016
This was referenced Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants