diff --git a/.travis.yml b/.travis.yml index 00dd791d..62762659 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,18 @@ -language: node_js -node_js: -- "4" -- "stable" sudo: false +language: node_js cache: directories: - - node_modules + - node_modules +notifications: + email: false +node_js: + - '4' +before_install: + - npm i -g npm@^2.0.0 +before_script: + - npm prune +after_success: + - npm run semantic-release +branches: + except: + - /^v\d+\.\d+\.\d+$/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..6d00c99e --- /dev/null +++ b/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2016, Massachusetts Institute of Technology +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 6242ffd9..5119f551 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # scratch-parser #### Parser for Scratch projects -[![Build Status](https://travis-ci.com/LLK/scratch-parser.svg?token=xzzHj4ct3SyBTpeqxnx1&branch=master)](https://travis-ci.com/LLK/scratch-parser) -[![Dependency Status](https://david-dm.org/llk/scratch-parser.svg)](https://david-dm.org/llk/scratch-parser) -[![devDependency Status](https://david-dm.org/llk/scratch-parser/dev-status.svg)](https://david-dm.org/llk/scratch-parser#info=devDependencies) +[![Build Status](https://travis-ci.org/LLK/scratch-parser.svg?branch=develop)](https://travis-ci.org/LLK/scratch-parser) +[![dependencies Status](https://david-dm.org/llk/scratch-parser/status.svg)](https://david-dm.org/llk/scratch-parser) +[![devDependencies Status](https://david-dm.org/llk/scratch-parser/dev-status.svg)](https://david-dm.org/llk/scratch-parser?type=dev) ## Overview The Scratch Parser is a [Node.js](https://nodejs.org) module that parses and validates [Scratch](https://scratch.mit.edu) projects. Internally, this utility is used for validation of Scratch projects as well as for extracting metadata from projects for research and search purposes. @@ -18,16 +18,18 @@ npm install scratch-parser #### Basic Use ```js var fs = require('fs'); -var scratchp = require('scratch-parser'); +var parser = require('scratch-parser'); var buffer = fs.readFileSync('/path/to/project.sb2'); -scratchp(buffer, function (err, project) { +parser(buffer, function (err, project) { if (err) // handle the error // do something interesting }); ``` ## Metadata +The `scratch-parser` module will append metadata about the project should validation and parsing be successful. The `_meta` object includes: + | Key | Attributes | | ----------------- | -------------------------------------------------------- | | `scripts` | `count` | @@ -66,3 +68,51 @@ make coverage ```bash make benchmark ``` + +## Committing +This project uses [semantic release](https://github.com/semantic-release/semantic-release) +to ensure version bumps follow semver so that projects using the config don't +break unexpectedly. + +In order to automatically determine the type of version bump necessary, semantic +release expects commit messages to be formatted following +[conventional-changelog](https://github.com/bcoe/conventional-changelog-standard/blob/master/convention.md). +``` +(): + + + +