tpae / node-repl Goto Github PK
View Code? Open in Web Editor NEWJavaScript Read-Eval-Print-Loop (REPL) for Atom
License: MIT License
JavaScript Read-Eval-Print-Loop (REPL) for Atom
License: MIT License
It would be great if we could support colors on our output. On error, we can display red, and have the ability to differentiate between traditional console output and system messages.
I tried installing in the directory there I have my file that I'm editing with REPL but does not work
As of now, we don't get any error messages back. That's because our repl doesn't generate any. We need to catch them explicitly.
See: https://nodejs.org/api/repl.html#repl_recoverable_errors
When Node Repl is installed the default hotkey is CMD+W which is an OS X hotkey to close a tab.
Expected behavior: Hotkey is set to something other than a necessary system hotkey (OPT+CMD+R, OPT+CMD+W)
Current Behavior: Hotkey is set to CMD+W which hinders OS X workflow.
[Enter steps to reproduce:]
Atom: 1.21.1 x64
Electron: 1.6.15
OS: Mac OS X 10.12.6
Thrown From: node-repl package 0.5.0
Uncaught ReferenceError: element is not defined
At ~/.atom/packages/node-repl/lib/node-repl-view.js:38
ReferenceError: element is not defined
at HTMLDocument.resize (/packages/node-repl/lib/node-repl-view.js:38:23)
-0:51.8.0 command-palette:toggle (input.hidden-input)
-0:48 core:confirm (input.hidden-input)
-0:48 node-repl:run (input.hidden-input)
-0:45.3.0 command-palette:toggle (input.hidden-input)
-0:39.7.0 core:select-all (input.hidden-input)
-0:38 core:confirm (input.hidden-input)
-0:38 node-repl:run (input.hidden-input)
-0:36.2.0 core:select-all (input.hidden-input)
-0:33.7.0 command-palette:toggle (input.hidden-input)
-0:32.2.0 core:confirm (input.hidden-input)
-0:32.2.0 node-repl:run (input.hidden-input)
-0:30.8.0 command-palette:toggle (input.hidden-input)
-0:28.4.0 core:select-all (input.hidden-input)
2x -0:26.6.0 core:move-down (input.hidden-input)
-0:25.9.0 core:confirm (input.hidden-input)
-0:25.9.0 node-repl:toggle (input.hidden-input)
atom-beautify 0.30.5
atom-bootstrap3 1.2.12
atom-clock 0.1.15
atom-ctags 5.1.2
atom-handlebars 1.3.0
atom-jade 0.3.0
atom-jinja2 0.6.0
atom-material-syntax 1.0.7
atom-material-ui 2.0.6
atom-runner 2.7.1
atom-typescript 11.0.10
auto-detect-indentation 1.3.0
auto-indent 0.5.0
auto-update-packages 1.0.1
autoclose-html 0.23.0
autocomplete-ctags 0.4.1
autocomplete-java 1.2.7
autocomplete-modules 1.7.3
beacon-ui 0.5.0
busy-signal 1.4.3
chester-atom-syntax 0.3.0
chestnut-light-atom-syntax 0.2.1
chrome-color-picker 0.8.0
click-link 1.0.11
coffee-compile 0.27.0
docblockr 0.11.0
docker 0.8.0
dracula-syntax 2.0.5
dracula-theme 1.2.8
dracula-ui 0.6.0
editorconfig 2.2.2
file-types 0.5.5
flatten-json 0.1.5
font-viewer 0.3.1
fonts 3.0.3
git-plus 7.10.0
goto 1.8.3
html2haml 0.10.0
html2jade-plus 1.0.0
intentions 1.1.5
isotope-ui 2.8.5
jade 1.2.0
jade-autocompile 0.8.5
jade-beautify 0.1.5
javascript-snippets 1.2.1
js2coffee 0.19.1
language-apache 1.7.0
language-babel 2.76.1
language-docker 1.1.8
language-dotenv 1.1.1
language-generic-config 1.4.0
language-groovy 0.7.0
language-haml 0.25.2
language-hocon 1.1.0
language-jade 0.7.2
language-javascript-jsx 0.3.7
language-log 1.9.0
language-nginx 0.8.0
language-pug 0.0.21
language-scala 1.1.9
language-svg 0.9.2
language-twig 1.6.3
last-cursor-position 0.9.2
linter 2.2.0
linter-coffeelint 1.3.1
linter-csslint 2.0.0
linter-handlebars 2.5.0
linter-js-standard 4.0.2
linter-jshint 3.1.6
linter-jsonlint 1.3.0
linter-rubocop 2.2.0
linter-sass-lint 1.8.3
linter-stylelint 4.0.2
linter-ui-default 1.6.10
node-repl 0.5.0
open-git-modified-files 0.2.4
open-recent 5.0.0
php-twig 4.0.0
platformio-ide-terminal 2.7.0
pretty-json 1.6.4
pristine-ui 1.1.10
project-manager 3.3.5
react-snippets 1.0.0
remote-edit 1.9.0
ruby-test 1.0.2
scala-worksheet-plus 0.5.0
sepia-syntax 1.1.0
snippets-jade 0.2.2
sort-lines 0.18.0
spacegray-atom-dark-syntax 1.3.2
split-diff 1.5.1
Sublime-Style-Column-Selection 1.7.4
svg-preview 0.11.0
sync-settings 0.8.3
tabs-to-spaces 1.0.3
term3 0.22.1
tidy-markdown 3.0.1
Zen 0.18.0
As a developer, I should be able to highlight a selection (snippet) of code and run it in REPL.
I have some ideas for functionality, better keybinding support, and layout.
This is a great project, I am constantly using the babel repl
to execute small scripts are spin up quick ideas. Having this within the editor is great.
Would love to help!
On most REPL, the input should also come from direct input, in our case, the keyboard.
The challenge of adding this, is that we need to listen on keyboard events, rather than using a traditional input field.
So, the current keymapping on macOS is the same as closing windows (cmd+w
) and fuzzy-finder (cmd+t
).
I (currently) have mine setup to be all ctrl
based:
'atom-workspace':
'ctrl-r': 'node-repl:run'
'ctrl-w': 'node-repl:toggle'
'ctrl-c': 'node-repl:clear'
However, we could take a cue from the atom core team and make platform-dependent keybindings…
Like:
{
"atom-workspace": {
"ctrl-shift-r": "node-repl:run",
"ctrl-shift-w": "node-repl:toggle",
"ctrl-shift-c": "node-repl:clear",
},
".platform-darwin atom-workspace": {
"ctrl-r": "node-repl:run",
"ctrl-w": "node-repl:toggle",
"ctrl-c": "node-repl:clear",
}
}
Any thoughts in one direction or the other?
As a developer, it would be nice to see how long it took to execute a certain snippet.
I'm guessing we can use this: https://nodejs.org/api/console.html#console_console_time_label
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.