Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #555 from erikrose/js-lockdown
Browse files Browse the repository at this point in the history
Correct some infra around JS plugin
  • Loading branch information
pelmers committed Jun 2, 2016
2 parents e8e3bb8 + fb9fccf commit a85c20a
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 11 deletions.
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ dxr-temp-*
/build
/dist
/*.egg-info
/tooling/node/node_modules/.bin/nunjucks-precompile
/tooling/node/node_modules/nunjucks
/tooling/node/node_modules/*
!tooling/node/node_modules/.bin/lockdown
!tooling/node/node_modules/.bin/lockdown-relock
!tooling/node/node_modules/lockdown
/dxr/plugins/js/.npm_installed
/dxr/plugins/js/analyze_js/node_modules/*
!/dxr/plugins/js/analyze_js/node_modules/.bin/lockdown
!/dxr/plugins/js/analyze_js/node_modules/.bin/lockdown-relock
!/dxr/plugins/js/analyze_js/node_modules/lockdown
/docs/build
.dxr_installed
.npm_installed
Expand Down
1 change: 1 addition & 0 deletions dxr/plugins/js/analyze_js/node_modules/.bin/lockdown

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dxr/plugins/js/analyze_js/node_modules/lockdown

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dxr/plugins/js/analyze_js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "esprima-based javascript plugin for DXR",
"author": "Mozilla",
"version": "1.0.0",
"engine": "node >= 6.0.0",
"engines": { "node": ">= 6.0.0" },
"license": "MIT",
"scripts": { "preinstall": "lockdown" },
"dependencies": {
Expand Down
18 changes: 14 additions & 4 deletions dxr/plugins/js/makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
build:
cd analyze_js; npm install
build: .npm_installed
cd analyze_js && npm install

# Remove anything within node_modules that's not checked into git. Skip things
# with spaces in them, lest xargs screw up and delete the wrong thing.
clean:
rm -rf analyze_js/node_modules
rm -f .npm_installed
cd analyze_js/node_modules && git ls-files -o --directory -x '* *' -x '.DS_Store' | xargs rm -rf

lint: build
cd analyze_js; node_modules/.bin/eslint .
cd analyze_js && node_modules/.bin/eslint .

# .npm_installed is an empty file we touch whenever we run npm install. This
# target redoes the install if the packages or lockdown files are newer than
# that file:
.npm_installed: analyze_js/package.json analyze_js/lockdown.json
cd analyze_js && npm install
touch $@

.PHONY: build clean lint
7 changes: 4 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ test: all
$(VIRTUAL_ENV)/bin/nosetests -v --nologcapture

clean: static_clean
rm -rf tooling/node/node_modules/.bin/nunjucks-precompile \
tooling/node/node_modules/nunjucks \
.npm_installed \
rm -rf .npm_installed \
.peep_installed \
venv \
.dxr_installed
@# Remove anything within node_modules that's not checked into git. Skip things
@# with spaces in them, lest xargs screw up and delete the wrong thing.
cd tooling/node/node_modules && git ls-files -o --directory -x '* *' -x '.DS_Store' | xargs rm -rf
find . -name "*.pyc" -exec rm -f {} \;
$(MAKE) -C dxr/plugins/clang clean
$(MAKE) -C dxr/plugins/js clean
Expand Down
4 changes: 3 additions & 1 deletion tooling/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"devDependencies": {
"nunjucks": "2.0.0"
},
"engine": "node >= 0.8.x",
"engines": {
"node": ">= 0.8.0"
},
"dependencies": {
"lockdown": "0.0.6"
},
Expand Down

0 comments on commit a85c20a

Please sign in to comment.