From 90bccf7eca58c342213655b91b808a4a64484443 Mon Sep 17 00:00:00 2001 From: nisarhassan12 Date: Wed, 3 Jul 2019 09:57:44 +0000 Subject: [PATCH 1/3] Adds .gitpod.yml --- .gitpod.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..3b462bf --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,6 @@ +tasks: + - init: npm install + command: npm start +ports: + - port: 3000 + onOpen: open-preview \ No newline at end of file From 5cf6fc78ce5592cd4f28026e0687c9d0d100eba5 Mon Sep 17 00:00:00 2001 From: nisarhassan12 Date: Wed, 3 Jul 2019 11:46:07 +0000 Subject: [PATCH 2/3] Configures webpackDevServer to allow hosting with gitpod. --- .gitpod.yml | 3 ++- README.md | 4 ++++ scripts/webpack.config.dev.js | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index 3b462bf..721ade9 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,6 +1,7 @@ tasks: + - command: gp await-port 3000 && gp preview $(gp url 3000)/examples/browser/demo.html - init: npm install command: npm start ports: - port: 3000 - onOpen: open-preview \ No newline at end of file + onOpen: ignore \ No newline at end of file diff --git a/README.md b/README.md index 1dba84d..9bd2a6b 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,10 @@ npm start The development server will be available at http://localhost:3000/examples/browser/demo.html in your favorite browser. It will automatically rebuild `tesseract.dev.js` and `worker.min.js` when you change files in the src folder. +You can also run the development server in Gitpod ( a free online IDE and dev environment for GitHub ) with a single click. + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/naptha/tesseract.js/blob/master/examples/browser/demo.html) + ### Building Static Files To build the compiled static files just execute the following: ```shell diff --git a/scripts/webpack.config.dev.js b/scripts/webpack.config.dev.js index 8729674..33215a0 100644 --- a/scripts/webpack.config.dev.js +++ b/scripts/webpack.config.dev.js @@ -20,6 +20,9 @@ const genConfig = ({ }, }), ], + devServer: { + allowedHosts: ['localhost', '.gitpod.io'], + }, }); module.exports = [ From 6a5a83790e17999567efa8d70aaabe50f7861fbe Mon Sep 17 00:00:00 2001 From: nisarhassan12 Date: Sat, 13 Jul 2019 05:51:08 +0000 Subject: [PATCH 3/3] Updated Readme.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9bd2a6b..860e18e 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ npm start The development server will be available at http://localhost:3000/examples/browser/demo.html in your favorite browser. It will automatically rebuild `tesseract.dev.js` and `worker.min.js` when you change files in the src folder. -You can also run the development server in Gitpod ( a free online IDE and dev environment for GitHub ) with a single click. +You can also run the development server in Gitpod ( a free online IDE and dev environment for GitHub that will automate your dev setup ) with a single click. [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/naptha/tesseract.js/blob/master/examples/browser/demo.html)