├── semicolon.js ├── test ├── 1.js ├── 2.js └── test.sh ├── .jshintrc ├── logo.png ├── .travis.yml ├── bower.json ├── package.json ├── PATENTS ├── README.md ├── CODE_OF_CONDUCT.md └── CLA.txt /semicolon.js: -------------------------------------------------------------------------------- 1 | ; 2 | -------------------------------------------------------------------------------- /test/1.js: -------------------------------------------------------------------------------- 1 | var x = 1 2 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "-W032": true 3 | } 4 | -------------------------------------------------------------------------------- /test/2.js: -------------------------------------------------------------------------------- 1 | +1 2 | require('assert')(x===1) 3 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dchest/semicolon-js/HEAD/logo.png -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.11" 4 | - "0.10" 5 | - "0.8" 6 | -------------------------------------------------------------------------------- /test/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BASEDIR=$(dirname $0) 4 | 5 | cat $BASEDIR/1.js $BASEDIR/../semicolon.js $BASEDIR/2.js | node 6 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "semicolon", 3 | "version": "0.0.1", 4 | "homepage": "https://github.com/dchest/semicolon-js", 5 | "authors": [ 6 | "Dmitry Chestnykh " 7 | ], 8 | "description": "The most useful JavaScript library for cargo cult programmers", 9 | "main": "semicolon.js", 10 | "keywords": [ 11 | "semicolon", 12 | "concatenation" 13 | ], 14 | "license": "Public domain", 15 | "ignore": [ 16 | "**/.*", 17 | "node_modules", 18 | "bower_components", 19 | "test", 20 | "tests", 21 | "package.json", 22 | "PATENTS", 23 | "CLA.txt" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "semicolon", 3 | "version": "0.0.1", 4 | "description": "The most useful JavaScript library for cargo cult programmers", 5 | "main": "semicolon.js", 6 | "directories": { 7 | "test": "test" 8 | }, 9 | "scripts": { 10 | "test": "sh test/test.sh" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git://github.com/dchest/semicolon-js.git" 15 | }, 16 | "keywords": [ 17 | "semicolon", 18 | "concatenation" 19 | ], 20 | "author": "Dmitry Chestnykh", 21 | "license": "Public domain", 22 | "bugs": { 23 | "url": "https://github.com/dchest/semicolon-js/issues" 24 | }, 25 | "homepage": "https://github.com/dchest/semicolon-js" 26 | } 27 | -------------------------------------------------------------------------------- /PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | Coding Robots hereby grants to You a perpetual, worldwide, non-exclusive, 4 | no-charge, royalty-free, irrevocable (except as stated in this section) 5 | patent license to make, have made, use, offer to sell, sell, import, 6 | transfer and otherwise run, modify and propagate the contents of this 7 | implementation of Semicolon.js, where such license applies only to those patent 8 | claims, both currently owned or controlled by Google and acquired in the 9 | future, licensable by Coding Robots that are necessarily infringed by this 10 | implementation of Semicolon.js. This grant does not include claims that would 11 | be infringed only as a consequence of further modification of this 12 | implementation. If you or your agent or exclusive licensee institute or 13 | order or agree to the institution of patent litigation against any 14 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 15 | that this implementation of Semicolon.js or any code incorporated within this 16 | implementation of Semicolon.js constitutes direct or contributory patent 17 | infringement, or inducement of patent infringement, then any patent 18 | rights granted to you under this License for this implementation of 19 | Semicolon.js shall terminate as of the date such litigation is filed. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | ;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; 3 | ;; ;; 4 | ;;;;;;; ;;;; ;; ;; ;;; ;; ;;;; ;;;; ;; ;;;; ;;;;; ;; 5 | ;; ;; ;; ;;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; 6 | ;; ;;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;;;;; 7 | ;;;;;; ;;;;; ;; ;; ;; ;; ;;;; ;;;; ;; ;;;; ;; ;; ;; ;; ;; 8 | ;; ;;;;; 9 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 10 | ;;;;; 11 | ``` 12 | 13 | ![Semicolon.js Logo (PNG)](logo.png) 14 | 15 | Semicolon.js 16 | ============ 17 | 18 | [![Build Status](https://travis-ci.org/dchest/semicolon-js.png)](https://travis-ci.org/dchest/semicolon-js) 19 | 20 | You no longer need to put `;` before your JavaScript code! Use Semicolon.js!!! 21 | 22 | 23 | Installation 24 | ------------ 25 | 26 | Clone this repository: 27 | 28 | git clone https://github.com/dchest/semicolon.js 29 | 30 | or using [Bower](http://bower.io): 31 | 32 | bower install semicolon 33 | 34 | 35 | Usage 36 | ----- 37 | 38 | When you want to concatenate scripts, just add Semicolon.js for every file! 39 | 40 | Example: 41 | 42 | cat file1.js semicolon.js file2.js semicolon.js > out.js 43 | 44 | 45 | 46 | T-Shirt 47 | -------- 48 | 49 | [Buy a beautiful t-shirt with Semicolon.js logo!](http://www.cafepress.com/semicolonjs.1224973466) 50 | Because [every](https://twitter.com/search?q=gulpjs%20t-shirt&src=typd) JavaScript project must have a t-shirt! 51 | All proceeds will be donated to people who bought other stupid t-shirts. 52 | 53 | 54 | FAQ 55 | --- 56 | 57 | ### I don't get it. 58 | 59 | Just stop putting a semicolon at the beginning of your code. Please. 60 | 61 | Semicolons to terminate statements are good: 62 | 63 | var x = 1; 64 | return x; 65 | 66 | A semicolon before the code to protect from people who can't concatenate files 67 | is a useless piece of junk: 68 | 69 | ;var x = 1; 70 | return x; 71 | 72 | ### Whaaaat? 73 | 74 | Apparently some people believed that to fix improper concatenation of 75 | JavaScript files (in some cases they can't be safely concatenated); 76 | they needed to prepend semicolon to their code instead of properly 77 | concatenating files. Then other JavaScript developers read 78 | their code and [continued this unfortunate tradition](https://en.wikipedia.org/wiki/Cargo_cult_programming). 79 | 80 | If you'll ever see this code: 81 | 82 | ;function()... 83 | 84 | tell its author to use Semicolon.js instead of putting semicolon there. 85 | 86 | 87 | ### How is it different from [vapor.js](https://github.com/madrobby/vapor.js) or earlier [semicolon.js](https://github.com/madrobby/semicolon.js)? 88 | 89 | These frameworks are jokes; my Semicolon.js is a real deal and comes with ideology (see above). 90 | 91 | 92 | License 93 | ------- 94 | 95 | Written in 2014 by Dmitry Chestnykh 96 | 97 | To the extent possible under law, the author(s) have dedicated all copyright 98 | and related and neighboring rights to this software to the public domain 99 | worldwide. This software is distributed without any warranty. 100 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | nationality, personal appearance, race, religion, or sexual identity and 10 | orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at the issue tracker. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | 69 | ## Attribution 70 | 71 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 72 | version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 73 | 74 | [homepage]: http://contributor-covenant.org 75 | [version]: http://contributor-covenant.org/version/1/4/ 76 | -------------------------------------------------------------------------------- /CLA.txt: -------------------------------------------------------------------------------- 1 | Please fill in this Contributor License Agreement and then send it to 2 | /dev/null: 3 | 4 | $ cat CLA.txt > /dev/null 5 | 6 | Once /dev/null receives your CLA, make sure to mention this fact 7 | in your pull request. 8 | 9 | ========================================================================= 10 | 11 | 12 | 13 | Full name: ____________________________ E-Mail: ______________________ 14 | 15 | 16 | 17 | Mailing Address: ______________________ Telephone: ___________________ 18 | 19 | 20 | 21 | _______________________________________ Facsimile: ___________________ 22 | 23 | 24 | 25 | _______________________________________ Country: ___________________ 26 | 27 | 28 | You accept and agree to the following terms and conditions for Your present and 29 | future Contributions submitted to Coding Robots. Except for the license granted 30 | herein to Coding Robots and recipients of software distributed by Coding 31 | Robots, You reserve all right, title, and interest in and to Your 32 | Contributions. 33 | 34 | Definitions. 35 | 36 | "You" (or "Your") shall mean the copyright owner or legal entity authorized by 37 | the copyright owner that is making this Agreement with Coding Robots. For legal 38 | entities, the entity making a Contribution and all other entities that control, 39 | are controlled by, or are under common control with that entity are considered 40 | to be a single Contributor. For the purposes of this definition, "control" 41 | means (i) the power, direct or indirect, to cause the direction or management 42 | of such entity, whether by contract or otherwise, or (ii) ownership of fifty 43 | percent (50%) or more of the outstanding shares, or (iii) beneficial ownership 44 | of such entity. 45 | 46 | "Contribution" shall mean any original work of authorship, including any 47 | modifications or additions to an existing work, that is intentionally submitted 48 | by You to Coding Robots for inclusion in, or documentation of, any of the 49 | products owned or managed by Coding Robots (the "Work"). For the purposes of 50 | this definition, "submitted" means any form of electronic, verbal, or written 51 | communication sent to Coding Robots or its representatives, including but not 52 | limited to communication on electronic mailing lists, source code control 53 | systems, and issue tracking systems that are managed by, or on behalf of, 54 | Coding Robots for the purpose of discussing and improving the Work, but 55 | excluding communication that is conspicuously marked or otherwise designated in 56 | writing by You as "Not a Contribution." 57 | 58 | Grant of Copyright License. Subject to the terms and conditions of this 59 | Agreement, You hereby grant to Coding Robots and to recipients of software 60 | distributed by Coding Robots a perpetual, worldwide, non-exclusive, no-charge, 61 | royalty-free, irrevocable copyright license to reproduce, prepare derivative 62 | works of, publicly display, publicly perform, sublicense, and distribute Your 63 | Contributions and such derivative works. 64 | 65 | Grant of Patent License. Subject to the terms and conditions of this Agreement, 66 | You hereby grant to Coding Robots and to recipients of software distributed by 67 | Coding Robots a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 68 | irrevocable (except as stated in this section) patent license to make, have 69 | made, use, offer to sell, sell, import, and otherwise transfer the Work, where 70 | such license applies only to those patent claims licensable by You that are 71 | necessarily infringed by Your Contribution(s) alone or by combination of Your 72 | Contribution(s) with the Work to which such Contribution(s) was submitted. If 73 | any entity institutes patent litigation against You or any other entity 74 | (including a cross-claim or counterclaim in a lawsuit) alleging that your 75 | Contribution, or the Work to which you have contributed, constitutes direct or 76 | contributory patent infringement, then any patent licenses granted to that 77 | entity under this Agreement for that Contribution or Work shall terminate as of 78 | the date such litigation is filed. 79 | 80 | You represent that you are legally entitled to grant the above license. If your 81 | employer(s) has rights to intellectual property that you create that includes 82 | your Contributions, you represent that you have received permission to make 83 | Contributions on behalf of that employer, that your employer has waived such 84 | rights for your Contributions to Coding Robots, or that your employer has 85 | executed a separate Corporate CLA with Coding Robots. 86 | 87 | You represent that each of Your Contributions is Your original creation (see 88 | section 7 for submissions on behalf of others). You represent that Your 89 | Contribution submissions include complete details of any third-party license or 90 | other restriction (including, but not limited to, related patents and 91 | trademarks) of which you are personally aware and which are associated with any 92 | part of Your Contributions. 93 | 94 | You are not expected to provide support for Your Contributions, except to the 95 | extent You desire to provide support. You may provide support for free, for a 96 | fee, or not at all. Unless required by applicable law or agreed to in writing, 97 | You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR 98 | CONDITIONS OF ANY KIND, either express or implied, including, without 99 | limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, 100 | MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. 101 | 102 | Should You wish to submit work that is not Your original creation, You may 103 | submit it to Coding Robots separately from any Contribution, identifying the 104 | complete details of its source and of any license or other restriction 105 | (including, but not limited to, related patents, trademarks, and license 106 | agreements) of which you are personally aware, and conspicuously marking the 107 | work as "Submitted on behalf of a third-party: [[]named here]". 108 | 109 | You agree to notify Coding Robots of any facts or circumstances of which you 110 | become aware that would make these representations inaccurate in any respect. 111 | 112 | 113 | 114 | Please sign: __________________________________ Date: ________________ 115 | --------------------------------------------------------------------------------