Skip to content

Commit

Permalink
reorganize libwebpjs
Browse files Browse the repository at this point in the history
  • Loading branch information
chase-moskal committed Dec 18, 2017
1 parent 7c13363 commit 3df1bc0
Show file tree
Hide file tree
Showing 22 changed files with 1,024 additions and 32 deletions.
4 changes: 0 additions & 4 deletions .dockerignore

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

# /dist
/dist
/node_modules
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ISC License

ISC License
Copyright (c) 2017, Chase Moskal

Permission to use, copy, modify, and/or distribute this software for any
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,17 @@ development
-----------

- **prerequisites**
- docker
- git
- node
- docker (if you want to rebuild libwebpjs)

- **run the build script**
- `./build.sh` — use admin privileges (docker requires this)
- **build libwebpjs** *(not necessary)*
- `./libwebpjs-build.sh` — use admin privileges (docker requires this)
- it runs the docker build of libwebp (takes a long time)
- it writes build artifacts to `dist/`
- `./libwebpjs-debug.sh` — useful to drop into the container to have a look around

- **run the http server**
- `npm start`
- **development based on top of libwebpjs**
- `npm install` — install dependencies and run build
- `npm start` — start http server
- visit http://localhost:8080/ to see google's web demo
13 changes: 0 additions & 13 deletions build.sh

This file was deleted.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!doctype html>
<meta http-equiv="refresh" content="0; url=./dist/webpjs/"/>
<meta http-equiv="refresh" content="0; url=./libwebpjs/dist/"/>
7 changes: 7 additions & 0 deletions libwebpjs-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

cd libwebpjs
rm -rf dist
docker build -t webphero .
docker run --volume $PWD/dist:/dist --rm webphero /work/source/container-script.sh
chmod -R 777 dist
1 change: 1 addition & 0 deletions debug.sh → libwebpjs-debug.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash

cd libwebpjs
docker build -t webphero .
docker run -it --rm webphero
2 changes: 2 additions & 0 deletions libwebpjs/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

/dist
2 changes: 1 addition & 1 deletion Dockerfile → libwebpjs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ADD . /work

# replace libwebp emscripten cmake instructions
RUN rm -rf /work/libwebp/CMakeLists.txt \
&& cp /work/scripts/CMakeLists.txt /work/libwebp
&& cp /work/source/CMakeLists.txt /work/libwebp

RUN ["/bin/bash", "-c", "cd /work/emsdk-portable \
&& source ./emsdk_env.sh \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
Loading

0 comments on commit 3df1bc0

Please sign in to comment.