Skip to content

Commit

Permalink
chore(examples): add CONTENT_BASE env and ignore examples
Browse files Browse the repository at this point in the history
examples/ will be re-added in gh-pages
  • Loading branch information
STRML committed Oct 10, 2019
1 parent a0936f7 commit 6575862
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 393 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ dist/*
npm-debug.log
build/
.idea
# Ignore built example files
examples/*.html
examples/*.js
!examples/generate.js
!examples/vars.js
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ dist/%.min.js: $(LIB) $(BIN)
build-js:
@$(BIN)/babel --out-dir $(BUILD) $(LIB)

# Will build for use on github pages. Full url of page is
# https://strml.github.io/react-grid-layout/examples/0-showcase.html
# so the CONTENT_BASE should adapt.
build-example:
@$(BIN)/webpack --config webpack-examples.config.js
node ./examples/generate.js
env CONTENT_BASE="/react-grid-layout/examples/" node ./examples/generate.js

view-example:
node ./examples/generate.js
env CONTENT_BASE="/examples/" node ./examples/generate.js
@$(BIN)/webpack-dev-server --config webpack-examples.config.js --progress --colors

# FIXME flow is usually global
Expand Down
24 changes: 0 additions & 24 deletions examples/0-showcase.html

This file was deleted.

24 changes: 0 additions & 24 deletions examples/1-basic.html

This file was deleted.

24 changes: 0 additions & 24 deletions examples/10-dynamic-min-max-wh.html

This file was deleted.

23 changes: 0 additions & 23 deletions examples/11-no-vertical-compact.html

This file was deleted.

23 changes: 0 additions & 23 deletions examples/12-prevent-collision.html

This file was deleted.

23 changes: 0 additions & 23 deletions examples/13-error-case.html

This file was deleted.

23 changes: 0 additions & 23 deletions examples/14-toolbox.html

This file was deleted.

23 changes: 0 additions & 23 deletions examples/15-drag-from-outside.html

This file was deleted.

23 changes: 0 additions & 23 deletions examples/2-no-dragging.html

This file was deleted.

25 changes: 0 additions & 25 deletions examples/3-messy.html

This file was deleted.

23 changes: 0 additions & 23 deletions examples/4-grid-property.html

This file was deleted.

23 changes: 0 additions & 23 deletions examples/5-static-elements.html

This file was deleted.

25 changes: 0 additions & 25 deletions examples/6-dynamic-add-remove.html

This file was deleted.

24 changes: 0 additions & 24 deletions examples/7-localstorage.html

This file was deleted.

25 changes: 0 additions & 25 deletions examples/8-localstorage-responsive.html

This file was deleted.

Loading

0 comments on commit 6575862

Please sign in to comment.