Skip to content

Commit fc993d7

Browse files
committed
add travis & coveralls
1 parent fc996e1 commit fc993d7

3 files changed

Lines changed: 53 additions & 1 deletion

File tree

.coveralls.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
repo_token: BfeaLd9HX4i2tDoYNO0F2P8mRXApyEK4R

.travis.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
language: node_js
2+
node_js:
3+
- '0.12'
4+
cache:
5+
bundler: true
6+
directories:
7+
- node_modules # NPM package
8+
notifications:
9+
email: false
10+
webhooks:
11+
urls:
12+
- https://webhooks.gitter.im/e/f1d48355795bf25a8f9a
13+
on_success: change
14+
on_failure: always
15+
on_start: never
16+
script: npm run cover
17+
after_success: cat /home/travis/build/glayzzle/php-transpiler/coverage/lcov.info | /home/travis/build/glayzzle/php-transpiler/node_modules/coveralls/bin/coveralls.js

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,36 @@
11
# php-transpiler
2-
Transpiler API to convert php-parser AST to Javascript
2+
3+
Transpiler API to convert [php-parser](https://github.com/glayzzle/php-parser) AST to Javascript
4+
5+
6+
[![npm version](https://badge.fury.io/js/php-transpiler.svg)](https://www.npmjs.com/package/php-transpiler)
7+
[![Build Status](https://travis-ci.org/glayzzle/php-transpiler.svg?branch=master)](https://travis-ci.org/glayzzle/php-transpiler)
8+
[![Coverage Status](https://coveralls.io/repos/github/glayzzle/php-transpiler/badge.svg?branch=master)](https://coveralls.io/github/glayzzle/php-transpiler?branch=master)
9+
[![Gitter](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/glayzzle/Lobby)
10+
11+
Installation
12+
------------
13+
14+
This library is distributed with [npm](https://www.npmjs.com/package/php-transpiler) :
15+
16+
```sh
17+
npm install php-transpiler --save
18+
```
19+
20+
Usage
21+
-----
22+
23+
```js
24+
// initialize the php parser factory class
25+
var engine = require('php-parser');
26+
var transpiler = require('php-transpiler');
27+
28+
var jsCode = transpiler.generate(
29+
engine.parseCode('<?php echo "Hello World";')
30+
);
31+
console.log(jsCode);
32+
```
33+
34+
# Misc
35+
36+
This library is released under BSD-3 license clause.

0 commit comments

Comments
 (0)