diff --git a/.gitignore b/.gitignore index d40806d5..72bfd4b3 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ configure install-sh missing stamp-h1 +/node_modules diff --git a/README.md b/README.md index fd8caf10..1ff92076 100644 --- a/README.md +++ b/README.md @@ -79,11 +79,16 @@ The latest version of Spreed WebRTC can be found on GitHub: these are only required if you want to make changes. - [NodeJS](http://nodejs.org/) >= 0.10.0 - - [JSHint](http://www.jshint.com/) >= 2.0.0 - [Compass](http://compass-style.org/) >= 1.0.0 - [Sass](http://sass-lang.com/) >= 3.3.0 - - [autoprefixer](https://www.npmjs.org/package/autoprefixer) 1.1 - [Babel](http://babel.pocoo.org/) + + The following Node.js modules are required, these may be installed + locally by running `npm install` from the project root. Consult the + `package.json` file for more details. + + - [JSHint](http://www.jshint.com/) >= 2.0.0 + - [autoprefixer](https://www.npmjs.org/package/autoprefixer) >= 1.1 - [po2json](https://github.com/mikeedwards/po2json) Styles can be found in src/styles. Translations are found in src/i18n. diff --git a/configure.ac b/configure.ac index 4d360e6f..c09093f8 100644 --- a/configure.ac +++ b/configure.ac @@ -63,13 +63,12 @@ AC_SUBST(AWK) AC_PATH_PROGS([FIND],[find]) AC_SUBST(FIND) -AC_PATH_PROGS([JSHINT],[jshint]) +AC_PATH_PROG([JSHINT],jshint, [], [$PWD/node_modules/.bin$PATH_SEPARATOR$PATH]) if test x"${JSHINT}" != x"" ; then AC_MSG_CHECKING([for version of jshint]) JSHINT_VERSION=`$JSHINT --version 2>&1 | $SED 's/^jshint v//'` AC_MSG_RESULT([$JSHINT_VERSION]) fi -AC_SUBST(JSHINT) AC_PATH_PROGS([PYTHON],[python2 python]) if test x"${PYTHON}" != x"" ; then @@ -148,7 +147,7 @@ if test x"${SASS}" != x"" ; then fi AC_SUBST(SASS_SUPPORT_STYLES) -AC_PATH_PROGS([AUTOPREFIXER],[autoprefixer]) +AC_PATH_PROG([AUTOPREFIXER],autoprefixer, [], [$PWD/node_modules/.bin$PATH_SEPARATOR$PATH]) if test x"${AUTOPREFIXER}" == x"" ; then AC_MSG_WARN([Please install autoprefixer before trying to build styles.]) else @@ -156,7 +155,6 @@ else AUTOPREFIXER_VERSION=`$AUTOPREFIXER --version | $SED 's/^autoprefixer //'` AC_MSG_RESULT([$AUTOPREFIXER_VERSION]) fi -AC_SUBST(AUTOPREFIXER) AC_PATH_PROGS([PYBABEL],[pybabel]) if test x"${PYBABEL}" == x"" ; then @@ -175,14 +173,14 @@ if test x"${NPM}" != x"" ; then NPM_VERSION=`$NPM --version` AC_MSG_RESULT([$NPM_VERSION]) AC_MSG_CHECKING([for po2json support in node.js]) - found_po2json=`$NPM list --global 2> /dev/null | $GREP po2json` + found_po2json=`{ $NPM list --global & $NPM list; } 2>/dev/null | $GREP -v 'UNMET DEPENDENCY' | $GREP po2json` if test x"${found_po2json}" == x"" ; then AC_MSG_RESULT([not available]) AC_MSG_WARN([Please install the node.js module po2json to build i18n.]) else AC_MSG_RESULT([ok]) AC_MSG_CHECKING([for version of po2json]) - PO2JSON_VERSION=`$NPM list --global 2>&1 | $GREP po2json | $SED 's/^.*po2json@//'` + PO2JSON_VERSION=`{ $NPM list --global & $NPM list; } 2>&1 | $GREP po2json | $SED 's/^.*po2json@//'` AC_MSG_RESULT([$PO2JSON_VERSION]) NODEJS_SUPPORT_PO2JSON=yes fi diff --git a/package.json b/package.json new file mode 100644 index 00000000..8434df11 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "private": true, + "dependencies": { + "jshint": ">= 2.5.5", + "autoprefixer": ">= 3.1.0", + "po2json": ">= 0.3.0" + } +} diff --git a/src/i18n/helpers/po2json b/src/i18n/helpers/po2json old mode 100644 new mode 100755