Skip to content

Commit 19adc8b

Browse files
code refactoring, updated flow-bin to 0.66.0, added carbon code screenshot feature, fixed some small bugs
1 parent 068c9b9 commit 19adc8b

File tree

104 files changed

+250
-19154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+250
-19154
lines changed

Diff for: CONTRIBUTING.md

+1-11
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,7 @@ Working on your first Pull Request? You can learn how from this *free* series, [
1616

1717
## Submitting code
1818

19-
Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. If necessary, the description should also contain screenshots showing up the new behaviour.
20-
21-
You can notice that in the main folder of the plugin there is a file named something like `_generated_2018_01_28_at_03_01_29.py`. This file is compiled executing `python3 make/setup.py` and it contains the whole plugin code. So, if you want to make changes/updates to this plugin, don't change this file. Instead change the other files that you can find in the `src` folder. The `src/_init.py` file contains the main code to boot up the plugin, with various constants.
22-
23-
Syntax accepted by `make/setup.py`:
24-
* `${include ./folder/file.py}`: with `./` at the beginning of the path, you are pointing to the root path of the plugin folder, like an "absolute path"
25-
* `${include folder/file.py}`: in this case this is a relative path to the current folder
26-
27-
With this, you can separate your code in different files that will be added to the final compiled code.
28-
29-
To test the plugin changes/updates quickly, you can execute `python3 make/watch.py`. So, for every changes that you make in the code, it will call automatically `make/setup.py`. If you add new files while you are using `python3 make/watch.py`, it may require restart the command in order to allow the change/update recognition of these new files.
19+
Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. If necessary, the description should also contain screenshots showing up the new behaviour. The pull request should also contain tests.
3020

3121
## Code review process
3222

Diff for: Context.sublime-menu

+67-61
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"children": [
66
{
77
"caption": "Evaluate JavaScript",
8-
"id": "evaluate_javascript",
9-
"command": "evaluate_javascript",
8+
"id": "javascript_enhancements_evaluate_javascript",
9+
"command": "javascript_enhancements_evaluate_javascript",
1010
},
1111
{ "caption": "-" },
1212
{
1313
"caption": "Evaluate JavaScript on this line",
14-
"id": "evaluate_javascript_line",
15-
"command": "evaluate_javascript",
14+
"id": "javascript_enhancements_evaluate_javascript_line",
15+
"command": "javascript_enhancements_evaluate_javascript",
1616
"args": {
1717
"is_line": true
1818
}
@@ -21,61 +21,61 @@
2121
},
2222
{"caption": "-"},
2323
{
24-
"caption": "Split string lines to variable",
25-
"id": "split_string_lines_to_variable",
26-
"command": "split_string_lines_to_variable",
24+
"caption": "String lines to concat",
25+
"id": "javascript_enhancements_string_lines_to_concat",
26+
"command": "javascript_enhancements_string_lines_to_concat",
2727
"args": {"case": "split"}
2828
},
2929
{
30-
"id": "open_termival_view_here",
3130
"caption": "Open TerminalView Here…",
32-
"command": "open_termival_view_here"
31+
"id": "javascript_enhancements_open_termival_view_here",
32+
"command": "javascript_enhancements_open_termival_view_here"
3333
},
3434
{"caption": "-"},
3535
{
3636
"caption": "Can I use?",
37-
"id": "can_i_use",
38-
"command": "can_i_use"
37+
"id": "javascript_enhancements_can_i_use",
38+
"command": "javascript_enhancements_can_i_use"
3939
},
4040
{ "caption": "-" },
4141
{
4242
"caption": "Sort array ASC",
43-
"command": "sort_array",
44-
"id": "sort_array_asc",
43+
"command": "javascript_enhancements_sort_array",
44+
"id": "javascript_enhancements_sort_array_asc",
4545
"args": {"case": "compare_func_asc"}
4646
},
4747
{
4848
"caption": "Sort array DESC",
49-
"command": "sort_array",
50-
"id": "sort_array_desc",
49+
"command": "javascript_enhancements_sort_array",
50+
"id": "javascript_enhancements_sort_array_desc",
5151
"args": {"case": "compare_func_desc"}
5252
},
5353
{
5454
"caption": "Sort array alphabetically ASC",
55-
"command": "sort_array",
56-
"id": "sort_array_desc",
55+
"command": "javascript_enhancements_sort_array",
56+
"id": "javascript_enhancements_sort_array_desc",
5757
"args": {"case": "alpha_asc"}
5858
},
5959
{
6060
"caption": "Sort array alphabetically DESC",
61-
"command": "sort_array",
62-
"id": "sort_array_desc",
61+
"command": "javascript_enhancements_sort_array",
62+
"id": "javascript_enhancements_sort_array_desc",
6363
"args": {"case": "alpha_desc"}
6464
},
6565
{ "caption": "-" },
6666
{
6767
"caption": "Create Class from object literal",
68-
"command": "create_class_from_object_literal",
69-
"id": "create_class_from_object_literal"
68+
"command": "javascript_enhancements_create_class_from_object_literal",
69+
"id": "javascript_enhancements_create_class_from_object_literal"
7070
},
7171
{ "caption": "-" },
7272
{
7373
"caption": "JavaScript Refactor",
74-
"id": "refactor",
74+
"id": "javascript_enhancements_refactor",
7575
"children": [
7676
{
7777
"caption": "Converto to arrow function",
78-
"command": "refactor",
78+
"command": "javascript_enhancements_refactor",
7979
"args": {
8080
"case": "convert_to_arrow_function"
8181
}
@@ -86,23 +86,23 @@
8686
"children": [
8787
{
8888
"caption": "Function",
89-
"command": "refactor",
89+
"command": "javascript_enhancements_refactor",
9090
"args": {
9191
"case": "export",
9292
"type": "function"
9393
}
9494
},
9595
{
9696
"caption": "Class",
97-
"command": "refactor",
97+
"command": "javascript_enhancements_refactor",
9898
"args": {
9999
"case": "export",
100100
"type": "class"
101101
}
102102
},
103103
{
104104
"caption": "Variable",
105-
"command": "refactor",
105+
"command": "javascript_enhancements_refactor",
106106
"args": {
107107
"case": "export",
108108
"type": "variable"
@@ -113,21 +113,21 @@
113113
{ "caption": "-" },
114114
{
115115
"caption": "Safe Copy",
116-
"command": "refactor",
116+
"command": "javascript_enhancements_refactor",
117117
"args": {
118118
"case": "safe_copy"
119119
}
120120
},
121121
{
122122
"caption": "Safe Move",
123-
"command": "refactor",
123+
"command": "javascript_enhancements_refactor",
124124
"args": {
125125
"case": "safe_move"
126126
}
127127
},
128128
{
129129
"caption": "Safe Delete",
130-
"command": "refactor",
130+
"command": "javascript_enhancements_refactor",
131131
"args": {
132132
"case": "safe_delete"
133133
}
@@ -138,29 +138,29 @@
138138
"children": [
139139
{
140140
"caption": "Variable",
141-
"command": "refactor",
141+
"command": "javascript_enhancements_refactor",
142142
"args": {
143143
"case": "extract_variable"
144144
}
145145
},
146146
{
147147
"caption": "Field",
148-
"command": "refactor",
148+
"command": "javascript_enhancements_refactor",
149149
"args": {
150150
"case": "extract_field"
151151
}
152152
},
153153
{
154154
"caption": "Parameter",
155-
"command": "refactor",
155+
"command": "javascript_enhancements_refactor",
156156
"args": {
157157
"case": "extract_parameter"
158158
}
159159
},
160160
{ "caption": "-" },
161161
{
162162
"caption": "Method",
163-
"command": "refactor",
163+
"command": "javascript_enhancements_refactor",
164164
"args": {
165165
"case": "extract_method"
166166
}
@@ -171,124 +171,130 @@
171171
},
172172
{
173173
"caption": "Surround With",
174-
"id": "surround_with",
174+
"id": "javascript_enhancements_surround_with",
175175
"children": [
176176
{
177177
"caption": "if statement",
178-
"command": "surround_with",
178+
"command": "javascript_enhancements_surround_with",
179179
"args": {"case": "if_statement"}
180180
},
181181
{
182182
"caption": "if else statement (2 selections)",
183-
"command": "surround_with",
183+
"command": "javascript_enhancements_surround_with",
184184
"args": {"case": "if_else_statement"}
185185
},
186186
{
187187
"caption": "while statement",
188-
"command": "surround_with",
188+
"command": "javascript_enhancements_surround_with",
189189
"args": {"case": "while_statement"}
190190
},
191191
{
192192
"caption": "do while statement",
193-
"command": "surround_with",
193+
"command": "javascript_enhancements_surround_with",
194194
"args": {"case": "do_while_statement"}
195195
},
196196
{
197197
"caption": "for statement",
198-
"command": "surround_with",
198+
"command": "javascript_enhancements_surround_with",
199199
"args": {"case": "for_statement"}
200200
},
201201
{
202202
"caption": "try catch statement",
203-
"command": "surround_with",
203+
"command": "javascript_enhancements_surround_with",
204204
"args": {"case": "try_catch_statement"}
205205
},
206206
{
207207
"caption": "try finally statement",
208-
"command": "surround_with",
208+
"command": "javascript_enhancements_surround_with",
209209
"args": {"case": "try_finally_statement"}
210210
},
211211
{
212212
"caption": "try catch finally statement",
213-
"command": "surround_with",
213+
"command": "javascript_enhancements_surround_with",
214214
"args": {"case": "try_catch_finally_statement"}
215215
},
216216
{ "caption": "-" },
217217
{
218218
"caption": "function",
219-
"command": "surround_with",
219+
"command": "javascript_enhancements_surround_with",
220220
"args": {"case": "function"}
221221
},
222222
{
223223
"caption": "anonymous function",
224-
"command": "surround_with",
224+
"command": "javascript_enhancements_surround_with",
225225
"args": {"case": "anonymous_function"}
226226
},
227227
{
228228
"caption": "arrow function",
229-
"command": "surround_with",
229+
"command": "javascript_enhancements_surround_with",
230230
"args": {"case": "arrow_function"}
231231
},
232232
{
233233
"caption": "async function",
234-
"command": "surround_with",
234+
"command": "javascript_enhancements_surround_with",
235235
"args": {"case": "async_function"}
236236
},
237237
{
238238
"caption": "iife function",
239-
"command": "surround_with",
239+
"command": "javascript_enhancements_surround_with",
240240
"args": {"case": "iife_function"}
241241
},
242242
{
243243
"caption": "generator function",
244-
"command": "surround_with",
244+
"command": "javascript_enhancements_surround_with",
245245
"args": {"case": "generator_function"}
246246
},
247247
{
248248
"caption": "block {}",
249-
"command": "surround_with",
249+
"command": "javascript_enhancements_surround_with",
250250
"args": {"case": "block"}
251251
}
252252
]
253253
},
254254
{
255255
"caption": "Delete Surrounded",
256-
"id": "delete_surrounded",
256+
"id": "javascript_enhancements_delete_surrounded",
257257
"children": [
258258
{
259259
"caption": "Strip quoted string",
260-
"command": "delete_surrounded",
260+
"command": "javascript_enhancements_delete_surrounded",
261261
"args": {"case": "strip_quoted_string"}
262262
}
263263
]
264264
},
265265
{ "caption": "-" },
266266
{
267267
"caption": "Sort JavaScript Imports",
268-
"id": "sort_javascript_imports",
269-
"command": "sort_javascript_imports"
268+
"id": "javascript_enhancements_sort_imports",
269+
"command": "javascript_enhancements_sort_imports"
270270
},
271271
{
272272
"caption": "Expand Abbreviation",
273-
"id": "expand_abbreviation",
274-
"command": "expand_abbreviation"
273+
"id": "javascript_enhancements_expand_abbreviation",
274+
"command": "javascript_enhancements_expand_abbreviation"
275275
},
276276
{ "caption": "-" },
277277
{
278278
"caption": "Add Project Bookmark here",
279-
"id": "add_project_bookmark_here",
280-
"command": "add_project_bookmark_here"
279+
"id": "javascript_enhancements_add_project_bookmark_here",
280+
"command": "javascript_enhancements_add_project_bookmark_here"
281281
},
282282
{ "caption": "-" },
283283
{
284284
"caption": "Flow Goto Definition",
285-
"id": "go_to_def",
286-
"command": "go_to_def"
285+
"id": "javascript_enhancements_go_to_definition",
286+
"command": "javascript_enhancements_go_to_definition"
287287
},
288288
{ "caption": "-" },
289289
{
290290
"caption": "Show Hint Parameters",
291-
"id": "show_hint_parameters",
292-
"command": "show_hint_parameters"
291+
"id": "javascript_enhancements_show_hint_parameters",
292+
"command": "javascript_enhancements_show_hint_parameters"
293+
},
294+
{ "caption": "-" },
295+
{
296+
"caption": "Get AST",
297+
"id": "javascript_enhancements_get_ast",
298+
"command": "javascript_enhancements_get_ast"
293299
}
294300
]

Diff for: Default.sublime-commands

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[
2-
{ "caption": "JavaScript Enhancements Bookmarks: Toggle on Current View", "command": "toggle_project_bookmarks"},
3-
{ "caption": "JavaScript Enhancements Bookmarks: Show All on Current Project", "command": "show_project_bookmarks", "args": {"type": "global_project"} },
4-
{ "caption": "JavaScript Enhancements Bookmarks: Show on Current View Project", "command": "show_project_bookmarks", "args": {"type": "view_project"} },
5-
{ "caption": "JavaScript Enhancements Bookmarks: Delete All on Current Project", "command": "delete_project_bookmarks", "args": {"type": "global_project"} },
6-
{ "caption": "JavaScript Enhancements Bookmarks: Delete All on Current View Project", "command": "delete_project_bookmarks", "args": {"type": "view_project"} },
7-
{ "caption": "JavaScript Enhancements Bookmarks: Delete one on Current View Project", "command": "delete_project_bookmarks", "args": {"type": "single_view_project"} },
8-
{ "caption": "JavaScript Enhancements Bookmarks: Next", "command": "navigate_project_bookmarks", "args": {"type": "next"} },
9-
{ "caption": "JavaScript Enhancements Bookmarks: Previous", "command": "navigate_project_bookmarks", "args": {"type": "previous"} },
10-
{ "caption": "Flow: Next Error", "command": "navigate_flow_errors", "args": {"type": "next"} },
11-
{ "caption": "Flow: Previous Error", "command": "navigate_flow_errors", "args": {"type": "previous"} },
12-
{ "caption": "Unused Variable: Next", "command": "navigate_unused_variables", "args": {"type": "next"} },
13-
{ "caption": "Unused Variable: Previous", "command": "navigate_unused_variables", "args": {"type": "previous"} }
2+
{ "caption": "JavaScript Enhancements Bookmarks: Toggle on Current View", "command": "javascript_enhancements_toggle_project_bookmarks"},
3+
{ "caption": "JavaScript Enhancements Bookmarks: Show All on Current Project", "command": "javascript_enhancements_show_project_bookmarks", "args": {"type": "global_project"} },
4+
{ "caption": "JavaScript Enhancements Bookmarks: Show on Current View Project", "command": "javascript_enhancements_show_project_bookmarks", "args": {"type": "view_project"} },
5+
{ "caption": "JavaScript Enhancements Bookmarks: Delete All on Current Project", "command": "javascript_enhancements_delete_project_bookmarks", "args": {"type": "global_project"} },
6+
{ "caption": "JavaScript Enhancements Bookmarks: Delete All on Current View Project", "command": "javascript_enhancements_delete_project_bookmarks", "args": {"type": "view_project"} },
7+
{ "caption": "JavaScript Enhancements Bookmarks: Delete one on Current View Project", "command": "javascript_enhancements_delete_project_bookmarks", "args": {"type": "single_view_project"} },
8+
{ "caption": "JavaScript Enhancements Bookmarks: Next", "command": "javascript_enhancements_navigate_project_bookmarks", "args": {"type": "next"} },
9+
{ "caption": "JavaScript Enhancements Bookmarks: Previous", "command": "javascript_enhancements_navigate_project_bookmarks", "args": {"type": "previous"} },
10+
{ "caption": "JavaScript Enhancements Flow: Next Error", "command": "javascript_enhancements_navigate_flow_errors", "args": {"type": "next"} },
11+
{ "caption": "JavaScript Enhancements Flow: Previous Error", "command": "javascript_enhancements_navigate_flow_errors", "args": {"type": "previous"} },
12+
{ "caption": "JavaScript Enhancements Unused Variable: Next", "command": "javascript_enhancements_navigate_unused_variables", "args": {"type": "next"} },
13+
{ "caption": "JavaScript Enhancements Unused Variable: Previous", "command": "javascript_enhancements_navigate_unused_variables", "args": {"type": "previous"} }
1414
]

0 commit comments

Comments
 (0)