mirror of
https://github.com/jupyter/notebook.git
synced 2024-11-21 01:11:21 +08:00
attempt to regen source maps in git-hooks
if css changes
This commit is contained in:
parent
6ea0bd4e94
commit
0c1074223b
@ -3,7 +3,7 @@ git hooks for IPython
|
||||
add these to your `.git/hooks`
|
||||
|
||||
For now, we just have `post-checkout` and `post-merge`,
|
||||
both of which just update submodules,
|
||||
both of which update submodules and attempt to rebuild css sourcemaps,
|
||||
so make sure that you have a fully synced repo whenever you checkout or pull.
|
||||
|
||||
To use these hooks, run `./install-hooks.sh`.
|
||||
|
@ -2,3 +2,16 @@
|
||||
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
PREVIOUS_HEAD=$1
|
||||
# if style changed (and less/fabric available), rebuild sourcemaps
|
||||
if [[
|
||||
! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/ipython.min.css)"
|
||||
&& ! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/style.min.css)"
|
||||
&& ! -z $(which 2>/dev/null lessc)
|
||||
&& ! -z $(which 2>/dev/null fab)
|
||||
]]; then
|
||||
echo "rebuilding sourcemaps"
|
||||
cd IPython/html
|
||||
fab css
|
||||
fi
|
||||
|
@ -2,3 +2,16 @@
|
||||
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
PREVIOUS_HEAD=$1
|
||||
# if style changed (and less/fabric available), rebuild sourcemaps
|
||||
if [[
|
||||
! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/ipython.min.css)"
|
||||
&& ! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/style.min.css)"
|
||||
&& ! -z $(which 2>/dev/null lessc)
|
||||
&& ! -z $(which 2>/dev/null fab)
|
||||
]]; then
|
||||
echo "rebuilding sourcemaps"
|
||||
cd IPython/html
|
||||
fab css
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user