Skip to content

Commit

Permalink
Refactored demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Puzrin committed Dec 23, 2014
1 parent a5a0453 commit fe97753
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 575 deletions.
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
coverage/
demo/sample.js
demo-web/
demo/
dist/
node_modules
support/demo_template/sample.js
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
coverage/
demo/
*.log
34 changes: 19 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,30 @@ CURR_HEAD := $(firstword $(shell git show-ref --hash HEAD | cut -b -6) master)
GITHUB_PROJ := https://github.com//markdown-it/${NPM_PACKAGE}


demo: lint
./support/demodata.js > demo/sample.json
jade demo/index.jade -P --obj demo/sample.json
stylus -u autoprefixer-stylus demo/assets/index.styl
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
cp ./support/demo_readme.md ./demo-web/README.md
touch ./demo-web/.nojekyll
cd ./demo-web \
demo: lint browserify
rm -rf ./demo
mkdir ./demo
./support/demodata.js > ./support/demo_template/sample.json
jade ./support/demo_template/index.jade --pretty \
--obj ./support/demo_template/sample.json \
--out ./demo
stylus -u autoprefixer-stylus \
< ./support/demo_template/index.styl \
> ./demo/index.css
rm -rf ./support/demo_template/sample.json
cp ./dist/markdown-it.js ./demo/
cp ./support/demo_template/index.js ./demo/
cp ./support/demo_template/README.md ./demo/

gh-pages: demo
touch ./demo/.nojekyll
cd ./demo \
&& 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
rm -rf ./demo

lint:
eslint --reset .
Expand Down
145 changes: 0 additions & 145 deletions demo/assets/index.css

This file was deleted.

Loading

0 comments on commit fe97753

Please sign in to comment.