yourjs-box 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +30 -4
- package/dist/yourjs-box.full.js +581 -43
- package/dist/yourjs-box.js +8 -8
- package/dist/yourjs-box.min.js +6 -6
- package/package.json +2 -2
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -40,6 +40,7 @@ If the editor already has code in it you are asked before it is replaced.
|
|
|
40
40
|
|
|
41
41
|
### Toolbar
|
|
42
42
|
|
|
43
|
+
- The **⋯** button opens a menu (see below).
|
|
43
44
|
- **Clear** removes everything from the console. Code can also call
|
|
44
45
|
`console.clear()`.
|
|
45
46
|
- The **layout** button switches between showing the editor beside or below
|
|
@@ -50,7 +51,15 @@ If the editor already has code in it you are asked before it is replaced.
|
|
|
50
51
|
- **Run** runs the next block of code.
|
|
51
52
|
- Clicking the **logo** opens the About window, which shows the version, this
|
|
52
53
|
console's settings and keyboard shortcuts.
|
|
53
|
-
-
|
|
54
|
+
- **History** (or <kbd>Alt</kbd>/<kbd>⌥</kbd>+<kbd>H</kbd>) lists the code
|
|
55
|
+
that was run so it can be put back into the editor. Like the browser's
|
|
56
|
+
console, pressing <kbd>↑</kbd> when the cursor is at the very start of
|
|
57
|
+
the editor (with nothing selected) shows the previous code that was run and
|
|
58
|
+
<kbd>↓</kbd> at the very end goes forward again and eventually back to
|
|
59
|
+
the code that hasn't been run yet. After running code from the history, the
|
|
60
|
+
code that hasn't been run yet comes back. Hidden blocks aren't in the
|
|
61
|
+
history.
|
|
62
|
+
- The **⋯** menu has:
|
|
54
63
|
- **Text size**, which is remembered for every console on the same site.
|
|
55
64
|
- **Open**, which loads a JavaScript file as the code that the console starts
|
|
56
65
|
with (its hidden blocks are hidden and Reset goes back to it).
|
|
@@ -69,6 +78,22 @@ If the editor already has code in it you are asked before it is replaced.
|
|
|
69
78
|
(eg. an infinite loop) by starting a new worker.
|
|
70
79
|
- **About JS Box**
|
|
71
80
|
|
|
81
|
+
### Right-Clicking Values
|
|
82
|
+
|
|
83
|
+
Right-click any value in the output (including values inside of expanded
|
|
84
|
+
objects and arrays) for a menu with:
|
|
85
|
+
|
|
86
|
+
- **Copy as JSON** and **Save as JSON…**. Maps and Sets become arrays
|
|
87
|
+
and BigInts become strings. Circular references (an object inside of itself)
|
|
88
|
+
are left out and a message says how many were left out.
|
|
89
|
+
- **Store as global variable**, which stores the actual value (not a copy) as
|
|
90
|
+
`temp1`, `temp2`, etc. so that later code can use it (in window mode it is
|
|
91
|
+
stored on the page's `window`).
|
|
92
|
+
- **Copy property path** (for properties and array items), which copies the
|
|
93
|
+
path from the logged value like `people[0].name`.
|
|
94
|
+
- **Refresh** (for objects, arrays, etc.), which shows the value as it is now
|
|
95
|
+
if the code has changed it. Anything that was expanded stays expanded.
|
|
96
|
+
|
|
72
97
|
### Attributes
|
|
73
98
|
|
|
74
99
|
| Attribute | Description |
|
|
@@ -234,8 +259,9 @@ between blocks.
|
|
|
234
259
|
Install the development dependencies by running `npm install`.
|
|
235
260
|
|
|
236
261
|
- `npm run dev` builds, rebuilds whenever one of the files in `src/` changes
|
|
237
|
-
and serves the examples at http://localhost:3000/examples/
|
|
238
|
-
reloading automatically after each
|
|
262
|
+
and serves the examples at http://localhost:3000/examples/ (opening them in
|
|
263
|
+
your default browser) with the browser reloading automatically after each
|
|
264
|
+
rebuild. Use `BROWSER=none npm run dev` to keep it from opening a browser.
|
|
239
265
|
- `npm run build` builds the files in `dist/` once.
|
|
240
266
|
- `npm test` builds and then runs the browser tests in `test/run.js` using your
|
|
241
267
|
installed copy of Google Chrome (set `CHROME_PATH` to use another Chromium
|
|
@@ -274,4 +300,4 @@ Released under the [MIT License](LICENSE). You're free to use, modify and
|
|
|
274
300
|
distribute it, including in commercial projects, as long as the copyright and
|
|
275
301
|
license notice is kept.
|
|
276
302
|
|
|
277
|
-
Copyright (c) 2023-present
|
|
303
|
+
Copyright (c) 2023-present Chris West
|