Skip to content

Commit

Permalink
implement 🐈
Browse files Browse the repository at this point in the history
  • Loading branch information
tunnckoCore committed Sep 22, 2015
1 parent 29168e7 commit 55ec605
Show file tree
Hide file tree
Showing 13 changed files with 161 additions and 4 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
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log

# Runtime data
pids
*.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
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).


## 0.0.0 - 2015-09-22
- Initial commit

3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Charlike Mike Reagent
Copyright (c) 2015 JSTransformers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,4 +19,3 @@ 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.

57 changes: 55 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,55 @@
# jstransformer-es6-template
es6-template support for JSTransformers
# jstransformer-es6-template [![The MIT License][license-img]][license-url]

[es6-template](https://github.com/tunnckoCore/es6-template) support for [JSTransformers][jstransformers-url]

[![travis build status][travis-img]][travis-url] [![coverage status][coveralls-img]][coveralls-url] [![dependency status][david-img]][david-url] [![npmjs.com][npmjs-img]][npmjs-url]


## Install
```
npm install jstransformer-es6-template --save
```


## Usage
> For more use-cases see the **tests** in [test folder](./test) or see the [JSTransformer API](http://github.com/jstransformers/jstransformer#api) for more details.
```js
var es6template = require('jstransformer')(require('jstransformer-es6-template'));

var locals = {
place: 'world',
user: {
name: 'Charlike'
}
};

es6template.render('Hello ${place} and ${user.name}!', locals).body
//=> 'Hello world and Charlike!'
```


## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/jstransformer-es6-template/issues/new).


## License
[The MIT License][license-url]


[npmjs-url]: https://www.npmjs.com/package/jstransformer-es6-template
[npmjs-img]: https://img.shields.io/npm/v/jstransformer-es6-template.svg

[license-url]: ./LICENSE
[license-img]: https://img.shields.io/badge/license-MIT-blue.svg

[travis-url]: https://travis-ci.org/tunnckoCore/jstransformer-es6-template
[travis-img]: https://img.shields.io/travis/tunnckoCore/jstransformer-es6-template.svg

[coveralls-url]: https://coveralls.io/r/tunnckoCore/jstransformer-es6-template
[coveralls-img]: https://img.shields.io/coveralls/tunnckoCore/jstransformer-es6-template.svg

[david-url]: https://david-dm.org/tunnckoCore/jstransformer-es6-template
[david-img]: https://img.shields.io/david/tunnckoCore/jstransformer-es6-template.svg

[jstransformers-url]: http://github.com/jstransformers
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

var es6template = require('es6-template');

exports.name = 'es6-template';
exports.inputFormats = ['es6-template'];
exports.outputFormat = 'html';

exports.compile = es6template.compile;
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "jstransformer-es6-template",
"version": "0.0.0",
"description": "es6-template support for JSTransformers",
"keywords": [
"jstransformer",
"es6-template",
"template",
"engine",
"es6"
],
"files": [
"index.js"
],
"devDependencies": {
"test-jstransformer": "^1.0.0"
},
"scripts": {
"coverage": "test-jstransformer coverage",
"test": "test-jstransformer"
},
"repository": "tunnckoCore/jstransformer-es6-template",
"author": "JSTransformers Team (https://github.com/orgs/jstransformers/people)",
"license": "MIT",
"dependencies": {
"es6-template": "^1.0.0"
}
}
1 change: 1 addition & 0 deletions test/dependencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions test/expected.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div>Hello world and Charlike!</div>
1 change: 1 addition & 0 deletions test/input.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div>Hello ${place} and ${user.name}!</div>
6 changes: 6 additions & 0 deletions test/locals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"place": "world",
"user": {
"name": "Charlike"
}
}
1 change: 1 addition & 0 deletions test/options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}

0 comments on commit 55ec605

Please sign in to comment.