├── .gitignore ├── LICENSE ├── README.md ├── codeVar ├── Adaptor │ └── ApiAdaptor.js ├── README.md ├── logo.png ├── node_modules │ ├── .package-lock.json │ └── fundebug-javascript │ │ ├── package.json │ │ ├── readme.md │ │ ├── release │ │ └── fundebug.2.0.0.min.js │ │ └── typings │ │ └── fundebug.d.ts ├── package-lock.json ├── plugin.json ├── preload.js └── webdist │ ├── index.html │ └── static │ ├── css │ └── app.3160fbc6af64d2dda3892d61b3ab9f3a.css │ └── js │ ├── 0.4111da6056ec15200d48.js │ ├── app.82b5ae9672f89c0e4e6c.js │ ├── manifest.3163b7ef90f05fd6b242.js │ └── vendor.84c52a08d440adc27344.js ├── codeVarWeb ├── .babelrc ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── README.md ├── build │ ├── build.js │ ├── check-versions.js │ ├── logo.png │ ├── utils.js │ ├── vue-loader.conf.js │ ├── webpack.base.conf.js │ ├── webpack.dev.conf.js │ └── webpack.prod.conf.js ├── config │ ├── dev.env.js │ ├── index.js │ └── prod.env.js ├── index.html ├── package-lock.json ├── package.json ├── src │ ├── App.vue │ ├── assets │ │ └── logo.png │ ├── components │ │ ├── Setting.vue │ │ └── dialog │ │ │ └── RenewDialog.vue │ ├── main.js │ └── router │ │ └── index.js └── static │ └── .gitkeep └── introduce.gif /.gitignore: -------------------------------------------------------------------------------- 1 | */.DS_Store 2 | .DS_Store 3 | .idea -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # codevar 2 | [utools](https://u.tools/) 变量快速翻译命名插件 3 | 输入 xt(小驼峰) dt(大驼峰) xh(下划线) hx(横线) cl(常亮) 4 | 用键盘上下 选择然后回车 或者 鼠标点击选择来自动放入剪切板,并自动执行粘贴. 5 | 6 | ![演示](http://ww1.sinaimg.cn/large/0076ZmKJly1g8m4bsr0hcg30tg0lywzi.gif) 7 | 8 | ## 安装方式: 9 | 10 | [utools](https://u.tools/) 插件中心搜索 `变量快速翻译命名插件` 11 | 12 | **0.0.7** 版本后不再继续提供 upx 文件版本,需要自行在 utools 中打包 13 | 14 | ## 功能: 15 | - 翻译你输入的内容为英文 16 | 17 | - 提供编程中变量命名的小驼峰, 大驼峰, 下划线, 横线, 常量格式的翻译内容 18 | 19 | - 只需要上下翻动, 回车或使用快捷键即可复制到剪切板 并自动执行粘贴 20 | 21 | 22 | ## 下载方式 23 | 24 | - 本插件下载地址:[https://github.com/qiaoanqiao/codevar](https://github.com/qiaoanqiao/codevar) 自行在 utools 中打包 25 | 26 | - `utools` 插件中心搜索 `变量快速翻译命名插件` 27 | 28 | ## 升级方式: 29 | 如果在之后的使用中. 感觉不爽了.点击插件作者链接, 然后进入插件下载地址. 看看有没有新版本吧 30 | 如果你有什么建议欢迎提出 31 | 32 | ## 升级日志 33 | ### 0.1.4 34 | 1. 增加恰饭渠道 35 | 36 | ### 0.1.3 37 | 感谢mkdir700的[fork更新](https://github.com/mkdir700/codevar/commit/88ae360fb2cd3f7bef2ae84d33dcfc9094446265), 提醒我实验并修复以下问题 38 | 1. 修复 **复制** 为贴合`utools` api 方式; 39 | 2. 修复 **粘帖** 为贴合`utools` api方式 40 | 41 | ## 更新计划 42 | 1. 自定义粘贴快捷键 43 | 2. 自定义翻译apikey 44 | 3. 可选择的翻译引擎 45 | 4. 把对应出来的变量名后面再加上对应的意思 46 | 47 | ## 赏金 48 | 觉得这款插件不错的大老爷,支持扫码打赏啦. 你的打赏是我坚持的动力 49 | 邮箱:imhereyougone@163.com 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
支付宝微信支付宝红包
-------------------------------------------------------------------------------- /codeVar/Adaptor/ApiAdaptor.js: -------------------------------------------------------------------------------- 1 | 2 | function urlencode (str) { 3 | str = (str + '').toString(); 4 | 5 | return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28'). 6 | replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+'); 7 | } 8 | var ApiAdaptor = { 9 | force: 0, 10 | inputValue: '', 11 | model:'', 12 | //增加数据缓存 13 | caches:{}, 14 | /** 15 | * 获取有道接口处理后的列表数据. 16 | * @returns {{resultData: null, errorMessage: null}} 17 | * @param {{inpuValue: string}|string} inputValue 18 | */ 19 | getListData(inputValue, model) 20 | { 21 | const cache=this.getCacheName(inputValue, model); 22 | if(this.caches[cache]) 23 | { 24 | console.log('缓存', inputValue); 25 | window.callbackSetList(this.caches[cache]); 26 | return; 27 | } 28 | console.log('查询', inputValue); 29 | if(ApiAdaptor.inputValue !== inputValue) { 30 | ApiAdaptor.force = 0; 31 | } 32 | ApiAdaptor.inputValue = inputValue; 33 | ApiAdaptor.model = model; 34 | switch (model) { 35 | case '小驼峰': 36 | model = "xt"; 37 | break; 38 | case '大驼峰': 39 | model = "dt"; 40 | break; 41 | case '横线': 42 | model = "hx"; 43 | break; 44 | case '下划线': 45 | model = "xh"; 46 | break; 47 | case '常量': 48 | model = "cl"; 49 | break; 50 | 51 | default: 52 | } 53 | let xhr = null; 54 | if (window.XMLHttpRequest) { 55 | xhr = new XMLHttpRequest(); 56 | } else { 57 | xhr = new ActiveXObject('MicroSoft.XMLHTTP'); 58 | } 59 | var url = window.codevarHost + "/main/translation"; 60 | let urlQ = url + '?input=' + urlencode(inputValue) + "&model=" + model + "&accessToken=" + window.access_token; 61 | 62 | xhr.open('GET', urlQ, true); 63 | xhr.setRequestHeader('Accept', 'application/json'); 64 | xhr.setRequestHeader('Content-Type', 'application/json'); 65 | xhr.timeout=6000; 66 | xhr.ontimeout=function(){ 67 | 68 | if(window.confirm('连接超时是否继续请求?')){ 69 | ApiAdaptor.getListData(ApiAdaptor.inputValue, ApiAdaptor.model); 70 | }else{ 71 | 72 | } 73 | 74 | try { 75 | fetch( 76 | "https://map.motouguai.com/api.html?version=0.1.9&timeout=" + urlencode(utools.getUser().nickname) 77 | ); 78 | } catch (e) { 79 | } 80 | } 81 | xhr.onreadystatechange = ()=> { 82 | if(xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) { 83 | ApiAdaptor.success(xhr.responseText,cache, inputValue); 84 | } 85 | } 86 | try { 87 | xhr.send(); 88 | } catch (e) { 89 | ApiAdaptor.callbackSetList("请求接口网络不通") 90 | } 91 | // if (xhr.readyState == 4 && xhr.status == 200) { 92 | // 93 | // // if (parseInt(data.errorCode) === 0) { 94 | // // 95 | // // } else { 96 | // // } 97 | // 98 | // } else { 99 | // returnData.errorMessage = "请求接口后过程有未知错误"; 100 | // } 101 | // 102 | // window.jquery.ajax({ 103 | // url: urlQ, 104 | // type: 'get', 105 | // async: false, 106 | // dataType: 'json', 107 | // data: { 108 | // }, 109 | // success: function (data) { 110 | // if(data.code === 0) { 111 | // returnData.resultData = data.data; 112 | // } else if(data.code === 110) { 113 | // returnData.errorMessage = data.msg; 114 | // } else if(data.code === 111) { 115 | // utools.showNotification(data.msg); 116 | // utools.openPayment({ goodsId: data.data.goodsId }, () => { 117 | // utools.showNotification("续费成功,请稍等片刻继续使用!") 118 | // }) 119 | // returnData.resultData = []; 120 | // } else if(data.code === 401) { 121 | // utools.showNotification(data.msg); 122 | // returnData.errorMessage = "401"; 123 | // returnData.resultData = []; 124 | // } 125 | // 126 | // }, 127 | // error(status) { 128 | // returnData.errorMessage = "请求接口网络错误"; 129 | // } 130 | // }); 131 | }, 132 | success(text, cacheName,inputValue) { 133 | //7,获取返回值,解析json格式字符串为对象 134 | try { 135 | var data = JSON.parse(text); 136 | } catch (e) { 137 | ApiAdaptor.callbackSetList("接口返回内容解析失败"); 138 | } 139 | if(data.code === 0) { 140 | ApiAdaptor.force = 0; 141 | //只有查询关键词和当前关键词一致时才更新列表 142 | if(inputValue==ApiAdaptor.inputValue) 143 | { 144 | console.log('展示', inputValue); 145 | window.callbackSetList(data.data); 146 | } 147 | this.caches[cacheName] = data.data; 148 | } else if(data.code === 110) { 149 | ApiAdaptor.force = 0; 150 | 151 | ApiAdaptor.callbackSetList(data.msg); 152 | 153 | } else if(data.code === 111) { 154 | ApiAdaptor.force = 0; 155 | 156 | utools.showNotification(data.msg); 157 | ApiAdaptor.callbackSetList(data.msg); 158 | window.settingWindow(); 159 | alert(data.msg); 160 | // utools.openPayment({ goodsId: data.data.goodsId }, () => { 161 | // utools.showNotification("续费成功,请稍等片刻继续使用!") 162 | // }) 163 | ApiAdaptor.callbackSetList("如果续费支付成功,请稍等片刻继续使用!"); 164 | } else if(data.code === 401) { 165 | if(ApiAdaptor.force > 3) { 166 | ApiAdaptor.force = 0; 167 | ApiAdaptor.callbackSetList("接口token刷新重试超过三次依然校验失败"); 168 | } else { 169 | window.getToken(true); 170 | ApiAdaptor.force +=1; 171 | ApiAdaptor.getListData(ApiAdaptor.inputValue, ApiAdaptor.model); 172 | } 173 | 174 | } else { 175 | ApiAdaptor.force = 0; 176 | 177 | ApiAdaptor.callbackSetList("接口请求网络未知状态码"); 178 | } 179 | }, 180 | callbackSetList(msg){ 181 | window.callbackSetList([ 182 | { 183 | title: msg, 184 | description: '', 185 | icon:'', // 图标 186 | url: '' 187 | } 188 | ]); 189 | }, 190 | getCacheName(input,model) 191 | { 192 | return model +"_ldg_" + input; 193 | } 194 | }; 195 | 196 | 197 | 198 | module.exports = ApiAdaptor; -------------------------------------------------------------------------------- /codeVar/README.md: -------------------------------------------------------------------------------- 1 | # 变量快速翻译命名插件 2 | 3 | ## 功能: 4 | 方便在开发过程中语义化命名变量 5 | 6 | 1. 先翻译你输入的内容为英文 7 | 2. 将英文转化为对应的命名格式:小驼峰, 大驼峰, 下划线, 横线, 常量 8 | 3. 只需要上下翻动, 回车或使用快捷键即可复制到剪切板 并自动执行粘贴 9 | 10 | ## 使用方式 11 | 呼出 utools 输入 **xt(小驼峰) dt(大驼峰) xh(下划线) hx(横线) cl(常亮)** 或 **对应命名方式的中文** 12 | 用键盘上下 选择然后**回车** 或者 鼠标点击选择 或者 **使用快捷键**选择 来自动放入剪切板,并自动执行粘贴. 13 | 14 | ## 反馈 15 | 邮箱:imhereyougone@163.com 16 | 17 | ## 安装方式: 18 | 19 | [utools](https://u.tools/) 插件中心搜索 `变量快速翻译命名插件` 20 | 21 | **0.0.7** 版本后不再继续提供 upx 文件版本,需要自行在 utools 中打包 22 | 23 | 24 | 25 | ## 下载方式 26 | 27 | - 本插件下载地址:[https://github.com/qiaoanqiao/codevar](https://github.com/qiaoanqiao/codevar) 自行在 utools 中打包 28 | 29 | - `utools` 插件中心搜索 `变量快速翻译命名插件` 30 | 31 | ## 升级方式: 32 | 如果在之后的使用中. 感觉不爽了.点击插件作者链接, 然后进入插件下载地址. 看看有没有新版本吧 33 | 如果你有什么建议欢迎提出 34 | 35 | ## 升级日志 36 | ### 0.1.5 37 | 1. 删除自己的恰饭渠道,使用赏金功能 38 | 2. 更新演示图 39 | 40 | ## 升级日志 41 | ### 0.1.4 42 | 1. 增加恰饭渠道 43 | 44 | ### 0.1.3 45 | 感谢mkdir700的[fork更新](https://github.com/mkdir700/codevar/commit/88ae360fb2cd3f7bef2ae84d33dcfc9094446265), 提醒我实验并修复以下问题 46 | 1. 修复 **复制** 为贴合`utools` api 方式; 47 | 2. 修复 **粘帖** 为贴合`utools` api方式 48 | 49 | ## 反馈 50 | 邮箱:imhereyougone@163.com -------------------------------------------------------------------------------- /codeVar/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiaoanqiao/codevar/f4469730bf41b683db37f41dc90f7838c1099f39/codeVar/logo.png -------------------------------------------------------------------------------- /codeVar/node_modules/.package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codeVar", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": {} 6 | } 7 | -------------------------------------------------------------------------------- /codeVar/node_modules/fundebug-javascript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "fundebug-javascript", 3 | "_id": "fundebug-javascript@2.0.0", 4 | "_inBundle": false, 5 | "_integrity": "sha1-2mMJXRSTFBD4Nou6e8A+nKbAGtg=", 6 | "_location": "/fundebug-javascript", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "tag", 10 | "registry": true, 11 | "raw": "fundebug-javascript", 12 | "name": "fundebug-javascript", 13 | "escapedName": "fundebug-javascript", 14 | "rawSpec": "", 15 | "saveSpec": null, 16 | "fetchSpec": "latest" 17 | }, 18 | "_requiredBy": [ 19 | "#USER", 20 | "/" 21 | ], 22 | "_resolved": "https://registry.npm.taobao.org/fundebug-javascript/download/fundebug-javascript-2.0.0.tgz", 23 | "_shasum": "da63095d14931410f8368bba7bc03e9ca6c01ad8", 24 | "_spec": "fundebug-javascript", 25 | "_where": "/Users/qiaoanqiao/dev/utools/codeVar", 26 | "author": { 27 | "name": "fundebug" 28 | }, 29 | "bundleDependencies": false, 30 | "deprecated": false, 31 | "description": "monitor errors of javascript application", 32 | "devDependencies": { 33 | "@babel/cli": "^7.4.4", 34 | "@babel/core": "^7.4.5", 35 | "@babel/preset-env": "^7.4.5", 36 | "@types/mocha": "^5.2.7", 37 | "@types/node": "^12.7.2", 38 | "awesome-typescript-loader": "^5.2.1", 39 | "babel-eslint": "^10.0.1", 40 | "babel-loader": "^8.0.6", 41 | "babel-plugin-array-includes": "^2.0.3", 42 | "eslint": "^5.9.0", 43 | "javascript-obfuscator": "^0.16.0", 44 | "mocha": "^5.1.1", 45 | "rewire": "^4.0.1", 46 | "should": "^13.2.1", 47 | "source-map-loader": "^0.2.4", 48 | "ts-node": "^8.3.0", 49 | "typescript": "^3.6.2", 50 | "webpack": "^4.25.1", 51 | "webpack-cli": "^3.1.2", 52 | "webpack-watch-time-plugin": "^0.1.2" 53 | }, 54 | "keywords": [ 55 | "javascript", 56 | "fundebug" 57 | ], 58 | "main": "release/fundebug.2.0.0.min.js", 59 | "name": "fundebug-javascript", 60 | "scripts": { 61 | "test": "mocha -r ts-node/register --timeout 10000 --exit --sort src/test/**/*.ts", 62 | "tslint": "tslint 'src/**/*' 'typings/**/*'" 63 | }, 64 | "typings": "typings/fundebug.d.ts", 65 | "version": "2.0.0" 66 | } 67 | -------------------------------------------------------------------------------- /codeVar/node_modules/fundebug-javascript/readme.md: -------------------------------------------------------------------------------- 1 | ## Fundebug的JavaSript错误监控插件 2 | 3 | 实时监控前端JavaSript应用的错误,助您提升用户体验 4 | 5 | 6 | ####安装 7 | 8 | ``` 9 | npm install fundebug-javascript 10 | ``` 11 | 12 | ####使用 13 | 14 | ``` 15 | var fundebug=require("fundebug-javascript"); 16 | fundebug.apikey="YOUR-APIKEY" 17 | ``` 18 | 19 | 其中,获取**apikey**需要[免费注册](https://fundebug.com/team/create)帐号并且[创建项目](https://fundebug.com/project/create)。 20 | 21 | -------------------------------------------------------------------------------- /codeVar/node_modules/fundebug-javascript/release/fundebug.2.0.0.min.js: -------------------------------------------------------------------------------- 1 | var _0x96e0=["Fundebug: apikey格式错误","match","join","name","nodeType","splice","status","ifReportHttpError","set","silentHttp","replace","notification","url","onhashchange","silentConsole","sampleRate","silentBehavior","getAttribute","silentPerformance","exports","fundebug","navigator","href","metaData","POST","length","push","hasOwnProperty","verifyApiKey","error"];!function(t,e){!function(e){for(;--e;)t.push(t.shift())}(++e)}(_0x96e0,109);var _0x91ae=function(e,t){return _0x96e0[e-=0]};!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.fundebug=t():e.fundebug=t()}(window,function(){return function(n){var r={};function o(e){if(r[e])return r[e][_0x91ae("0x0")];var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,n){var r=n(1),o=n(7),i=n(9),a=n(10),u=n(12),s=n(14),c=n(15),l=n(16),f=n(17),p=n(18),d=n(19),m=n(20),g=n(21),v=n(22),y=n(23),h=v.getConfig();r(h,y),o(h,y),i(h,y),a(h,y),u(h,y),s(h,y),c(h),l(h,y),f(h,y),p(h,y),d(h,y),m(h,y),g(h,y),window[_0x91ae("0x1")]=h,e.exports=h},function(e,t,n){var i=n(2);e.exports=function(r,o){"addEventListener"in window&&window.addEventListener("unhandledrejection",function(e){try{var t={type:"unhandledrejection",name:"unhandledrejection",message:e.reason};i(t,r,o)}catch(n){}})}},function(e,t,n){var s=n(3),c=n(4),l=n(5),f=n(6),p="https://web.fundebug.net/event/";function r(e,t,n){var r=t.apikey;if(c.verifyApiKey(r)&&t.maxEventNumber&&!t.silent&&!l(t.silentDev)){var o;t.maxEventNumber-=1,o=t.revideo&&t.revideo.fetchSequence&&t.revideo.fetchSequence();var i,a=n.getBreadcrumbs();t.silentPerformance||(i=f.getPerformance());var u={notifierVersion:"2.0.0",userAgent:window.navigator.userAgent,locale:window[_0x91ae("0x2")].language||window.navigator.userLanguage,url:window.location[_0x91ae("0x3")],title:document.title,appVersion:t.appversion,apiKey:t.apikey,releaseStage:t.releasestage,metaData:e.metaData||t[_0x91ae("0x4")],user:e.user||t.user,name:e.name,time:(new Date).getTime(),message:e.message,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,stacktrace:e.stacktrace,type:e.type,severity:e.severity,target:e.target,req:e.req,res:e.res,httpTimeout:e.httpTimeout,breadcrumbs:a,redo:o,performance:i};u.userAgent&&u.userAgent.match(/Googlebot/)||(t.callback&&t.callback(u),s.isFiltered(u,t.filters)||c.isSampled(t.sampleRate)&&function(e){var t=function(e){var t;try{t=d(e)}catch(n){delete e.metaData;try{t=d(e)}catch(r){return}}return t}(u);if(t)if(window.XMLHttpRequest&&window.atob){var n=new XMLHttpRequest;n.sendByFundebug=!0,n.open(_0x91ae("0x5"),p),n.setRequestHeader("Content-Type","application/json"),n.send(t)}else{(new Image).src=p+"?event="+encodeURIComponent(t)}}())}}function d(e){if("undefined"!=typeof JSON)return JSON.stringify(e);if(e instanceof Array){for(var t=[],n=0;n ")}(t),timeStamp:e.timeStamp}};if(t.src===window.location.href)return;if(t.src&&t.src.match(/.*\/(.*)$/)&&!t.src.match(/.*\/(.*)$/)[1])return;if(r.target.src&&window.XMLHttpRequest){var o=new XMLHttpRequest;o.sendByFundebug=!0,o.open("HEAD",r.target.src),o.send(),o.onload=function(e){200!==e.target.status&&(r.target[_0x91ae("0x11")]=e.target.status,r.target.statusText=e.target.statusText),s(r,a,u)}}}catch(i){}},!0)}},function(e,t,n){var f=n(11);e.exports=function(c,l){if(window.fetch){var t=window.fetch;window.fetch=function(e,u){var s=(new Date).getTime();return t.apply(this,arguments).then(function(e){return function(e){try{var t=(new Date).getTime()-s,n=u&&u.method||"GET",r=e.url,o=e.status,i=e.statusText;!function(e,t,n,r,o){if(!c.silentHttp&&(f.ifReportHttpError(n,t)||f.ifReportHttpTimout(o,c.httpTimeout))){var i,a={method:e,url:t},u={status:n,statusText:r,elapsedTime:o};i=f.ifReportHttpError(n,t)?"httpError":"httpTimeout",f.sendHttpErrorToFundebug(i,a,u,c,l)}}(n,r,o,i,t),function(e,t,n,r,o,i){if(!c.silentBehavior){var a={type:"fetch",page:{url:window.location.href,title:document.title},detail:{method:e,url:t,status:n,statusText:r},elapsedTime:o,time:i};l.addBreadcrumb(a)}}(n,r,o,i,t,s)}catch(a){}}(e),e})}}}},function(e,t,n){var a=n(2);t.ifReportHttpTimout=function(e,t){return"number"==typeof t&&t 4 | 5 | export as namespace fundebug; 6 | 7 | export function init(config: IConfigs): undefined; 8 | 9 | export function test(name?: string, message?: string): undefined; 10 | 11 | export function notify( 12 | name: string, 13 | message: string, 14 | options?: IOptions 15 | ): undefined; 16 | 17 | export function notifyError(error: Error, options?: IOptions): undefined; 18 | 19 | interface IConfigs { 20 | apikey: string; 21 | appversion?: string; 22 | releasestage?: string; 23 | user?: IUser; 24 | metaData?: object; 25 | callback?: ICallback; 26 | setHttpBody?: boolean; 27 | httpTimeout?: number; 28 | filters?: object[]; 29 | silent?: boolean; 30 | silentDev?: boolean; 31 | silentResource?: boolean; 32 | silentHttp?: boolean; 33 | silentWebsocket?: boolean; 34 | silentConsole?: boolean; 35 | silentPerformance?: boolean; 36 | sampleRate?: number; 37 | domain?: string; 38 | } 39 | 40 | interface IUser { 41 | name: string; 42 | email: string; 43 | } 44 | 45 | type ICallback = (event: object) => void; 46 | 47 | interface IOptions { 48 | metaData?: object; 49 | } 50 | -------------------------------------------------------------------------------- /codeVar/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "fundebug-javascript": { 6 | "version": "2.0.0", 7 | "resolved": "https://registry.npm.taobao.org/fundebug-javascript/download/fundebug-javascript-2.0.0.tgz", 8 | "integrity": "sha1-2mMJXRSTFBD4Nou6e8A+nKbAGtg=" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /codeVar/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "pluginName": "变量快速翻译命名插件", 3 | "version": "1.0.0", 4 | "description": "使用翻译进行变量格式化命名.", 5 | "author": "乔安", 6 | "homepage": "https://www.motouguai.com", 7 | "preload": "preload.js", 8 | "logo": "logo.png", 9 | "features": [ 10 | { 11 | "code": "setting", 12 | "explain": "设置中心", 13 | "cmds": [ 14 | "变量快速翻译命名插件设置" 15 | ] 16 | }, 17 | { 18 | "code": "big_hump", 19 | "explain": "转换内容为大驼峰命名格式", 20 | "cmds": [ 21 | "大驼峰", "dt" 22 | ] 23 | }, 24 | { 25 | "code": "small_hump", 26 | "explain": "转换内容为小驼峰命名格式", 27 | "cmds": [ 28 | "小驼峰", "xt" 29 | ] 30 | }, 31 | { 32 | "code": "underline", 33 | "explain": "转换内容为下划线命名格式", 34 | "cmds": [ 35 | "下划线", "xh" 36 | ] 37 | }, 38 | { 39 | "code": "horizontal_line", 40 | "explain": "转换内容为横线命名格式", 41 | "cmds": [ 42 | "横线", "hx" 43 | ] 44 | }, 45 | { 46 | "code": "constant", 47 | "explain": "转换内容为常量命名格式", 48 | "cmds": [ 49 | "常量", "cl" 50 | ] 51 | } 52 | ] 53 | } -------------------------------------------------------------------------------- /codeVar/preload.js: -------------------------------------------------------------------------------- 1 | window.codevarHost = "https://codevar-api.motouguai.com"; 2 | // window.codevarHost = "http://127.0.0.1:8080"; 3 | const ApiAdaptor = require('./Adaptor/ApiAdaptor.js'); 4 | const access_token = ""; 5 | 6 | /** 7 | * 进入模式, xt,dt等等 8 | * @type {string} 9 | */ 10 | var model = ''; 11 | /** 12 | * 搜索框提示文本 13 | * @type {string} 14 | */ 15 | var promptText = '请输入要转化的文字'; 16 | /** 17 | * 搜索字符串 18 | * @type {{inpuValue: string}} 19 | */ 20 | var inputValue = {inpuValue:""}; 21 | 22 | /** 23 | * 输入延迟搜索时间(毫秒) 24 | * @type {number} 25 | */ 26 | var inputLag = 250; 27 | 28 | /** 29 | * 任意关键词模式,搜索文字 30 | * @type {string} 31 | */ 32 | var mathSearchWord = ""; 33 | /** 34 | * 任意关键词模式, 是否重复搜索 35 | * @type {boolean} 36 | */ 37 | var mathIsInSearch = false; 38 | 39 | /** 40 | * 任意关键词模式, 是否第一次搜索 41 | * @type {boolean} 42 | */ 43 | var isMathFirst = true; 44 | 45 | 46 | var timeout = false; 47 | 48 | getToken(); 49 | try { 50 | let fetchRes = fetch( 51 | window.codevarHost + "/utools/info?accessToken=" + window.access_token); 52 | } catch (e) { 53 | } 54 | const sint= setInterval(()=>{ 55 | getToken(); 56 | try { 57 | let fetchRes = fetch( 58 | window.codevarHost + "/utools/info?accessToken=" + window.access_token); 59 | } catch (e) { 60 | } 61 | },3080000); 62 | 63 | window.settingWindow = function (){ 64 | const ubWindow = utools.createBrowserWindow('./webdist/index.html', { 65 | show: true, 66 | title: '设置', 67 | // webPreferences: { 68 | // preload: 'setting.js' 69 | // } 70 | }, () => { 71 | // 显示 72 | // ubWindow.show() 73 | }); 74 | }; 75 | /** 76 | * 插件进入对应模式响应 77 | */ 78 | window.exports = { 79 | "setting": { // 注意:键对应的是 plugin.json 中的 features.code 80 | mode: "none", // 用于无需 UI 显示,执行一些简单的代码 81 | args: { 82 | // 进入插件应用时调用 83 | enter: (action) => { 84 | window.settingWindow(); 85 | } 86 | } 87 | }, 88 | //转换内容为大驼峰命名格式 89 | "big_hump": { 90 | mode: "list", 91 | args: { 92 | enter: (action, callbackSetList) => { 93 | onEnter(action, callbackSetList); 94 | }, 95 | search: (action, searchWord, callbackSetList) => { 96 | onSearch(action.payload, searchWord, callbackSetList); 97 | }, 98 | select: (action, itemData) => { 99 | onSelect(action, itemData); 100 | }, 101 | placeholder: promptText, 102 | } 103 | }, 104 | //转换内容为小驼峰命名格式 105 | "small_hump": { 106 | mode: "list", 107 | args: { 108 | enter: (action, callbackSetList) => { 109 | onEnter(action, callbackSetList); 110 | }, 111 | search: (action, searchWord, callbackSetList) => { 112 | onSearch(action.payload, searchWord, callbackSetList); 113 | }, 114 | select: (action, itemData) => { 115 | onSelect(action, itemData); 116 | }, 117 | placeholder: promptText, 118 | } 119 | }, 120 | //转换内容为下划线命名格式 121 | "underline": { 122 | mode: "list", 123 | args: { 124 | enter: (action, callbackSetList) => { 125 | onEnter(action, callbackSetList); 126 | }, 127 | search: (action, searchWord, callbackSetList) => { 128 | onSearch(action.payload, searchWord, callbackSetList); 129 | }, 130 | select: (action, itemData) => { 131 | onSelect(action, itemData); 132 | }, 133 | placeholder: promptText, 134 | } 135 | }, 136 | //转换内容为横线命名格式 137 | "horizontal_line": { 138 | mode: "list", 139 | args: { 140 | enter: (action, callbackSetList) => { 141 | onEnter(action, callbackSetList); 142 | }, 143 | search: (action, searchWord, callbackSetList) => { 144 | onSearch(action.payload, searchWord, callbackSetList); 145 | }, 146 | select: (action, itemData) => { 147 | onSelect(action, itemData); 148 | }, 149 | placeholder: promptText, 150 | } 151 | }, 152 | //转换内容为常量命名格式 153 | "constant": { 154 | mode: "list", 155 | args: { 156 | enter: (action, callbackSetList) => { 157 | onEnter(action, callbackSetList); 158 | }, 159 | search: (action, searchWord, callbackSetList) => { 160 | onSearch(action.payload, searchWord, callbackSetList); 161 | }, 162 | select: (action, itemData) => { 163 | onSelect(action, itemData); 164 | }, 165 | placeholder: promptText, 166 | } 167 | }, 168 | //任意关键字-使用变量快速翻译命名插件 169 | "switch_any_text": { 170 | mode: "list", 171 | args: { 172 | enter: (action, callbackSetList) => { 173 | mathSearchWord = action.payload; 174 | switchOnEnter(action, callbackSetList); 175 | }, 176 | search: (action, searchWord, callbackSetList) => { 177 | if(mathIsInSearch) { 178 | onSearch(model, searchWord, callbackSetList); 179 | } else { 180 | switchOnEnter(action, callbackSetList); 181 | } 182 | }, 183 | select: (action, itemData, callbackSetList) => { 184 | if(mathIsInSearch) { 185 | utools.setSubInput(({ text }) => { 186 | if(mathIsInSearch) { 187 | mathSearchWord = text; 188 | onSearch(model, text, callbackSetList); 189 | } else { 190 | mathSearchWord = text; 191 | switchOnEnter(action, callbackSetList); 192 | } 193 | }, '此输入框可重新输入内容,选择要转换的格式', false); 194 | onSelect(action, itemData); 195 | mathIsInSearch = false; 196 | isMathFirst = false; 197 | } else { 198 | callbackSetList([]); 199 | utools.setSubInput(({ text }) => { 200 | onSearch(model, text, callbackSetList); 201 | }, itemData.title + ",可重新输入搜索(格式选择后显示固定格式)", false); 202 | model = anyTextTitleSwitchGetModel(itemData.title); 203 | onSearch(model, mathSearchWord, callbackSetList); 204 | mathIsInSearch = true; 205 | } 206 | }, 207 | placeholder: "选择要转换的格式", 208 | } 209 | }, 210 | //切换变量快速翻译命名插件是否自动关闭设置 211 | "whether_to_shut_down_automatical": { 212 | mode: "none", 213 | args: { 214 | // 进入插件时调用 215 | enter: (action) => { 216 | whetherToShutDownAutomatical = utools.dbStorage.getItem('whether_to_shut_down_automatical'); 217 | if (whetherToShutDownAutomatical === null) { 218 | utools.showNotification("变量快速翻译命名插件将会自动关闭") 219 | utools.dbStorage.setItem('whether_to_shut_down_automatical', "1") 220 | } else { 221 | if (whetherToShutDownAutomatical === "1") { 222 | utools.showNotification("变量快速翻译命名插件将不会自动关闭") 223 | utools.dbStorage.setItem('whether_to_shut_down_automatical', "0") 224 | } else { 225 | utools.showNotification("变量快速翻译命名插件将会自动关闭") 226 | 227 | utools.dbStorage.setItem('whether_to_shut_down_automatical', "1") 228 | } 229 | } 230 | utools.hideMainWindow(); 231 | utools.outPlugin() 232 | } 233 | } 234 | }, 235 | //切换变量快速翻译命名插件是否任意文本匹配插件 236 | "any_text_match": { 237 | mode: "none", 238 | args: { 239 | // 进入插件时调用 240 | enter: (action) => { 241 | whetherToShutDownAutomatical = utools.dbStorage.getItem('any_text_match'); 242 | function any_text_matchOpen() { 243 | utools.showNotification("变量快速翻译命名插件是否任意文本匹配插件处于开启状态,可配合超级面板使用哦") 244 | utools.dbStorage.setItem('any_text_match', "1") 245 | addany_text_match(); 246 | } 247 | 248 | if (whetherToShutDownAutomatical === null) { 249 | any_text_matchOpen(); 250 | } else { 251 | if (whetherToShutDownAutomatical === "1") { 252 | utools.showNotification("变量快速翻译命名插件是否任意文本匹配插件处于关闭状态") 253 | utools.dbStorage.setItem('any_text_match', "0") 254 | removeany_text_match(); 255 | } else { 256 | utools.dbStorage.setItem('any_text_match', "1") 257 | any_text_matchOpen(); 258 | } 259 | } 260 | utools.hideMainWindow(); 261 | utools.outPlugin() 262 | } 263 | } 264 | }, 265 | "user_info": { 266 | mode: "none", 267 | args: { 268 | // 进入插件时调用 269 | enter: (action) => { 270 | getToken(); 271 | let fetchRes = fetch( 272 | window.codevarHost + "/utools/info?accessToken=" + window.access_token); 273 | 274 | // fetchRes is the promise to resolve 275 | // it by using.then() method 276 | fetchRes.then(res => 277 | res.json()).then(data => { 278 | if(data.code === 0) { 279 | utools.showNotification("过期时间: " + data.data.vipDueTime) 280 | utools.hideMainWindow(); 281 | utools.outPlugin() 282 | } 283 | }) 284 | 285 | } 286 | } 287 | }, 288 | "user_info_renew": { 289 | mode: "none", 290 | args: { 291 | // 进入插件时调用 292 | enter: (action) => { 293 | getToken(); 294 | let fetchRes = fetch( 295 | window.codevarHost + "/utools/info?accessToken=" + window.access_token + "&renew=1"); 296 | 297 | // fetchRes is the promise to resolve 298 | // it by using.then() method 299 | fetchRes.then(res => 300 | res.json()).then(data => { 301 | console.log(data) 302 | if(data.code === 110) { 303 | utools.showNotification(data.msg); 304 | } else if(data.code === 111) { 305 | utools.showNotification(data.msg); 306 | window.settingWindow(); 307 | alert("data.msg"); 308 | 309 | // utools.openPayment({ goodsId: data.data.goodsId }, () => { 310 | // utools.showNotification("续费成功,请稍等片刻继续使用!") 311 | // }) 312 | } 313 | 314 | }) 315 | 316 | 317 | } 318 | } 319 | }, 320 | "switch_paste_method": { 321 | mode: "none", 322 | args: { 323 | // 进入插件时调用 324 | enter: (action) => { 325 | whetherToShutDownAutomatical = utools.dbStorage.getItem('switch_paste_method'); 326 | if (whetherToShutDownAutomatical === null) { 327 | utools.showNotification("变量快速翻译命名插件将使用快捷键粘贴方式") 328 | utools.dbStorage.setItem('switch_paste_method', "1") 329 | } else { 330 | if (whetherToShutDownAutomatical === "1") { 331 | utools.showNotification("变量快速翻译命名插件将使用模拟输入法输入粘贴方式") 332 | utools.dbStorage.setItem('switch_paste_method', "0") 333 | } else { 334 | utools.showNotification("变量快速翻译命名插件将使用快捷键粘贴方式") 335 | 336 | utools.dbStorage.setItem('switch_paste_method', "1") 337 | } 338 | } 339 | utools.hideMainWindow(); 340 | utools.outPlugin() 341 | } 342 | } 343 | }, 344 | }; 345 | 346 | 347 | function getToken(force){ 348 | console.log("getToken" + force); 349 | var token = utools.db.get("token"); 350 | var tokenTime = utools.db.get("token_time"); 351 | if(token != null && tokenTime != null) { 352 | if((Date.now() - tokenTime.data) < 6100000 && force !== true) { 353 | window.access_token = token.data; 354 | return ; 355 | } else { 356 | utools.fetchUserServerTemporaryToken().then((res) => { 357 | window.access_token = res.token; 358 | 359 | utools.db.put({ 360 | _id: "token", 361 | data: res.token, 362 | _rev: token._rev 363 | }) 364 | utools.db.put({ 365 | _id: "token_time", 366 | data: Date.now(), 367 | _rev: tokenTime._rev 368 | }) 369 | }); 370 | } 371 | } else { 372 | utools.fetchUserServerTemporaryToken().then((res) => { 373 | window.access_token = res.token; 374 | 375 | utools.db.put({ 376 | _id: "token", 377 | data: res.token 378 | }) 379 | utools.db.put({ 380 | _id: "token_time", 381 | data: Date.now() 382 | }) 383 | }); 384 | } 385 | 386 | 387 | } 388 | window.getToken = getToken; 389 | /** 390 | * 搜索入口 391 | * @param modelF 搜索模式 392 | * @param searchWord 搜索字符 393 | * @param callbackSetList 返回列表搜索结果函数 394 | */ 395 | var onSearch = function(modelF, searchWord, callbackSetList) 396 | { 397 | window.callbackSetList = callbackSetList; 398 | try { 399 | model = modelF; 400 | //使用全局变量, 当值更改时定时器内及时获取最新值搜索 401 | inputValue.inpuValue = searchWord; 402 | if(utools.getUser() == null) { 403 | callbackSetList([ 404 | { 405 | title: '先登录Utools账号后使用', 406 | description: '在Utools账号与数据中登录', 407 | icon:'', // 图标 408 | url: '' 409 | } 410 | ]) 411 | utools.showNotification("请在Utools账号中登录") 412 | return; 413 | } 414 | getToken(); 415 | if(inputValue.inpuValue !== '') { 416 | //防抖 417 | if(timeout) clearTimeout(timeout); 418 | callbackSetList([]); 419 | timeout=setTimeout(function () { 420 | callbackSetList([ 421 | { 422 | title: '正在搜索中...', 423 | description: '正在搜索中...', 424 | icon:'', // 图标 425 | url: '' 426 | } 427 | ]) 428 | ApiAdaptor.getListData(searchWord, model); 429 | }, inputLag); 430 | } 431 | 432 | } catch (e) { 433 | try { 434 | fetch( 435 | "https://map.motouguai.com/api.html?version=0.1.9&e=" + encodeURIComponent(e.stack) 436 | ); 437 | } catch (e) { 438 | } 439 | } 440 | }; 441 | 442 | 443 | /** 444 | * 首次展示入口 445 | * @param action 446 | * @param callbackSetList 447 | */ 448 | var onEnter = function(action, callbackSetList) { 449 | model = action.payload; 450 | setPlaceholder(action.payload); 451 | onload(); 452 | callbackSetList([]); 453 | }; 454 | var onload = function() 455 | { 456 | var fundebug = require("fundebug-javascript"); 457 | fundebug.apikey = "20634a54043152c8d1a3a92054ad2412a1af0a591aaf11ed21ee5d046b4cb8d0"; 458 | }; 459 | /** 460 | * 选中事件 461 | * @param action 462 | * @param itemData 当前选中数据 463 | */ 464 | var onSelect = function(action, itemData) { 465 | try { 466 | select(itemData.arg); 467 | } catch (e) { 468 | console.log(e); 469 | } 470 | }; 471 | 472 | /** 473 | * 展示鼠标触发的提示信息 474 | * @param action 475 | * @param callbackSetList 476 | */ 477 | function switchOnEnter(action, callbackSetList) { 478 | let result_value = []; 479 | result_value.push({ 480 | title: "小驼峰命名格式", 481 | description: "转换内容为小驼峰命名格式", 482 | icon:'', 483 | }); 484 | result_value.push({ 485 | title: "大驼峰命名格式", 486 | description: "转换内容为大驼峰命名格式", 487 | icon:'', 488 | }); 489 | result_value.push({ 490 | title: "下划线命名格式", 491 | description: "转换内容为下划线命名格式", 492 | icon:'', 493 | }); 494 | result_value.push({ 495 | title: "横线命名格式", 496 | description: "转换内容为横线命名格式", 497 | icon:'', 498 | }); 499 | result_value.push({ 500 | title: "常量命名格式", 501 | description: "转换内容为常量命名格式", 502 | icon:'', 503 | }); 504 | callbackSetList(result_value); 505 | } 506 | 507 | /** 508 | * 匹配对应的翻译展示模式 509 | * @param title 510 | * @returns {string} 511 | */ 512 | function anyTextTitleSwitchGetModel(title) { 513 | switch (title) { 514 | case "小驼峰命名格式": 515 | return "xt"; 516 | case "大驼峰命名格式": 517 | return "dt"; 518 | case "下划线命名格式": 519 | return "xh"; 520 | case "横线命名格式": 521 | return "hx"; 522 | case "常量命名格式": 523 | return "cl"; 524 | default: 525 | return ""; 526 | } 527 | } 528 | 529 | 530 | function addany_text_match(){ 531 | utools.setFeature({ 532 | "code": "switch_any_text", 533 | "explain": "使用变量快速翻译命名插件", 534 | "cmds": [ 535 | { 536 | "type": "over", 537 | "label": "选择格式后进行命名" 538 | } 539 | ] 540 | }) 541 | } 542 | 543 | function removeany_text_match(){ 544 | utools.removeFeature('switch_any_text') 545 | } 546 | 547 | /** 548 | * 设置子搜索placeholder 549 | * @param payload 进入时模式 550 | */ 551 | var setPlaceholder = function(payload) 552 | { 553 | promptText = '请输入'; 554 | switch (payload) { 555 | case 'xt': { 556 | promptText = '小驼峰命名法'; 557 | break; 558 | } 559 | case 'dt': { 560 | promptText = '大驼峰命名法'; 561 | break; 562 | } 563 | case 'xh': { 564 | promptText = '下划线命名法'; 565 | break; 566 | } 567 | case 'cl': { 568 | promptText = '常量命名法'; 569 | break; 570 | } 571 | case '小驼峰': { 572 | promptText = '小驼峰命名法'; 573 | break; 574 | } 575 | case '大驼峰': { 576 | promptText = '大驼峰命名法'; 577 | break; 578 | } 579 | case '下划线': { 580 | promptText = '下划线命名法'; 581 | break; 582 | } 583 | case '常量': { 584 | promptText = '常量命名法'; 585 | break; 586 | } 587 | } 588 | }; 589 | 590 | /** 591 | * 选中后处理 592 | * @param text 选中的文本 593 | */ 594 | function select(text) { 595 | console.log(text); 596 | utools.copyText(text); 597 | whetherToShutDownAutomatical = utools.dbStorage.getItem('whether_to_shut_down_automatical'); 598 | isClose = true; 599 | if(whetherToShutDownAutomatical === null) { 600 | isClose = true; 601 | utools.showNotification("变量快速翻译命名插件将会自动关闭, 如需设置请查看插件详情") 602 | utools.dbStorage.setItem('whether_to_shut_down_automatical', "1") 603 | } else { 604 | if(whetherToShutDownAutomatical === "1") { 605 | isClose = true; 606 | } else { 607 | isClose = false; 608 | } 609 | } 610 | if(isClose) { 611 | utools.hideMainWindow(); 612 | utools.setSubInputValue(''); 613 | utools.outPlugin(); 614 | paste(text); 615 | } 616 | } 617 | 618 | /** 619 | * 粘贴处理 620 | */ 621 | function paste(text) { 622 | isIme = true; //是否输入法模式粘贴 623 | switch_paste_method = utools.dbStorage.getItem('switch_paste_method'); 624 | if(switch_paste_method === null) { 625 | utools.showNotification("变量快速翻译命名插件将使用模拟输入法输入粘贴方式, 如需设置请查看插件详情") 626 | utools.dbStorage.setItem('switch_paste_method', "0") 627 | } else { 628 | if(switch_paste_method === "1") { 629 | isIme = false; 630 | } else { 631 | isIme = true; 632 | } 633 | } 634 | if(isIme) { 635 | try { 636 | let hideMainWindowTypeString = utools.hideMainWindowTypeString(text); 637 | if(hideMainWindowTypeString !== true){ 638 | pasteSimulateKey(); 639 | } 640 | } catch (e) { 641 | pasteSimulateKey(); 642 | } 643 | } else { 644 | pasteSimulateKey(); 645 | } 646 | } 647 | function pasteSimulateKey() { 648 | if (utools.isWindows()) { 649 | utools.simulateKeyboardTap('v', 'ctrl') 650 | } 651 | if (utools.isMacOs()) { 652 | utools.simulateKeyboardTap('v', 'command') 653 | } 654 | if (utools.isLinux()) { 655 | utools.simulateKeyboardTap('v', 'ctrl') 656 | } 657 | } 658 | /** 659 | * url 编码 660 | * @param param 661 | * @param key 662 | * @param encode 663 | * @returns {string} 664 | */ 665 | var urlEncode = function (param, key, encode) { 666 | if (param == null) return ''; 667 | var paramStr = ''; 668 | var t = typeof (param); 669 | if (t == 'string' || t == 'number' || t == 'boolean') { 670 | paramStr += '&' + key + '=' + ((encode == null || encode) ? encodeURIComponent(param) : param); 671 | } else { 672 | for (var i in param) { 673 | var k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i) 674 | paramStr += urlEncode(param[i], k, encode) 675 | } 676 | } 677 | return paramStr; 678 | }; 679 | -------------------------------------------------------------------------------- /codeVar/webdist/index.html: -------------------------------------------------------------------------------- 1 | code-var-web
-------------------------------------------------------------------------------- /codeVar/webdist/static/js/0.4111da6056ec15200d48.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([0],{"3fs2":function(t,e,o){var n=o("RY/4"),a=o("dSzd")("iterator"),r=o("/bQp");t.exports=o("FeBl").getIteratorMethod=function(t){if(void 0!=t)return t[a]||t["@@iterator"]||r[n(t)]}},BO1k:function(t,e,o){t.exports={default:o("fxRn"),__esModule:!0}},DHIY:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o("BO1k"),a=o.n(n),r={name:"RenewDialog",components:{},props:{QualityDialogFlag:{default:!1}},data:function(){return{visible:!1,formData:{renewalDuration:"",amountPayable:"4.9 ¥",nowAmountPayable:"4.9 ¥"},rules:{renewalDuration:[{required:!0,message:"请择选拉下选择选择续费时长",trigger:"change"}]},renewalDurationOptions:[{label:"两个月",value:"two",discountBefore:"4.92 ¥",discountAfter:"4.92 ¥"},{label:"半年",value:"six",discountBefore:"14.7 ¥",discountAfter:"13.23 ¥"},{label:"一年",value:"twelve",discountBefore:"29.4 ¥",discountAfter:"25.87 ¥"}]}},created:function(){},mounted:function(){},methods:{selectChange:function(t){var e=!0,o=!1,n=void 0;try{for(var r,i=a()(this.renewalDurationOptions);!(e=(r=i.next()).done);e=!0){var l=r.value;l.value===t&&(this.formData.amountPayable=l.discountBefore,this.formData.nowAmountPayable=l.discountAfter)}}catch(t){o=!0,n=t}finally{try{!e&&i.return&&i.return()}finally{if(o)throw n}}},RenewalPopUpWindow:function(){this.$emit("update:QualityDialogFlag",!1)},ok:function(){this.renewal(this.formData.renewalDuration),this.$emit("update:QualityDialogFlag",!1)},submitForm:function(){this.$refs.elForm.validate(function(t){})},resetForm:function(){this.$refs.elForm.resetFields()},renewal:function(t){console.log(t),this.getToken();var e=null;(e=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("MicroSoft.XMLHTTP")).open("GET","https://codevar-api.motouguai.com/utools/info?accessToken="+window.access_token+"&renew=1&renewGear="+t,!0),e.setRequestHeader("Accept","application/json"),e.setRequestHeader("Content-Type","application/json"),e.onreadystatechange=function(){if(e.readyState===XMLHttpRequest.DONE&&200===e.status){var t={};try{110===(t=JSON.parse(e.responseText)).code?utools.showNotification(t.msg):111===t.code&&(utools.showNotification(t.msg),utools.openPayment({goodsId:t.data.goodsId},function(){utools.showNotification("续费成功,请稍等片刻继续使用!")}))}catch(t){alert(t)}}};try{e.send()}catch(t){alert("请求失败哈")}},getToken:function(t){console.log("getToken"+t);var e=utools.db.get("token"),o=utools.db.get("token_time");if(null!=e&&null!=o){if(Date.now()-o.data<61e5&&!0!==t)return void(window.access_token=e.data);utools.fetchUserServerTemporaryToken().then(function(t){window.access_token=t.token,utools.db.put({_id:"token",data:t.token,_rev:e._rev}),utools.db.put({_id:"token_time",data:Date.now(),_rev:o._rev})})}else utools.fetchUserServerTemporaryToken().then(function(t){window.access_token=t.token,utools.db.put({_id:"token",data:t.token}),utools.db.put({_id:"token_time",data:Date.now()})})}},watch:{QualityDialogFlag:function(){this.visible=this.QualityDialogFlag}}},i={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("el-dialog",{attrs:{title:"续费",visible:t.visible,"close-on-click-modal":!1},on:{"update:visible":function(e){t.visible=e},close:t.RenewalPopUpWindow}},[o("el-form",{ref:"elForm",attrs:{model:t.formData,rules:t.rules,size:"medium","label-width":"120px"}},[o("el-form-item",{attrs:{label:"续费时长"}},[o("el-select",{style:{width:"100%"},attrs:{placeholder:"点击选择选择续费时长",clearable:""},on:{change:t.selectChange},model:{value:t.formData.renewalDuration,callback:function(e){t.$set(t.formData,"renewalDuration",e)},expression:"formData.renewalDuration"}},t._l(t.renewalDurationOptions,function(t,e){return o("el-option",{key:e,attrs:{label:t.label,value:t.value,disabled:t.disabled}})}),1)],1),t._v(" "),o("el-form-item",{attrs:{label:"金额"}},[o("el-row",{attrs:{gutter:20}},[o("el-col",{attrs:{span:12}},[o("div",{staticClass:"grid-contents line-through"},[t._v("原价:"+t._s(t.formData.amountPayable)+"\n ")])]),t._v(" "),o("el-col",{attrs:{span:12}},[o("div",{staticClass:"grid-content",staticStyle:{color:"#ec32e2"}},[t._v("现价:"+t._s(t.formData.nowAmountPayable))])])],1)],1)],1),t._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:t.RenewalPopUpWindow}},[t._v("取 消")]),t._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:t.ok}},[t._v("选好了, 我要续费")])],1)],1)},staticRenderFns:[]};var l=o("VU/8")(r,i,!1,function(t){o("cbNQ")},null,null);e.default=l.exports},"RY/4":function(t,e,o){var n=o("R9M2"),a=o("dSzd")("toStringTag"),r="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,o,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(o=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),a))?o:r?n(e):"Object"==(i=n(e))&&"function"==typeof e.callee?"Arguments":i}},cbNQ:function(t,e){},fxRn:function(t,e,o){o("+tPU"),o("zQR9"),t.exports=o("g8Ux")},g8Ux:function(t,e,o){var n=o("77Pl"),a=o("3fs2");t.exports=o("FeBl").getIterator=function(t){var e=a(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return n(e.call(t))}}}); -------------------------------------------------------------------------------- /codeVar/webdist/static/js/app.82b5ae9672f89c0e4e6c.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([2],{Cu81:function(t,e){},NHnr:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a("7+uW"),n={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("router-view")],1)},staticRenderFns:[]};var s=a("VU/8")({name:"App"},n,!1,function(t){a("Cu81")},null,null).exports,i=a("/ocq"),l={components:{QualityDialog:function(){return a.e(0).then(a.bind(null,"DHIY"))}},name:"HelloWorld",data:function(){return{QualityDialogFlag:!1,value:!0,set:!0,expirationTime:"",switch_paste_method:!0,any_text_match:!0,whether_to_shut_down_automatical:!0,openId:"",vipDueTime:""}},created:function(){this.getInfo(),this.switchSetting()},methods:{QualityClick:function(){this.QualityDialogFlag=!0},renewal:function(){this.getToken();var t=null;(t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("MicroSoft.XMLHTTP")).open("GET","https://codevar-api.motouguai.com/utools/info?accessToken="+window.access_token+"&renew=1",!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Content-Type","application/json"),t.onreadystatechange=function(){if(t.readyState===XMLHttpRequest.DONE&&200===t.status){var e={};try{110===(e=JSON.parse(t.responseText)).code?utools.showNotification(e.msg):111===e.code&&(utools.showNotification(e.msg),utools.openPayment({goodsId:e.data.goodsId},function(){utools.showNotification("续费成功,请稍等片刻继续使用!")}))}catch(t){alert(t)}}};try{t.send()}catch(t){alert("请求失败哈")}},renewalEvent:function(){this.renewal()},switchChange:function(){console.log(this.whether_to_shut_down_automatical),this.whether_to_shut_down_automatical?utools.dbStorage.setItem("whether_to_shut_down_automatical","1"):utools.dbStorage.setItem("whether_to_shut_down_automatical","0"),this.any_text_match?(this.addany_text_match(),utools.dbStorage.setItem("any_text_match","1")):(this.removeany_text_match(),utools.dbStorage.setItem("any_text_match","0")),this.switch_paste_method?utools.dbStorage.setItem("switch_paste_method","0"):utools.dbStorage.setItem("switch_paste_method","1")},switchSetting:function(){var t=utools.dbStorage.getItem("whether_to_shut_down_automatical");console.log(t),null===t?(utools.dbStorage.setItem("whether_to_shut_down_automatical","1"),this.whether_to_shut_down_automatical=!0):(console.log("whetherToShutDownAutomatical"),this.whether_to_shut_down_automatical="1"===t);var e=utools.dbStorage.getItem("any_text_match");null===e?(utools.dbStorage.setItem("any_text_match","0"),this.any_text_match=!1):this.any_text_match="1"===e;var a=utools.dbStorage.getItem("switch_paste_method");null===a?(utools.dbStorage.setItem("switch_paste_method","0"),this.switch_paste_method=!0):this.switch_paste_method="1"!==a,console.log(t,e,a)},removeany_text_match:function(){utools.removeFeature("switch_any_text")},addany_text_match:function(){utools.setFeature({code:"switch_any_text",explain:"使用变量快速翻译命名插件",cmds:[{type:"over",label:"选择格式后进行命名"}]})},getInfo:function(){this.getToken();var t=null;(t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("MicroSoft.XMLHTTP")).open("GET","https://codevar-api.motouguai.com/utools/info?accessToken="+window.access_token,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Content-Type","application/json");var e=this;t.onreadystatechange=function(){if(t.readyState===XMLHttpRequest.DONE&&200===t.status){var a={};try{a=JSON.parse(t.responseText),e.openId=a.data.openId,e.vipDueTime=a.data.vipDueTime}catch(t){alert(t)}}};try{t.send()}catch(t){alert("请求失败哈")}},getToken:function(t){console.log("getToken"+t);var e=utools.db.get("token"),a=utools.db.get("token_time");if(null!=e&&null!=a){if(Date.now()-a.data<61e5&&!0!==t)return void(window.access_token=e.data);utools.fetchUserServerTemporaryToken().then(function(t){window.access_token=t.token,utools.db.put({_id:"token",data:t.token,_rev:e._rev}),utools.db.put({_id:"token_time",data:Date.now(),_rev:a._rev})})}else utools.fetchUserServerTemporaryToken().then(function(t){window.access_token=t.token,utools.db.put({_id:"token",data:t.token}),utools.db.put({_id:"token_time",data:Date.now()})})}}},c={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"container",attrs:{id:"app"}},[a("el-form",{attrs:{size:"medium","label-width":"100px","label-position":"right"}},[a("el-row",{staticClass:"row-bg el-dialog__title text_center",attrs:{gutter:20}},[t._v("\n 设置选项\n ")]),t._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("div",{staticClass:"grid-content"})]),t._v(" "),a("el-col",{attrs:{span:12}},[a("div",{staticClass:"grid-content bg-purple"},[a("el-form-item",{staticClass:"el-textarea__inner",attrs:{"label-width":"45%",label:"自动关闭",prop:"whether_to_shut_down_automatical"}},[a("el-switch",{attrs:{"active-text":"选中后自动关闭"},on:{change:t.switchChange},model:{value:t.whether_to_shut_down_automatical,callback:function(e){t.whether_to_shut_down_automatical=e},expression:"whether_to_shut_down_automatical"}})],1)],1)]),t._v(" "),a("el-col",{attrs:{span:6}},[a("div",{staticClass:"grid-content"})])],1),t._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("div",{staticClass:"grid-content"})]),t._v(" "),a("el-col",{attrs:{span:12}},[a("div",{staticClass:"grid-content bg-purple"},[a("el-form-item",{staticClass:"el-textarea__inner",attrs:{"label-width":"45%",label:"输入任意文本匹配翻译",prop:"any_text_match"}},[a("el-switch",{attrs:{"active-text":"可配合超级面板使用"},on:{change:t.switchChange},model:{value:t.any_text_match,callback:function(e){t.any_text_match=e},expression:"any_text_match"}})],1)],1)]),t._v(" "),a("el-col",{attrs:{span:6}},[a("div",{staticClass:"grid-content"})])],1),t._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("div",{staticClass:"grid-content"})]),t._v(" "),a("el-col",{attrs:{span:12}},[a("div",{staticClass:"grid-content bg-purple"},[a("el-form-item",{staticClass:"el-textarea__inner",attrs:{"label-width":"45%",label:"切换粘贴方式",prop:"switch_paste_method"}},[a("el-switch",{attrs:{"active-text":"开启:模拟输入法;关闭:粘贴快捷键"},on:{change:t.switchChange},model:{value:t.switch_paste_method,callback:function(e){t.switch_paste_method=e},expression:"switch_paste_method"}})],1)],1)]),t._v(" "),a("el-col",{attrs:{span:6}},[a("div",{staticClass:"grid-content"})])],1),t._v(" "),a("el-row",{staticClass:"row-bg el-dialog__title text_center",attrs:{gutter:20}},[t._v("\n 用户信息\n ")]),t._v(" "),a("el-row",{staticClass:"row-bg",attrs:{type:"flex",justify:"center"}},[a("el-form-item",{attrs:{label:"开放ID",prop:"openId"}},[a("el-input",{style:{width:"100%"},attrs:{readonly:"",clearable:"","prefix-icon":"el-icon-user-solid"},model:{value:t.openId,callback:function(e){t.openId=e},expression:"openId"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"过期时间",prop:"vipDueTime"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"过期时间",readonly:"",clearable:"","prefix-icon":"el-icon-time"},model:{value:t.vipDueTime,callback:function(e){t.vipDueTime=e},expression:"vipDueTime"}})],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-coffee-cup",size:"small"},on:{click:t.QualityClick}},[t._v(" 续费 ")])],1)],1)],1),t._v(" "),a("QualityDialog",{attrs:{QualityDialogFlag:t.QualityDialogFlag},on:{"update:QualityDialogFlag":function(e){t.QualityDialogFlag=e},"update:quality-dialog-flag":function(e){t.QualityDialogFlag=e}}})],1)},staticRenderFns:[]};var r=a("VU/8")(l,c,!1,function(t){a("cmzI")},"data-v-a6dff188",null).exports;o.default.use(i.a);var u=new i.a({routes:[{path:"/",name:"设置",component:r}]}),_=a("zL8q"),d=a.n(_);a("tvR6");o.default.use(d.a),new o.default({el:"#app",router:u,components:{App:s},template:""})},cmzI:function(t,e){},tvR6:function(t,e){}},["NHnr"]); -------------------------------------------------------------------------------- /codeVar/webdist/static/js/manifest.3163b7ef90f05fd6b242.js: -------------------------------------------------------------------------------- 1 | !function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,s=0,l=[];s 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"] 12 | } 13 | -------------------------------------------------------------------------------- /codeVarWeb/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /codeVarWeb/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | .vscode 11 | *.suo 12 | *.ntvs* 13 | *.njsproj 14 | *.sln 15 | -------------------------------------------------------------------------------- /codeVarWeb/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /codeVarWeb/README.md: -------------------------------------------------------------------------------- 1 | # code-var-web 2 | 3 | > A Vue.js project 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | npm install 10 | 11 | # serve with hot reload at localhost:8080 12 | npm run dev 13 | 14 | # build for production with minification 15 | npm run build 16 | 17 | # build for production and view the bundle analyzer report 18 | npm run build --report 19 | ``` 20 | 21 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 22 | -------------------------------------------------------------------------------- /codeVarWeb/build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | process.env.NODE_ENV = 'production' 5 | 6 | const ora = require('ora') 7 | const rm = require('rimraf') 8 | const path = require('path') 9 | const chalk = require('chalk') 10 | const webpack = require('webpack') 11 | const config = require('../config') 12 | const webpackConfig = require('./webpack.prod.conf') 13 | 14 | const spinner = ora('building for production...') 15 | spinner.start() 16 | 17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, (err, stats) => { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write(stats.toString({ 23 | colors: true, 24 | modules: false, 25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. 26 | chunks: false, 27 | chunkModules: false 28 | }) + '\n\n') 29 | 30 | if (stats.hasErrors()) { 31 | console.log(chalk.red(' Build failed with errors.\n')) 32 | process.exit(1) 33 | } 34 | 35 | console.log(chalk.cyan(' Build complete.\n')) 36 | console.log(chalk.yellow( 37 | ' Tip: built files are meant to be served over an HTTP server.\n' + 38 | ' Opening index.html over file:// won\'t work.\n' 39 | )) 40 | }) 41 | }) 42 | -------------------------------------------------------------------------------- /codeVarWeb/build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec (cmd) { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | } 17 | ] 18 | 19 | if (shell.which('npm')) { 20 | versionRequirements.push({ 21 | name: 'npm', 22 | currentVersion: exec('npm --version'), 23 | versionRequirement: packageConfig.engines.npm 24 | }) 25 | } 26 | 27 | module.exports = function () { 28 | const warnings = [] 29 | 30 | for (let i = 0; i < versionRequirements.length; i++) { 31 | const mod = versionRequirements[i] 32 | 33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 34 | warnings.push(mod.name + ': ' + 35 | chalk.red(mod.currentVersion) + ' should be ' + 36 | chalk.green(mod.versionRequirement) 37 | ) 38 | } 39 | } 40 | 41 | if (warnings.length) { 42 | console.log('') 43 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 44 | console.log() 45 | 46 | for (let i = 0; i < warnings.length; i++) { 47 | const warning = warnings[i] 48 | console.log(' ' + warning) 49 | } 50 | 51 | console.log() 52 | process.exit(1) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /codeVarWeb/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiaoanqiao/codevar/f4469730bf41b683db37f41dc90f7838c1099f39/codeVarWeb/build/logo.png -------------------------------------------------------------------------------- /codeVarWeb/build/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const config = require('../config') 4 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | const packageConfig = require('../package.json') 6 | 7 | exports.assetsPath = function (_path) { 8 | const assetsSubDirectory = process.env.NODE_ENV === 'production' 9 | ? config.build.assetsSubDirectory 10 | : config.dev.assetsSubDirectory 11 | 12 | return path.posix.join(assetsSubDirectory, _path) 13 | } 14 | 15 | exports.cssLoaders = function (options) { 16 | options = options || {} 17 | 18 | const cssLoader = { 19 | loader: 'css-loader', 20 | options: { 21 | sourceMap: options.sourceMap 22 | } 23 | } 24 | 25 | const postcssLoader = { 26 | loader: 'postcss-loader', 27 | options: { 28 | sourceMap: options.sourceMap 29 | } 30 | } 31 | 32 | // generate loader string to be used with extract text plugin 33 | function generateLoaders (loader, loaderOptions) { 34 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] 35 | 36 | if (loader) { 37 | loaders.push({ 38 | loader: loader + '-loader', 39 | options: Object.assign({}, loaderOptions, { 40 | sourceMap: options.sourceMap 41 | }) 42 | }) 43 | } 44 | 45 | // Extract CSS when that option is specified 46 | // (which is the case during production build) 47 | if (options.extract) { 48 | return ExtractTextPlugin.extract({ 49 | use: loaders, 50 | fallback: 'vue-style-loader' 51 | }) 52 | } else { 53 | return ['vue-style-loader'].concat(loaders) 54 | } 55 | } 56 | 57 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 58 | return { 59 | css: generateLoaders(), 60 | postcss: generateLoaders(), 61 | less: generateLoaders('less'), 62 | sass: generateLoaders('sass', { indentedSyntax: true }), 63 | scss: generateLoaders('sass'), 64 | stylus: generateLoaders('stylus'), 65 | styl: generateLoaders('stylus') 66 | } 67 | } 68 | 69 | // Generate loaders for standalone style files (outside of .vue) 70 | exports.styleLoaders = function (options) { 71 | const output = [] 72 | const loaders = exports.cssLoaders(options) 73 | 74 | for (const extension in loaders) { 75 | const loader = loaders[extension] 76 | output.push({ 77 | test: new RegExp('\\.' + extension + '$'), 78 | use: loader 79 | }) 80 | } 81 | 82 | return output 83 | } 84 | 85 | exports.createNotifierCallback = () => { 86 | const notifier = require('node-notifier') 87 | 88 | return (severity, errors) => { 89 | if (severity !== 'error') return 90 | 91 | const error = errors[0] 92 | const filename = error.file && error.file.split('!').pop() 93 | 94 | notifier.notify({ 95 | title: packageConfig.name, 96 | message: severity + ': ' + error.name, 97 | subtitle: filename || '', 98 | icon: path.join(__dirname, 'logo.png') 99 | }) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /codeVarWeb/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /codeVarWeb/build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const config = require('../config') 5 | const vueLoaderConfig = require('./vue-loader.conf') 6 | 7 | function resolve (dir) { 8 | return path.join(__dirname, '..', dir) 9 | } 10 | 11 | 12 | 13 | module.exports = { 14 | context: path.resolve(__dirname, '../'), 15 | entry: { 16 | app: './src/main.js' 17 | }, 18 | output: { 19 | path: config.build.assetsRoot, 20 | filename: '[name].js', 21 | publicPath: process.env.NODE_ENV === 'production' 22 | ? config.build.assetsPublicPath 23 | : config.dev.assetsPublicPath 24 | }, 25 | resolve: { 26 | extensions: ['.js', '.vue', '.json'], 27 | alias: { 28 | 'vue$': 'vue/dist/vue.esm.js', 29 | '@': resolve('src'), 30 | } 31 | }, 32 | module: { 33 | rules: [ 34 | { 35 | test: /\.vue$/, 36 | loader: 'vue-loader', 37 | options: vueLoaderConfig 38 | }, 39 | { 40 | test: /\.js$/, 41 | loader: 'babel-loader', 42 | include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] 43 | }, 44 | { 45 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 46 | loader: 'url-loader', 47 | options: { 48 | limit: 10000, 49 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 50 | } 51 | }, 52 | { 53 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 54 | loader: 'url-loader', 55 | options: { 56 | limit: 10000, 57 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 58 | } 59 | }, 60 | { 61 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 62 | loader: 'url-loader', 63 | options: { 64 | limit: 10000, 65 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 66 | } 67 | } 68 | ] 69 | }, 70 | node: { 71 | // prevent webpack from injecting useless setImmediate polyfill because Vue 72 | // source contains it (although only uses it if it's native). 73 | setImmediate: false, 74 | // prevent webpack from injecting mocks to Node native modules 75 | // that does not make sense for the client 76 | dgram: 'empty', 77 | fs: 'empty', 78 | net: 'empty', 79 | tls: 'empty', 80 | child_process: 'empty' 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /codeVarWeb/build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const webpack = require('webpack') 4 | const config = require('../config') 5 | const merge = require('webpack-merge') 6 | const path = require('path') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 11 | const portfinder = require('portfinder') 12 | 13 | const HOST = process.env.HOST 14 | const PORT = process.env.PORT && Number(process.env.PORT) 15 | 16 | const devWebpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) 19 | }, 20 | // cheap-module-eval-source-map is faster for development 21 | devtool: config.dev.devtool, 22 | 23 | // these devServer options should be customized in /config/index.js 24 | devServer: { 25 | clientLogLevel: 'warning', 26 | historyApiFallback: { 27 | rewrites: [ 28 | { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }, 29 | ], 30 | }, 31 | hot: true, 32 | contentBase: false, // since we use CopyWebpackPlugin. 33 | compress: true, 34 | host: HOST || config.dev.host, 35 | port: PORT || config.dev.port, 36 | open: config.dev.autoOpenBrowser, 37 | overlay: config.dev.errorOverlay 38 | ? { warnings: false, errors: true } 39 | : false, 40 | publicPath: config.dev.assetsPublicPath, 41 | proxy: config.dev.proxyTable, 42 | quiet: true, // necessary for FriendlyErrorsPlugin 43 | watchOptions: { 44 | poll: config.dev.poll, 45 | } 46 | }, 47 | plugins: [ 48 | new webpack.DefinePlugin({ 49 | 'process.env': require('../config/dev.env') 50 | }), 51 | new webpack.HotModuleReplacementPlugin(), 52 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. 53 | new webpack.NoEmitOnErrorsPlugin(), 54 | // https://github.com/ampedandwired/html-webpack-plugin 55 | new HtmlWebpackPlugin({ 56 | filename: 'index.html', 57 | template: 'index.html', 58 | inject: true 59 | }), 60 | // copy custom static assets 61 | new CopyWebpackPlugin([ 62 | { 63 | from: path.resolve(__dirname, '../static'), 64 | to: config.dev.assetsSubDirectory, 65 | ignore: ['.*'] 66 | } 67 | ]) 68 | ] 69 | }) 70 | 71 | module.exports = new Promise((resolve, reject) => { 72 | portfinder.basePort = process.env.PORT || config.dev.port 73 | portfinder.getPort((err, port) => { 74 | if (err) { 75 | reject(err) 76 | } else { 77 | // publish the new Port, necessary for e2e tests 78 | process.env.PORT = port 79 | // add port to devServer config 80 | devWebpackConfig.devServer.port = port 81 | 82 | // Add FriendlyErrorsPlugin 83 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ 84 | compilationSuccessInfo: { 85 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], 86 | }, 87 | onErrors: config.dev.notifyOnErrors 88 | ? utils.createNotifierCallback() 89 | : undefined 90 | })) 91 | 92 | resolve(devWebpackConfig) 93 | } 94 | }) 95 | }) 96 | -------------------------------------------------------------------------------- /codeVarWeb/build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const webpack = require('webpack') 5 | const config = require('../config') 6 | const merge = require('webpack-merge') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') 13 | 14 | const env = require('../config/prod.env') 15 | 16 | const webpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ 19 | sourceMap: config.build.productionSourceMap, 20 | extract: true, 21 | usePostCSS: true 22 | }) 23 | }, 24 | devtool: config.build.productionSourceMap ? config.build.devtool : false, 25 | output: { 26 | path: config.build.assetsRoot, 27 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 28 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 29 | }, 30 | plugins: [ 31 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 32 | new webpack.DefinePlugin({ 33 | 'process.env': env 34 | }), 35 | new UglifyJsPlugin({ 36 | uglifyOptions: { 37 | compress: { 38 | warnings: false 39 | } 40 | }, 41 | sourceMap: config.build.productionSourceMap, 42 | parallel: true 43 | }), 44 | // extract css into its own file 45 | new ExtractTextPlugin({ 46 | filename: utils.assetsPath('css/[name].[contenthash].css'), 47 | // Setting the following option to `false` will not extract CSS from codesplit chunks. 48 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. 49 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 50 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 51 | allChunks: true, 52 | }), 53 | // Compress extracted CSS. We are using this plugin so that possible 54 | // duplicated CSS from different components can be deduped. 55 | new OptimizeCSSPlugin({ 56 | cssProcessorOptions: config.build.productionSourceMap 57 | ? { safe: true, map: { inline: false } } 58 | : { safe: true } 59 | }), 60 | // generate dist index.html with correct asset hash for caching. 61 | // you can customize output by editing /index.html 62 | // see https://github.com/ampedandwired/html-webpack-plugin 63 | new HtmlWebpackPlugin({ 64 | filename: config.build.index, 65 | template: 'index.html', 66 | inject: true, 67 | minify: { 68 | removeComments: true, 69 | collapseWhitespace: true, 70 | removeAttributeQuotes: true 71 | // more options: 72 | // https://github.com/kangax/html-minifier#options-quick-reference 73 | }, 74 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 75 | chunksSortMode: 'dependency' 76 | }), 77 | // keep module.id stable when vendor modules does not change 78 | new webpack.HashedModuleIdsPlugin(), 79 | // enable scope hoisting 80 | new webpack.optimize.ModuleConcatenationPlugin(), 81 | // split vendor js into its own file 82 | new webpack.optimize.CommonsChunkPlugin({ 83 | name: 'vendor', 84 | minChunks (module) { 85 | // any required modules inside node_modules are extracted to vendor 86 | return ( 87 | module.resource && 88 | /\.js$/.test(module.resource) && 89 | module.resource.indexOf( 90 | path.join(__dirname, '../node_modules') 91 | ) === 0 92 | ) 93 | } 94 | }), 95 | // extract webpack runtime and module manifest to its own file in order to 96 | // prevent vendor hash from being updated whenever app bundle is updated 97 | new webpack.optimize.CommonsChunkPlugin({ 98 | name: 'manifest', 99 | minChunks: Infinity 100 | }), 101 | // This instance extracts shared chunks from code splitted chunks and bundles them 102 | // in a separate chunk, similar to the vendor chunk 103 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk 104 | new webpack.optimize.CommonsChunkPlugin({ 105 | name: 'app', 106 | async: 'vendor-async', 107 | children: true, 108 | minChunks: 3 109 | }), 110 | 111 | // copy custom static assets 112 | new CopyWebpackPlugin([ 113 | { 114 | from: path.resolve(__dirname, '../static'), 115 | to: config.build.assetsSubDirectory, 116 | ignore: ['.*'] 117 | } 118 | ]) 119 | ] 120 | }) 121 | 122 | if (config.build.productionGzip) { 123 | const CompressionWebpackPlugin = require('compression-webpack-plugin') 124 | 125 | webpackConfig.plugins.push( 126 | new CompressionWebpackPlugin({ 127 | asset: '[path].gz[query]', 128 | algorithm: 'gzip', 129 | test: new RegExp( 130 | '\\.(' + 131 | config.build.productionGzipExtensions.join('|') + 132 | ')$' 133 | ), 134 | threshold: 10240, 135 | minRatio: 0.8 136 | }) 137 | ) 138 | } 139 | 140 | if (config.build.bundleAnalyzerReport) { 141 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 142 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 143 | } 144 | 145 | module.exports = webpackConfig 146 | -------------------------------------------------------------------------------- /codeVarWeb/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /codeVarWeb/config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.3.1 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | module.exports = { 8 | dev: { 9 | 10 | // Paths 11 | assetsSubDirectory: 'static', 12 | assetsPublicPath: '/', 13 | proxyTable: {}, 14 | 15 | // Various Dev Server settings 16 | host: 'localhost', // can be overwritten by process.env.HOST 17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 18 | autoOpenBrowser: false, 19 | errorOverlay: true, 20 | notifyOnErrors: true, 21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 22 | 23 | 24 | /** 25 | * Source Maps 26 | */ 27 | 28 | // https://webpack.js.org/configuration/devtool/#development 29 | devtool: 'cheap-module-eval-source-map', 30 | 31 | // If you have problems debugging vue-files in devtools, 32 | // set this to false - it *may* help 33 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 34 | cacheBusting: true, 35 | 36 | cssSourceMap: true 37 | }, 38 | 39 | build: { 40 | // Template for index.html 41 | index: path.resolve(__dirname, '../../codeVar/webdist/index.html'), 42 | 43 | // Paths 44 | assetsRoot: path.resolve(__dirname, '../../codeVar/webdist'), 45 | assetsSubDirectory: 'static', 46 | assetsPublicPath: './', 47 | 48 | /** 49 | * Source Maps 50 | */ 51 | //出错解释 52 | productionSourceMap: false, 53 | // https://webpack.js.org/configuration/devtool/#production 54 | devtool: '#source-map', 55 | 56 | // Gzip off by default as many popular static hosts such as 57 | // Surge or Netlify already gzip all static assets for you. 58 | // Before setting to `true`, make sure to: 59 | // npm install --save-dev compression-webpack-plugin 60 | productionGzip: false, 61 | productionGzipExtensions: ['js', 'css'], 62 | 63 | // Run the build command with an extra argument to 64 | // View the bundle analyzer report after build finishes: 65 | // `npm run build --report` 66 | // Set to `true` or `false` to always turn it on or off 67 | bundleAnalyzerReport: process.env.npm_config_report 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /codeVarWeb/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /codeVarWeb/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | code-var-web 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /codeVarWeb/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "code-var-web", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "qiaoanqiao", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "build": "node build/build.js" 11 | }, 12 | "dependencies": { 13 | "alife-logger": "^1.8.30", 14 | "element-ui": "^2.15.9", 15 | "vue": "^2.5.2", 16 | "vue-router": "^3.0.1" 17 | }, 18 | "devDependencies": { 19 | "autoprefixer": "^7.1.2", 20 | "babel-core": "^6.22.1", 21 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 22 | "babel-loader": "^7.1.1", 23 | "babel-plugin-syntax-jsx": "^6.18.0", 24 | "babel-plugin-transform-runtime": "^6.22.0", 25 | "babel-plugin-transform-vue-jsx": "^3.5.0", 26 | "babel-preset-env": "^1.3.2", 27 | "babel-preset-stage-2": "^6.22.0", 28 | "chalk": "^2.0.1", 29 | "copy-webpack-plugin": "^4.0.1", 30 | "css-loader": "^0.28.0", 31 | "extract-text-webpack-plugin": "^3.0.0", 32 | "file-loader": "^1.1.4", 33 | "friendly-errors-webpack-plugin": "^1.6.1", 34 | "html-webpack-plugin": "^2.30.1", 35 | "node-notifier": "^5.1.2", 36 | "optimize-css-assets-webpack-plugin": "^3.2.0", 37 | "ora": "^1.2.0", 38 | "portfinder": "^1.0.13", 39 | "postcss-import": "^11.0.0", 40 | "postcss-loader": "^2.0.8", 41 | "postcss-url": "^7.2.1", 42 | "rimraf": "^2.6.0", 43 | "semver": "^5.3.0", 44 | "shelljs": "^0.7.6", 45 | "uglifyjs-webpack-plugin": "^1.1.1", 46 | "url-loader": "^0.5.8", 47 | "vue-loader": "^13.3.0", 48 | "vue-style-loader": "^3.0.1", 49 | "vue-template-compiler": "^2.5.2", 50 | "webpack": "^3.6.0", 51 | "webpack-bundle-analyzer": "^2.9.0", 52 | "webpack-dev-server": "^2.9.1", 53 | "webpack-merge": "^4.1.0" 54 | }, 55 | "engines": { 56 | "node": ">= 6.0.0", 57 | "npm": ">= 3.0.0" 58 | }, 59 | "browserslist": [ 60 | "> 1%", 61 | "last 2 versions", 62 | "not ie <= 8" 63 | ] 64 | } 65 | -------------------------------------------------------------------------------- /codeVarWeb/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 23 | -------------------------------------------------------------------------------- /codeVarWeb/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiaoanqiao/codevar/f4469730bf41b683db37f41dc90f7838c1099f39/codeVarWeb/src/assets/logo.png -------------------------------------------------------------------------------- /codeVarWeb/src/components/Setting.vue: -------------------------------------------------------------------------------- 1 | 2 | 60 | 61 | 286 | 287 | 288 | 346 | -------------------------------------------------------------------------------- /codeVarWeb/src/components/dialog/RenewDialog.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 189 | 213 | -------------------------------------------------------------------------------- /codeVarWeb/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | import ElementUI from 'element-ui'; 7 | import 'element-ui/lib/theme-chalk/index.css'; 8 | 9 | Vue.use(ElementUI); 10 | // Vue.config.productionTip = false 11 | 12 | /* eslint-disable no-new */ 13 | new Vue({ 14 | el: '#app', 15 | router, 16 | components: { App }, 17 | template: '' 18 | }) 19 | -------------------------------------------------------------------------------- /codeVarWeb/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import Setting from '@/components/Setting.vue' 4 | 5 | Vue.use(Router) 6 | 7 | export default new Router({ 8 | routes: [ 9 | { 10 | path: '/', 11 | name: '设置', 12 | component: Setting 13 | } 14 | ] 15 | }) 16 | -------------------------------------------------------------------------------- /codeVarWeb/static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiaoanqiao/codevar/f4469730bf41b683db37f41dc90f7838c1099f39/codeVarWeb/static/.gitkeep -------------------------------------------------------------------------------- /introduce.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiaoanqiao/codevar/f4469730bf41b683db37f41dc90f7838c1099f39/introduce.gif --------------------------------------------------------------------------------