-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
265 lines (222 loc) · 12.6 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
/* cspell:disable */
tsup/8.2.2
Usage:
$ tsup [...files]
Commands:
[...files] Bundle files
For more info, run any command with the `--help` flag:
$ tsup --help
Options:
--entry.* <file> Use a key-value pair as entry files
-d, --out-dir <dir> Output directory (default: dist)
--format <format> Bundle format, "cjs", "iife", "esm" (default: cjs)
--minify [terser] Minify bundle
--minify-whitespace Minify whitespace
--minify-identifiers Minify identifiers
--minify-syntax Minify syntax
--keep-names Keep original function and class names in minified code
--target <target> Bundle target, "es20XX" or "esnext" (default: es2017)
--legacy-output Output different formats to different folder instead of using different extensions
--dts [entry] Generate declaration file
--dts-resolve Resolve externals types used for d.ts files
--dts-only Emit declaration files only
--experimental-dts [entry] Generate declaration file (experimental)
--sourcemap [inline] Generate external sourcemap, or inline source: --sourcemap inline
--watch [path] Watch mode, if path is not specified, it watches the current folder ".". Repeat "--watch" for more than one path
--ignore-watch <path> Ignore custom paths in watch mode
--onSuccess <command> Execute command after successful build, specially useful for watch mode
--env.* <value> Define compile-time env variables
--inject <file> Replace a global variable with an import from another file
--define.* <value> Define compile-time constants
--external <name> Mark specific packages / package.json (dependencies and peerDependencies) as external
--global-name <name> Global variable name for iife format
--jsxFactory <jsxFactory> Name of JSX factory function (default: React.createElement)
--jsxFragment <jsxFragment> Name of JSX fragment function (default: React.Fragment)
--replaceNodeEnv Replace process.env.NODE_ENV
--no-splitting Disable code splitting (default: true)
--clean Clean output directory
--silent Suppress non-error logs (excluding "onSuccess" process output)
--pure <express> Mark specific expressions as pure
--metafile Emit esbuild metafile (a JSON file)
--platform <platform> Target platform (default: node)
--loader <ext=loader> Specify the loader for a file extension
--tsconfig <filename> Use a custom tsconfig
--config <filename> Use a custom config file
--no-config Disable config file (default: true)
--shims Enable cjs and esm shims
--inject-style Inject style tag to document head
--treeshake [strategy] Using Rollup for treeshaking instead, "recommended" or "smallest" or "safest"
--publicDir [dir] Copy public directory to output directory
--killSignal <signal> Signal to kill child process, "SIGTERM" or "SIGKILL"
--cjsInterop Enable cjs interop
-h, --help Display this message
-v, --version Display version number
Disable Checking
/* cSpell:disable */
/* spell-checker: disable */
/* spellchecker: disable */
/* cspell: disable-line */
/* cspell: disable-next-line */
Enable Checking
/* cSpell:enable */
/* spell-checker: enable */
/* spellchecker: enable */
Example
// cSpell:disable
const wackyWord = ['zaallano', 'wooorrdd', 'zzooommmmmmmm'];
/* cSpell:enable */
// Nest disable / enable is not Supported
// spell-checker:disable
// It is now disabled.
var liep = 1;
// It is still disabled
// cSpell:enable
// It is now enabled
const str = 'goededag'; // <- will be flagged as an error.
// spell-checker:enable <- doesn't do anything
// cSPELL:DISABLE <-- also works.
// if there isn't an enable, spelling is disabled till the end of the file.
const str = 'goedemorgen'; // <- will NOT be flagged as an error.
Ignore
Ignore allows you the specify a list of words you want to ignore within the document.
// cSpell:ignore zaallano, wooorrdd
// cSpell:ignore zzooommmmmmmm
const wackyWord = ['zaallano', 'wooorrdd', 'zzooommmmmmmm'];
Note: words defined with ignore will be ignored for the entire file.
Words
The words list allows you to add words that will be considered correct and will be used as suggestions.
// cSpell:words woorxs sweeetbeat
const companyName = 'woorxs sweeetbeat';
Note: words defined with words will be used for the entire file.
Enable / Disable compound words
In some programming language it is common to glue words together.
// cSpell:enableCompoundWords
char * errormessage; // Is ok with cSpell:enableCompoundWords
int errornumber; // Is also ok.
Note: Compound word checking cannot be turned on / off in the same file. The last setting in the file determines the value for the entire file.
Excluding and Including Text to be checked.
By default, the entire document is checked for spelling. cSpell:disable/cSpell:enable above allows you to block off sections of the document. ignoreRegExp and includeRegExp give you the ability to ignore or include patterns of text. By default the flags gim are added if no flags are given.
The spell checker works in the following way:
Find all text matching includeRegExp
Remove any text matching excludeRegExp
Check the remaining text.
Exclude Example
// cSpell:ignoreRegExp 0x[0-9a-f]+ -- will ignore c style hex numbers
// cSpell:ignoreRegExp /0x[0-9A-F]+/g -- will ignore upper case c style hex numbers.
// cSpell:ignoreRegExp g{5} h{5} -- will only match ggggg, but not hhhhh or 'ggggg hhhhh'
// cSpell:ignoreRegExp g{5}|h{5} -- will match both ggggg and hhhhh
// cSpell:ignoreRegExp /g{5} h{5}/ -- will match 'ggggg hhhhh'
/* cSpell:ignoreRegExp /n{5}/ -- will NOT work as expected because of the ending comment -> */
/*
cSpell:ignoreRegExp /q{5}/ -- will match qqqqq just fine but NOT QQQQQ
*/
// cSpell:ignoreRegExp /[^\s]{40,}/ -- will ignore long strings with no spaces.
// cSpell:ignoreRegExp Email -- this will ignore email like patterns -- see Predefined RegExp expressions
var encodedImage = 'HR+cPzr7XGAOJNurPL0G8I2kU0UhKcqFssoKvFTR7z0T3VJfK37vS025uKroHfJ9nA6WWbHZ/ASn...';
var email1 = '[email protected]';
var email2 = '<[email protected]>';
Note: ignoreRegExp and includeRegExp are applied to the entire file. They do not start and stop.
Include Example
In general you should not need to use includeRegExp. But if you are mixing languages then it could come in helpful.
# cSpell:includeRegExp #.*
# cSpell:includeRegExp /(["]{3}|[']{3})[^\1]*?\1/g
# only comments and block strings will be checked for spelling.
def sum_it(self, seq):
"""This is checked for spelling"""
variabele = 0
alinea = 'this is not checked'
for num in seq:
# The local state of 'value' will be retained between iterations
variabele += num
yield variabele
Predefined RegExp expressions
Exclude patterns
Urls1 -- Matches urls
HexValues -- Matches common hex format like #aaa, 0xfeef, \u0134
EscapeCharacters1 -- matches special characters: \n, \t etc.
Base641 -- matches base64 blocks of text longer than 40 characters.
Email -- matches most email addresses.
Include Patterns
Everything1 -- By default we match an entire document and remove the excludes.
string -- This matches common string formats like '...', "...", and `...`
CStyleComment -- These are C Style comments /* */ and //
PhpHereDoc -- This matches PHPHereDoc strings.
=============================================================================================================================================/////
Usage: babel [options] <files ...>
Options:
-f, --filename [filename] The filename to use when reading from stdin. This will be used in source-maps, errors etc.
--presets [list] A comma-separated list of preset names.
--plugins [list] A comma-separated list of plugin names.
--config-file [path] Path to a .babelrc file to use.
--env-name [name] The name of the 'env' to use when loading configs and plugins. Defaults to the value of BABEL_ENV, or else NODE_ENV, or else
'development'.
--root-mode [mode] The project-root resolution mode. One of 'root' (the default), 'upward', or 'upward-optional'.
--source-type [script|module]
--no-babelrc Whether or not to look up .babelrc and .babelignore files.
--ignore [list] List of glob paths to **not** compile.
--only [list] List of glob paths to **only** compile.
--no-highlight-code Enable or disable ANSI syntax highlighting of code frames. (on by default)
--no-comments Write comments to generated output. (true by default)
--retain-lines Retain line numbers. This will result in really ugly code.
--compact [true|false|auto] Do not include superfluous whitespace characters and line terminators.
--minified Save as many bytes when printing. (false by default)
--auxiliary-comment-before [string] Print a comment before any injected non-user code.
--auxiliary-comment-after [string] Print a comment after any injected non-user code.
-s, --source-maps [true|false|inline|both]
--source-map-target [string] Set `file` on returned source map.
--source-file-name [string] Set `sources[0]` on returned source map.
--source-root [filename] The root from which all sources are relative.
--module-root [filename] Optional prefix for the AMD module formatter that will be prepended to the filename on module definitions.
-M, --module-ids Insert an explicit id for modules.
--module-id [string] Specify a custom name for module ids.
-x, --extensions [extensions] List of extensions to compile when a directory has been the input. [.js,.jsx,.es6,.es,.mjs,.cjs]
--keep-file-extension Preserve the file extensions of the input files.
-w, --watch Recompile files on changes.
--skip-initial-build Do not compile files before watching.
-o, --out-file [out] Compile all input files into a single file.
-d, --out-dir [out] Compile an input directory of modules into an output directory.
--relative Compile into an output directory relative to input directory or file. Requires --out-dir [out]
-D, --copy-files When compiling a directory copy over non-compilable files.
--include-dotfiles Include dotfiles when compiling and copying non-compilable files.
--no-copy-ignored Exclude ignored files when copying non-compilable files.
--verbose Log everything. This option conflicts with --quiet
--quiet Don't log anything. This option conflicts with --verbose
--delete-dir-on-start Delete the out directory before compilation.
--out-file-extension [string] Use a specific extension for the output files
-V, --version output the version number
-h, --help display help for command
===========================================
import PreactSocialIcon from "jsx-social-icons/preact";
export function Home() {
return (
<div>
<PreactSocialIcon
name="github"
href="https://github.com"
size={36}
fillColor="#673ab8"
fillOpacity={0.9}
title="Link to my github profile"
target="_blank"
className="My class"
/>
</div>
);
}
import ReactSocialIcon from "jsx-social-icons/react";
export function Home() {
return (
<main>
<ReactSocialIcon
name="github"
href="https://github.com"
size={36}
fillColor="#673ab8"
fillOpacity={0.9}
title="Link to my github profile"
target="_blank"
className="My class"
/>
</main>
);
}