File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ git hooks for IPython
3
3
add these to your ` .git/hooks `
4
4
5
5
For now, we just have ` post-checkout ` and ` post-merge ` ,
6
- both of which just update submodules,
6
+ both of which update submodules and attempt to rebuild css sourcemaps ,
7
7
so make sure that you have a fully synced repo whenever you checkout or pull.
8
8
9
9
To use these hooks, run ` ./install-hooks.sh ` .
Original file line number Diff line number Diff line change 2
2
3
3
git submodule init
4
4
git submodule update
5
+
6
+ PREVIOUS_HEAD=$1
7
+ # if style changed (and less/fabric available), rebuild sourcemaps
8
+ if [[
9
+ ! -z " $( git diff $PREVIOUS_HEAD IPython/html/static/style/ipython.min.css) "
10
+ && ! -z " $( git diff $PREVIOUS_HEAD IPython/html/static/style/style.min.css) "
11
+ && ! -z $( which 2> /dev/null lessc)
12
+ && ! -z $( which 2> /dev/null fab)
13
+ ]]; then
14
+ echo " rebuilding sourcemaps"
15
+ cd IPython/html
16
+ fab css
17
+ fi
Original file line number Diff line number Diff line change 2
2
3
3
git submodule init
4
4
git submodule update
5
+
6
+ PREVIOUS_HEAD=$1
7
+ # if style changed (and less/fabric available), rebuild sourcemaps
8
+ if [[
9
+ ! -z " $( git diff $PREVIOUS_HEAD IPython/html/static/style/ipython.min.css) "
10
+ && ! -z " $( git diff $PREVIOUS_HEAD IPython/html/static/style/style.min.css) "
11
+ && ! -z $( which 2> /dev/null lessc)
12
+ && ! -z $( which 2> /dev/null fab)
13
+ ]]; then
14
+ echo " rebuilding sourcemaps"
15
+ cd IPython/html
16
+ fab css
17
+ fi
You can’t perform that action at this time.
0 commit comments