Permalink
Browse files

Test in Node.js v0.12, io.js, and Rhino 1.7R5

  • Loading branch information...
mathiasbynens committed Feb 24, 2015
1 parent b18e296 commit 47bce4adbb9d2de67b3d637691ad3fba1c89ad93
Showing with 20 additions and 28 deletions.
  1. +6 −4 .travis.yml
  2. +0 −3 Gruntfile.js
  3. +1 −1 LICENSE-MIT.txt
  4. +5 −5 README.md
  5. +1 −1 bin/luamin
  6. +1 −1 luamin.js
  7. +2 −2 man/luamin.1
  8. +4 −11 package.json
@@ -1,19 +1,21 @@
language: node_js
node_js:
- "0.10"
- "0.8"
- "0.10"
- "0.12"
- "iojs"
before_script:
- "npm install -g grunt-cli"
# Narwhal uses a hardcoded path to openjdk v6, so use that version
- "sudo apt-get update -qq"
- "sudo apt-get install -qq openjdk-6-jre"
- "PACKAGE=rhino1_7R3; wget http://ftp.mozilla.org/pub/mozilla.org/js/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
- "PACKAGE=rhino1_7R3; echo -e '#!/bin/sh\\njava -jar /opt/'$PACKAGE'/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino"
- "PACKAGE=rhino1_7R5; wget https://github.com/mozilla/rhino/releases/download/Rhino1_7R5_RELEASE/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
- "PACKAGE=rhino1_7R5; echo -e '#!/bin/sh\\njava -jar /opt/'$PACKAGE'/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino"
- "PACKAGE=ringojs-0.9; wget http://ringojs.org/downloads/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
- "PACKAGE=ringojs-0.9; sudo ln -s /opt/$PACKAGE/bin/ringo /usr/local/bin/ringo && sudo chmod +x /usr/local/bin/ringo"
- "PACKAGE=v0.3.2; wget https://github.com/280north/narwhal/archive/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
- "PACKAGE=narwhal-0.3.2; sudo ln -s /opt/$PACKAGE/bin/narwhal /usr/local/bin/narwhal && sudo chmod +x /usr/local/bin/narwhal"
# If the enviroment stores rt.jar in a different directory, find it and symlink the directory
- "PREFIX=/usr/lib/jvm; if [ ! -d $PREFIX/java-6-openjdk ]; then for d in $PREFIX/java-6-openjdk-*; do if [ -e $d/jre/lib/rt.jar ]; then sudo ln -s $d $PREFIX/java-6-openjdk; break; fi; done; fi"
script:
"grunt ci"
- "grunt ci"
@@ -16,9 +16,6 @@ module.exports = function(grunt) {
'test-phantomjs': {
'command': 'echo "Testing in PhantomJS..."; phantomjs "tests/tests.js"'
},
// Rhino 1.7R4 has a bug that makes it impossible to test in.
// https://bugzilla.mozilla.org/show_bug.cgi?id=775566
// To test, use Rhino 1.7R3, or wait (heh) for the 1.7R5 release.
'test-rhino': {
'command': 'echo "Testing in Rhino..."; rhino -opt -1 "tests.js"',
'options': {
@@ -1,4 +1,4 @@
Copyright Mathias Bynens <http://mathiasbynens.be/>
Copyright Mathias Bynens <https://mathiasbynens.be/>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -2,15 +2,15 @@

[![Build status](https://travis-ci.org/mathiasbynens/luamin.svg?branch=master)](https://travis-ci.org/mathiasbynens/luamin) [![Dependency status](https://gemnasium.com/mathiasbynens/luamin.svg)](https://gemnasium.com/mathiasbynens/luamin)

luamin uses the excellent [luaparse](http://oxyc.github.io/luaparse/) library to parse Lua code into an Abstract Syntax Tree. Based on that AST, luamin then generates a (hopefully) more compact yet semantically equivalent Lua program. [Here’s an online demo.](http://mothereff.in/lua-minifier)
luamin uses the excellent [luaparse](http://oxyc.github.io/luaparse/) library to parse Lua code into an Abstract Syntax Tree. Based on that AST, luamin then generates a (hopefully) more compact yet semantically equivalent Lua program. [Here’s an online demo.](https://mothereff.in/lua-minifier)

luamin was inspired by the [LuaMinify](https://github.com/stravant/LuaMinify) and [Esmangle](https://github.com/Constellation/esmangle) projects.

Feel free to fork if you see possible improvements!

## Installation and usage

Via [npm](http://npmjs.org/):
Via [npm](https://www.npmjs.com/):

```bash
npm install luamin
@@ -34,7 +34,7 @@ In a browser:
<script src="luamin.js"></script>
```

In [Narwhal](http://narwhaljs.org/), [Node.js](http://nodejs.org/), and [RingoJS](http://ringojs.org/):
In [Narwhal](http://narwhaljs.org/), [Node.js](https://nodejs.org/), and [RingoJS](http://ringojs.org/):

```js
var luamin = require('luamin');
@@ -108,8 +108,8 @@ To generate [the code coverage report](http://rawgithub.com/mathiasbynens/luamin

| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
|---|
| [Mathias Bynens](http://mathiasbynens.be/) |
| [Mathias Bynens](https://mathiasbynens.be/) |

## License

luamin is available under the [MIT](http://mths.be/mit) license.
luamin is available under the [MIT](https://mths.be/mit) license.
@@ -14,7 +14,7 @@
var main = function() {

if (/^(?:-h|--help|undefined)$/.test(option)) {
log('luamin v%s - http://mths.be/luamin', luamin.version);
log('luamin v%s - https://mths.be/luamin', luamin.version);
log([
'\nUsage:\n',
'\tluamin [-c | --code] [snippet ...]',
@@ -1,4 +1,4 @@
/*! http://mths.be/luamin v0.2.8 by @mathias */
/*! https://mths.be/luamin v0.2.8 by @mathias */
;(function(root) {

// Detect free variables `exports`
@@ -71,6 +71,6 @@ Print a minified version of the Lua code that corresponds to the given Abstract
.Sh BUGS
luamin's bug tracker is located at <https://github.com/mathiasbynens/luamin/issues>.
.Sh AUTHOR
Mathias Bynens <http://mathiasbynens.be/>
Mathias Bynens <https://mathiasbynens.be/>
.Sh WWW
<http://mths.be/luamin>
<https://mths.be/luamin>
@@ -2,31 +2,24 @@
"name": "luamin",
"version": "0.2.8",
"description": "A Lua minifier written in JavaScript",
"homepage": "http://mths.be/luamin",
"homepage": "https://mths.be/luamin",
"main": "luamin.js",
"bin": "bin/luamin",
"keywords": [
"lua",
"minify",
"minifier"
],
"licenses": [
{
"type": "MIT",
"url": "http://mths.be/mit"
}
],
"license": "MIT",
"author": {
"name": "Mathias Bynens",
"url": "http://mathiasbynens.be/"
"url": "https://mathiasbynens.be/"
},
"repository": {
"type": "git",
"url": "https://github.com/mathiasbynens/luamin.git"
},
"bugs": {
"url": "https://github.com/mathiasbynens/luamin/issues"
},
"bugs": "https://github.com/mathiasbynens/luamin/issues",
"directories": {
"bin": "bin",
"man": "man",

0 comments on commit 47bce4a

Please sign in to comment.