Skip to content

Commit

Permalink
Merge pull request #388 from erwan/rhino
Browse files Browse the repository at this point in the history
Rhino support
  • Loading branch information
Alexis Sellier committed Sep 15, 2011
2 parents a3384fa + 62a7141 commit 7739fb1
Show file tree
Hide file tree
Showing 5 changed files with 2,555 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ HEADER = build/header.js
VERSION = `cat package.json | grep version \
| grep -o '[0-9]\.[0-9]\.[0-9]\+'`
DIST = dist/less-${VERSION}.js
RHINO = dist/less-rhino-${VERSION}.js
DIST_MIN = dist/less-${VERSION}.min.js

less:
Expand All @@ -35,6 +36,18 @@ less:
@@echo "})(window);" >> ${DIST}
@@echo ${DIST} built.

rhino:
@@mkdir -p dist
@@touch ${RHINO}
@@cat build/require-rhino.js\
build/ecma-5.js\
${SRC}/parser.js\
${SRC}/functions.js\
${SRC}/tree/*.js\
${SRC}/tree.js\
${SRC}/rhino.js > ${RHINO}
@@echo ${RHINO} built.

min: less
@@echo minifying...
@@cat ${HEADER} | sed s/@VERSION/${VERSION}/ > ${DIST_MIN}
Expand Down
7 changes: 7 additions & 0 deletions build/require-rhino.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//
// Stub out `require` in rhino
//
function require(arg) {
return less[arg.split('/')[1]];
};

Loading

0 comments on commit 7739fb1

Please sign in to comment.