You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2016/01/18 21:31:44 UTC
[08/11] allura git commit: [#8039] install eslint and deps locally;
run local command via npm since that uses node_modules/.bin/
automatically
[#8039] install eslint and deps locally; run local command via npm since that uses node_modules/.bin/ automatically
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/7410896a
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/7410896a
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/7410896a
Branch: refs/heads/master
Commit: 7410896ad38485e74d55de4016b1caec9e28eea4
Parents: 788d891
Author: Dave Brondsema <da...@brondsema.net>
Authored: Mon Jan 18 14:31:44 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Mon Jan 18 14:43:56 2016 -0500
----------------------------------------------------------------------
Allura/docs/getting_started/installation.rst | 2 +-
AlluraTest/alluratest/validation.py | 2 +-
Dockerfile | 2 +-
package.json | 9 ++++++---
4 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/7410896a/Allura/docs/getting_started/installation.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/getting_started/installation.rst b/Allura/docs/getting_started/installation.rst
index 9ac052e..c8d5aae 100644
--- a/Allura/docs/getting_started/installation.rst
+++ b/Allura/docs/getting_started/installation.rst
@@ -191,7 +191,7 @@ For non-Ubuntu installations see https://nodejs.org/en/download/package-manager/
(env-allura)~$ curl --silent --location https://deb.nodesource.com/setup_4.x | sudo bash -
(env-allura)~$ sudo apt-get install nodejs
(env-allura)~$ cd ~/src/allura
- (env-allura)~$ sudo npm install -g broccoli-cli eslint eslint-plugin-html
+ (env-allura)~$ sudo npm install -g broccoli-cli
(env-allura)~$ npm install
(env-allura)~$ npm run build
http://git-wip-us.apache.org/repos/asf/allura/blob/7410896a/AlluraTest/alluratest/validation.py
----------------------------------------------------------------------
diff --git a/AlluraTest/alluratest/validation.py b/AlluraTest/alluratest/validation.py
index 95479bd..7f080b5 100644
--- a/AlluraTest/alluratest/validation.py
+++ b/AlluraTest/alluratest/validation.py
@@ -187,7 +187,7 @@ def validate_js(html_or_response, within_html=False):
text = html_or_response
fname = dump_to_file('eslint-', text, suffix='.html' if within_html else '.js')
eslintrc = os.path.join(pkg_resources.get_distribution('allura').location, '../.eslintrc')
- cmd = ['eslint',
+ cmd = ['npm', 'run', 'eslint', '--',
'-c', eslintrc, # since we're in a tmp dir
'--no-ignore', # tmp dirs ignored by default
]
http://git-wip-us.apache.org/repos/asf/allura/blob/7410896a/Dockerfile
----------------------------------------------------------------------
diff --git a/Dockerfile b/Dockerfile
index 6c6c036..54a1b3a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -36,7 +36,7 @@ RUN curl --silent --location https://deb.nodesource.com/setup_4.x | sudo bash -
apt-get install --yes nodejs
# only do the global installation here. All local packages are installed in init-docker-dev.sh, since they need the shared mount
-RUN npm install -g broccoli-cli eslint eslint-plugin-html
+RUN npm install -g broccoli-cli
# Snapshot generation for SVN (and maybe other SCMs) might fail without this
RUN locale-gen en_US.UTF-8
http://git-wip-us.apache.org/repos/asf/allura/blob/7410896a/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 15bb35b..4635705 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,8 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rm -rf Allura/allura/public/nf/js/build/; broccoli build Allura/allura/public/nf/js/build/",
- "watch": "broccoli-timepiece Allura/allura/public/nf/js/build/"
+ "watch": "broccoli-timepiece Allura/allura/public/nf/js/build/",
+ "eslint": "eslint"
},
"repository": {
"type": "git",
@@ -14,7 +15,6 @@
},
"author": "Apache Allura team",
"license": "Apache-2.0",
-
"//": "When broccoli-babel-transpiler moves to babel 6, we'll need to add babel-plugin-transform-class-properties to our deps",
"devDependencies": {
"broccoli": "^0.16.8",
@@ -22,6 +22,9 @@
"broccoli-funnel": "^0.2.8",
"broccoli-merge-trees": "^0.2.3",
"broccoli-sourcemap-concat": "^2.0.1",
- "broccoli-uglify-js": "^0.1.3"
+ "broccoli-uglify-js": "^0.1.3",
+ "eslint": "^1.10.3",
+ "eslint-plugin-html": "^1.2.0",
+ "esprima-fb": "^15001.1001.0-dev-harmony-fb"
}
}