Skip to content

Commit

Permalink
Merge 55fae0b into 4679b77
Browse files Browse the repository at this point in the history
  • Loading branch information
RobLoach committed Jun 30, 2015
2 parents 4679b77 + 55fae0b commit 480a64b
Show file tree
Hide file tree
Showing 20 changed files with 68 additions and 86 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
charset = utf-8
end_of_line = lf
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

Expand Down
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@ node_js:
- "0.12"
- "iojs"

after_success: npm run coveralls
after_success:
- npm run coverage
- npm i coveralls
- cat ./coverage/lcov.info | coveralls

notifications:
email:
on_success: never
4 changes: 4 additions & 0 deletions History.md → HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.1.0: 2015-06-30

- Updated Boilerplate

## v0.0.1: 2015-03-29

- Use `'html'` as output format
Expand Down
24 changes: 0 additions & 24 deletions LICENSE

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The MIT License (MIT)

Copyright (c) 2015 [JSTransformers Team](https://github.com/orgs/jstransformers/people)

> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# jstransformer-cdata-js

Transformer that converts a string to an XML CDATA.
Transformer that converts a JavaScript string to an XML CDATA.

[![Build Status](https://img.shields.io/travis/jstransformers/jstransformer-cdata-js/master.svg)](https://travis-ci.org/jstransformers/jstransformer-cdata-js)
[![Coverage Status](https://img.shields.io/coveralls/jstransformers/jstransformer-cdata-js/master.svg)](https://coveralls.io/r/jstransformers/jstransformer-cdata-js?branch=master)
[![Dependency Status](https://img.shields.io/david/jstransformers/jstransformer-cdata-js/master.svg)](http://david-dm.org/jstransformers/jstransformer-cdata-js)
[![NPM version](https://img.shields.io/npm/v/jstransformer-cdata-js.svg)](https://www.npmjs.org/package/jstransformer-cdata-js)

## Installation
Expand All @@ -15,16 +16,14 @@ Transformer that converts a string to an XML CDATA.
```js
var cdata = require('jstransformer')(require('jstransformer-cdata-js'))

console.log(cdata.render('"hello world"').body)
// Prints:
// //<![CDATA[
cdata.render('"hello world"').body
// <![CDATA[
// "hello world"
// //]]>

// ']]>' is properly escaped:
console.log(cdata.render('var str = "<[[goodbye world]]>"').body)
// Prints:
// //<![CDATA[
cdata.render('var str = "<[[goodbye world]]>"').body
// <![CDATA[
// var str = "<[[goodbye world]]]]><![CDATA[>"
// //]]>
```
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ exports.outputFormat = 'html';
exports.render = function (str, options) {
var escaped = str.replace(re, "]]]]><![CDATA[>");
return '//<![CDATA[\n' + escaped + '\n//]]>';
}
};
22 changes: 13 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
{
"name": "jstransformer-cdata-js",
"version": "0.0.1",
"description": "A transformer that transforms a JavaScript string into XML CDATA.",
"version": "0.1.0",
"description": "JSTransformer that transforms a JavaScript string into XML CDATA.",
"keywords": [
"jstransformer",
"cdata",
"xml",
"javascript"
],
"files": [
"index.js"
],
"devDependencies": {
"coveralls": "^2.11.2",
"istanbul": "^0.3.5"
"test-jstransformer": "^1.0.0"
},
"scripts": {
"test": "node test",
"coverage": "istanbul cover test",
"coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls"
"test": "test-jstransformer",
"coverage": "test-jstransformer coverage"
},
"repository": {
"type": "git",
"url": "https://github.com/jstransformers/jstransformer-cdata-js.git"
"url": "https://github.com/jstransformers/jstransformer-foo.git"
},
"author": {
"name": "JSTransformers Team",
"url": "http://github.com/orgs/jstransformers/people"
},
"author": "Timothy Gu <timothygu99@gmail.com>",
"license": "MIT"
}
1 change: 1 addition & 0 deletions test/advanced/dependencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions test/advanced/locals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions test/advanced/options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
41 changes: 0 additions & 41 deletions test/index.js

This file was deleted.

1 change: 1 addition & 0 deletions test/simple/dependencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions test/simple/locals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions test/simple/options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}

0 comments on commit 480a64b

Please sign in to comment.