Browse Source

Improve `make gh-pages` task

Regenerates demo website: http://markdown-it.github.io/
pull/14/head
Aleksey V Zapparov 10 years ago
parent
commit
9e5743008f
  1. 1
      .eslintignore
  2. 20
      Makefile

1
.eslintignore

@ -1,5 +1,6 @@
benchmark/implementations/ benchmark/implementations/
coverage/ coverage/
demo/sample.js demo/sample.js
demo-web/
dist/ dist/
node_modules/ node_modules/

20
Makefile

@ -18,6 +18,19 @@ demo: lint
stylus -u autoprefixer-stylus demo/assets/index.styl stylus -u autoprefixer-stylus demo/assets/index.styl
rm -rf demo/sample.json rm -rf demo/sample.json
gh-pages: browserify demo
rm -rf ./demo-web
cp -r ./demo ./demo-web
cp ./dist/markdown-it.js ./demo-web
sed -i "s|../dist|.|" ./demo-web/index.html
cd ./demo-web \
&& git init . \
&& git add . \
&& git commit -m "Auto-generate demo" \
&& git remote add origin git@github.com:markdown-it/markdown-it.github.io.git \
&& git push --force origin master
rm -rf ./demo-web
lint: lint:
eslint --reset ./ eslint --reset ./
@ -33,13 +46,6 @@ coverage:
test-ci: lint test-ci: lint
istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
gh-pages:
if [ "git branch --list gh-pages" ]; then \
git branch -D gh-pages ; \
fi
git branch gh-pages
git push origin gh-pages -f
publish: publish:
@if test 0 -ne `git status --porcelain | wc -l` ; then \ @if test 0 -ne `git status --porcelain | wc -l` ; then \
echo "Unclean working tree. Commit or stash changes first." >&2 ; \ echo "Unclean working tree. Commit or stash changes first." >&2 ; \

Loading…
Cancel
Save