Skip to content

Commit

Permalink
Switch from bower to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Jul 3, 2017
1 parent aca3e63 commit edc0d6f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 23 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
.project
.pydevproject
/all-hooks.json
/bower_components
/node_modules
/build
/nenv
/venv
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ all: install-hooks build/main.css all-hooks.json index.html hooks.html
install-hooks: venv
venv/bin/pre-commit install

build/main.css: nenv build scss/main.scss scss/_variables.scss
build/main.css: venv node_modules build scss/main.scss scss/_variables.scss
venv/bin/sassc -s compressed scss/main.scss build/main.css

all-hooks.json: venv make_all_hooks.py all-repos.yaml
Expand All @@ -20,23 +20,23 @@ venv: requirements-dev.txt Makefile
virtualenv venv -ppython3.6
venv/bin/pip install -r requirements-dev.txt

nenv: venv
rm -rf nenv
venv/bin/nodeenv nenv --prebuilt && \
. nenv/bin/activate && \
npm install -g bower && \
bower install
node_modules: package.json
( \
npm install && \
npm prune && \
touch $@ \
) || touch $@ --reference $^ --date '1 day ago'

push: venv
venv/bin/markdown-to-presentation push \
--master-branch real_master \
--pages-branch master \
.travis.yml README.md CNAME \
build bower_components *.html *.png favicon.ico \
build node_modules *.html *.png favicon.ico \
all-hooks.json install-local.py

clean:
rm -rf venv nenv build bower_components *.html all-hooks.json
rm -rf venv build node_modules *.html all-hooks.json

build:
mkdir -p build
Expand Down
4 changes: 2 additions & 2 deletions base.mako
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
Brought to you by <a href="http://www.yelp.com">Yelp</a>. Check out some of our other <a href="http://yelp.github.io/">open source projects</a> on <a href="https://github.com/yelp/">GitHub</a>.
</div>
</footer>
<script src="bower_components/jquery/jquery.min.js"></script>
<script src="bower_components/sass-bootstrap/dist/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="node_modules/bootstrap-sass/assets/javascripts/bootstrap.min.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
Expand Down
8 changes: 0 additions & 8 deletions bower.json

This file was deleted.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"repository": "github.com/pre-commit/pre-commit.github.io",
"license": "MIT",
"dependencies": {"bootstrap-sass": "3.3.7"}
}
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
aspy.yaml
mako
libsass
nodeenv
markdown-to-presentation>=0.0.12
pre-commit>=0.13.6
2 changes: 1 addition & 1 deletion scss/main.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import 'scss/variables';
@import 'bower_components/sass-bootstrap/lib/bootstrap';
@import 'node_modules/bootstrap-sass/assets/stylesheets/bootstrap';


body {
Expand Down

0 comments on commit edc0d6f

Please sign in to comment.