Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jstransformers/boilerplate into b…
Browse files Browse the repository at this point in the history
…oilerplate

Conflicts:
	.gitignore
	.travis.yml
	README.md
	index.js
	package.json
  • Loading branch information
RobLoach committed Jun 2, 2015
2 parents 837165a + dc238c8 commit 05f94b4
Show file tree
Hide file tree
Showing 14 changed files with 101 additions and 61 deletions.
32 changes: 22 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
lib-cov
*.seed
# Logs
logs
*.log
*.csv
*.dat
*.out
*.pid
*.gz

# Runtime data
pids
logs
results
npm-debug.log
*.pid
*.seed

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules

# Users Environment Variables
.lock-wscript
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
language: node_js
sudo: false

node_js:
- "0.10"
- "0.12"
- "iojs"

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

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

## v0.1.0: 2015-06-02

- Updated Boilerplate
19 changes: 0 additions & 19 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 Forbes Lindesay

> 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.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# jstransformer-coffee-script

Transform Coffee Script to JavaScript
[CoffeeScript](http://coffeescript.org) support for [JSTransformers](http://github.com/jstransformers).

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

## Installation
Expand All @@ -12,4 +13,4 @@ Transform Coffee Script to JavaScript

## License

MIT
MIT
11 changes: 8 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
'use strict';

var coffee = require('coffee-script');
var merge = require('merge');

exports.name = 'coffee-script';
exports.inputFormats = ['coffee', 'coffee-script'];
exports.outputFormat = 'js';

exports.render = function (str, options) {
return coffee.compile(str, options);
};
exports.render = function (src, options, locals) {
// Bring the locals into the compile options.
options = merge(options || {}, locals || {});

return coffee.compile(src, options);
}
24 changes: 16 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
{
"name": "jstransformer-coffee-script",
"version": "0.0.2",
"description": "Transform Coffee Script to JavaScript",
"version": "0.1.0",
"description": "Coffee-Script support for JSTransformers.",
"keywords": [
"jstransformer"
],
"dependencies": {
"coffee-script": "^1.8.0"
"files": [
"index.js"
],
"devDependencies": {
"test-jstransformer": "^1.0.0"
},
"scripts": {
"test": "node test"
"test": "test-jstransformer",
"coverage": "test-jstransformer coverage"
},
"repository": {
"type": "git",
"url": "https://github.com/jstransformer/jstransformer-coffee-script.git"
"url": "https://github.com/jstransformers/jstransformer-coffee-script.git"
},
"author": "ForbesLindesay",
"license": "MIT"
}
"license": "MIT",
"dependencies": {
"coffee-script": "^1.8.0",
"merge": "^1.2.0"
}
}
1 change: 1 addition & 0 deletions test/dependencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
5 changes: 5 additions & 0 deletions test/expected.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var n;

n = 42;

console.log(n);
18 changes: 0 additions & 18 deletions test/index.js

This file was deleted.

2 changes: 2 additions & 0 deletions test/input.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
n = 42
console.log n
1 change: 1 addition & 0 deletions test/locals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions test/options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"bare": true
}

0 comments on commit 05f94b4

Please sign in to comment.