From 8a7c858834e305430da7e415ae6547fde50e1777 Mon Sep 17 00:00:00 2001 From: Abhinav sagar Date: Tue, 26 Mar 2019 19:15:58 +0530 Subject: [PATCH 1/8] Improved documentation --- developer_docs/deployment.md | 2 ++ developer_docs/installation.md | 10 ++++--- developer_docs/preparing_a_pull_request.md | 31 ++++++++++++++-------- package-lock.json | 28 ++++++++++++++----- package.json | 8 +++--- 5 files changed, 54 insertions(+), 25 deletions(-) diff --git a/developer_docs/deployment.md b/developer_docs/deployment.md index 013061aa..fcd708b2 100644 --- a/developer_docs/deployment.md +++ b/developer_docs/deployment.md @@ -39,6 +39,8 @@ You'll only need to do this if you're testing the production environment locally 8. Since production assumes your environment variables are in the shell environment, and not in a `.env` file, you will have to run `export $(grep -v '^#' .env | xargs)` or a similar command, see this [Stack Overflow answer](https://stackoverflow.com/a/20909045/4086967). 9. `$ npm run start:prod` +NOTE- Windows user should use `copy` in place of `cp` during above installation. + ## Self Hosting - Heroku Deployment If you are interested in hosting and deploying your own p5.js Web Editor instance, you can! It would be the same as the official editor instance at editor.p5js.org, except with a different domain, and you would be in charge of the maintenance. We recommend using Heroku as you can host it for free. diff --git a/developer_docs/installation.md b/developer_docs/installation.md index 21fc18fa..222bf3de 100644 --- a/developer_docs/installation.md +++ b/developer_docs/installation.md @@ -6,14 +6,14 @@ Follow these instructions to set up your development environment, which you need 1. Install [node.js](http://nodejs.org/), which also automatically installs the [npm](https://www.npmjs.org) package manager. 2. [Fork](https://help.github.com/articles/fork-a-repo) the [p5.js Web Editor repository](https://github.com/processing/p5.js-web-editor) into your own GitHub account. -3. [Clone](https://help.github.com/articles/cloning-a-repository/) your new fork of the repository from GitHub onto your local computer. +3. [Clone](https://help.github.com/articles/cloning-a-repository/) your new fork of the repository from GitHub onto your local computer. ``` $ git clone https://github.com/YOUR_USERNAME/p5.js-web-editor.git ``` 4. Navigate into the project folder and install all its necessary dependencies with npm. - + ``` $ cd p5.js-web-editor $ npm install @@ -29,6 +29,8 @@ Follow these instructions to set up your development environment, which you need 11. Install the [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) 12. Open and close the Redux DevTools using `ctrl+h`, and move them with `ctrl+w` +NOTE- Windows user should use `copy` in place of `cp` during above installation. + ## Docker Installation Using Docker, you can have a complete, consistent development environment without having to manually install dependencies such as Node, Mongo, etc. It also helps isolate these dependencies and their data from other projects that you may have on the same computer that use different/conflicting versions, etc. @@ -57,6 +59,8 @@ If you don't have the full server environment running, you can launch a one-off 10. `$ docker-compose -f docker-compose-development.yml run app --rm bash -l` +NOTE- Windows user should use `copy` in place of `cp` during above installation. + ## S3 Bucket Configuration Note that this is optional, unless you are working on the part of the application that allows a user to upload images, videos, etc. Please refer to the folllowing [gist](https://gist.github.com/catarak/70c9301f0fd1ac2d6b58de03f61997e3) to set up an S3 bucket to be used with this project. @@ -75,4 +79,4 @@ name, you can also set it using this variable. I.e.: For more information on using a custom domain, see this documentation link: -http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingCustomURLs \ No newline at end of file +http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingCustomURLs diff --git a/developer_docs/preparing_a_pull_request.md b/developer_docs/preparing_a_pull_request.md index 7da74f92..6711dde4 100644 --- a/developer_docs/preparing_a_pull_request.md +++ b/developer_docs/preparing_a_pull_request.md @@ -6,10 +6,10 @@ Pull-requests are easier when your code is up to date! You can use git rebase to ## Save and Update -### Save everything you have! - git status +### Save everything you have! + git status git add -u - git commit + git commit ### Find out about changes @@ -23,25 +23,34 @@ If you see an error, you'll need to start tracking the main p5.js repo as an "up Then ask git about the latest changes. - git fetch upstream + git fetch upstream ### Just in case: make a copy of your changes in a new branch - git branch your-branch-name-backup + git branch your-branch-name-backup -### Apply changes from master branch, adds your changes *after* - git rebase upstream/master +### Apply changes from master branch, adds your changes *after* + git rebase upstream/master + +### Switches back to master branch + git checkout master + +### Helps other contributors fully understand the changes that you made + git commit -m "Fixed documentation typos" + +### Verifies what git will be committing + git status ## CONFLICTS -You will probably have some conflicts! +You will probably have some conflicts! If it’s just lib/p5.js and lib/p5.min.js, it’s easy to fix. just build the project again with grunt. - grunt + grunt git add -u git rebase --continue If you have conflicts in other files & you're not sure how to resolve them... ask for help! Lauren, David, Kevin, and Kate are familiar with recent changes and can help you figure out what's new. ## And finally, for great glory - git push origin + git push --set-upstream origin your-branch-name-backup -Here's a good reference on rebasing, in case you're intensely curious about the technical details. https://www.atlassian.com/git/tutorials/merging-vs-rebasing \ No newline at end of file +Here's a good reference on rebasing, in case you're intensely curious about the technical details. https://www.atlassian.com/git/tutorials/merging-vs-rebasing diff --git a/package-lock.json b/package-lock.json index e23af10d..5e5de221 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5099,11 +5099,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5116,15 +5118,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -5227,7 +5232,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -5237,6 +5243,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5249,17 +5256,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -5276,6 +5286,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -5348,7 +5359,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -5358,6 +5370,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -5463,6 +5476,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/package.json b/package.json index 8dc0e8e4..2165647d 100644 --- a/package.json +++ b/package.json @@ -49,27 +49,27 @@ "chunk-manifest-webpack-plugin": "github:catarak/chunk-manifest-webpack-plugin", "css-loader": "^0.23.1", "cssnano": "^3.10.0", - "eslint": "^4.19.1", "enzyme": "^3.7.0", "enzyme-adapter-react-16": "^1.6.0", + "eslint": "^4.19.1", "eslint-config-airbnb": "^16.1.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.2", - "eslint-plugin-react": "^7.12.3", + "eslint-plugin-react": "^7.12.4", "extract-text-webpack-plugin": "^3.0.2", "file-loader": "^2.0.0", + "jest": "^23.6.0", "node-sass": "^4.11.0", "nodemon": "^1.18.9", "postcss-cssnext": "^2.11.0", - "jest": "^23.6.0", "postcss-focus": "^1.0.0", "postcss-loader": "^0.9.1", "postcss-reporter": "^1.4.1", + "react-test-renderer": "^16.6.0", "rimraf": "^2.6.3", "sass-loader": "^6.0.7", "style-loader": "^0.13.2", "webpack-manifest-plugin": "^2.0.4", - "react-test-renderer": "^16.6.0", "webpack-node-externals": "^1.7.2" }, "engines": { From b361902468f42e1b47113b9cf094e41c3731cc57 Mon Sep 17 00:00:00 2001 From: Abhinav sagar Date: Wed, 27 Mar 2019 13:11:11 +0530 Subject: [PATCH 2/8] Improved documentation --- developer_docs/deployment.md | 2 +- developer_docs/installation.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/developer_docs/deployment.md b/developer_docs/deployment.md index fcd708b2..37d85dc5 100644 --- a/developer_docs/deployment.md +++ b/developer_docs/deployment.md @@ -39,7 +39,7 @@ You'll only need to do this if you're testing the production environment locally 8. Since production assumes your environment variables are in the shell environment, and not in a `.env` file, you will have to run `export $(grep -v '^#' .env | xargs)` or a similar command, see this [Stack Overflow answer](https://stackoverflow.com/a/20909045/4086967). 9. `$ npm run start:prod` -NOTE- Windows user should use `copy` in place of `cp` during above installation. +NOTE- Windows users should use `copy` instead of `cp` during installation. ## Self Hosting - Heroku Deployment diff --git a/developer_docs/installation.md b/developer_docs/installation.md index 222bf3de..fbf6a7c4 100644 --- a/developer_docs/installation.md +++ b/developer_docs/installation.md @@ -29,7 +29,7 @@ Follow these instructions to set up your development environment, which you need 11. Install the [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) 12. Open and close the Redux DevTools using `ctrl+h`, and move them with `ctrl+w` -NOTE- Windows user should use `copy` in place of `cp` during above installation. +NOTE- Windows users should use `copy` instead of `cp` during installation. ## Docker Installation @@ -59,7 +59,7 @@ If you don't have the full server environment running, you can launch a one-off 10. `$ docker-compose -f docker-compose-development.yml run app --rm bash -l` -NOTE- Windows user should use `copy` in place of `cp` during above installation. +NOTE- Windows users should use `copy` instead of `cp` during installation. ## S3 Bucket Configuration From a3e2532380aaa14a68cbdbe3873f47c058b09436 Mon Sep 17 00:00:00 2001 From: Abhinav Sagar <40603139+abhinavsagar@users.noreply.github.com> Date: Wed, 27 Mar 2019 22:58:14 +0530 Subject: [PATCH 3/8] Update package.json --- package.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 2165647d..55a48ac8 100644 --- a/package.json +++ b/package.json @@ -49,27 +49,27 @@ "chunk-manifest-webpack-plugin": "github:catarak/chunk-manifest-webpack-plugin", "css-loader": "^0.23.1", "cssnano": "^3.10.0", + "eslint": "^4.19.1", "enzyme": "^3.7.0", "enzyme-adapter-react-16": "^1.6.0", - "eslint": "^4.19.1", "eslint-config-airbnb": "^16.1.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.2", - "eslint-plugin-react": "^7.12.4", + "eslint-plugin-react": "^7.12.3", "extract-text-webpack-plugin": "^3.0.2", "file-loader": "^2.0.0", - "jest": "^23.6.0", "node-sass": "^4.11.0", "nodemon": "^1.18.9", "postcss-cssnext": "^2.11.0", + "jest": "^23.6.0", "postcss-focus": "^1.0.0", "postcss-loader": "^0.9.1", "postcss-reporter": "^1.4.1", - "react-test-renderer": "^16.6.0", "rimraf": "^2.6.3", "sass-loader": "^6.0.7", "style-loader": "^0.13.2", "webpack-manifest-plugin": "^2.0.4", + "react-test-renderer": "^16.6.0", "webpack-node-externals": "^1.7.2" }, "engines": { @@ -158,3 +158,4 @@ "xhr": "^2.5.0" } } + From caef7b278f610d1a06f89babbf99c5f6e9b19bdc Mon Sep 17 00:00:00 2001 From: Abhinav Sagar <40603139+abhinavsagar@users.noreply.github.com> Date: Wed, 27 Mar 2019 23:02:02 +0530 Subject: [PATCH 4/8] Update package-lock.json --- package-lock.json | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5e5de221..e23af10d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5099,13 +5099,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5118,18 +5116,15 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", @@ -5232,8 +5227,7 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", @@ -5243,7 +5237,6 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5256,20 +5249,17 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true, - "optional": true + "bundled": true }, "minipass": { "version": "2.3.5", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -5286,7 +5276,6 @@ "mkdirp": { "version": "0.5.1", "bundled": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -5359,8 +5348,7 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", @@ -5370,7 +5358,6 @@ "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } @@ -5476,7 +5463,6 @@ "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", From 2e0788d22f6528ff79b0f066c0434db324c97b31 Mon Sep 17 00:00:00 2001 From: Abhinav Sagar <40603139+abhinavsagar@users.noreply.github.com> Date: Wed, 27 Mar 2019 23:03:00 +0530 Subject: [PATCH 5/8] Update package.json --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 55a48ac8..8dc0e8e4 100644 --- a/package.json +++ b/package.json @@ -158,4 +158,3 @@ "xhr": "^2.5.0" } } - From 5bb345b95517781a1d140e4d7cb760961f6b5c03 Mon Sep 17 00:00:00 2001 From: Abhinav Sagar <40603139+abhinavsagar@users.noreply.github.com> Date: Thu, 28 Mar 2019 11:06:32 +0530 Subject: [PATCH 6/8] Update deployment.md --- developer_docs/deployment.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/developer_docs/deployment.md b/developer_docs/deployment.md index 37d85dc5..55369d9b 100644 --- a/developer_docs/deployment.md +++ b/developer_docs/deployment.md @@ -29,6 +29,8 @@ These are the steps that happen when you deploy the application. You'll only need to do this if you're testing the production environment locally. +Note: The installation steps assume you are using a Unix-like shell. If you are using Windows, you will need to use `copy` in place of `cp`. + 1. Clone this repository and `cd` into it 2. `$ npm install` 3. Install MongoDB and make sure it is running @@ -39,8 +41,6 @@ You'll only need to do this if you're testing the production environment locally 8. Since production assumes your environment variables are in the shell environment, and not in a `.env` file, you will have to run `export $(grep -v '^#' .env | xargs)` or a similar command, see this [Stack Overflow answer](https://stackoverflow.com/a/20909045/4086967). 9. `$ npm run start:prod` -NOTE- Windows users should use `copy` instead of `cp` during installation. - ## Self Hosting - Heroku Deployment If you are interested in hosting and deploying your own p5.js Web Editor instance, you can! It would be the same as the official editor instance at editor.p5js.org, except with a different domain, and you would be in charge of the maintenance. We recommend using Heroku as you can host it for free. From 49897cab168f5aa24a7e5c6a58253d8c2ef031d2 Mon Sep 17 00:00:00 2001 From: Abhinav Sagar <40603139+abhinavsagar@users.noreply.github.com> Date: Thu, 28 Mar 2019 11:08:36 +0530 Subject: [PATCH 7/8] Update installation.md --- developer_docs/installation.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/developer_docs/installation.md b/developer_docs/installation.md index fbf6a7c4..b20dbcee 100644 --- a/developer_docs/installation.md +++ b/developer_docs/installation.md @@ -4,6 +4,8 @@ Follow these instructions to set up your development environment, which you need ## Manual Installation +Note: The installation steps assume you are using a Unix-like shell. If you are using Windows, you will need to use `copy` instead of `cp`. + 1. Install [node.js](http://nodejs.org/), which also automatically installs the [npm](https://www.npmjs.org) package manager. 2. [Fork](https://help.github.com/articles/fork-a-repo) the [p5.js Web Editor repository](https://github.com/processing/p5.js-web-editor) into your own GitHub account. 3. [Clone](https://help.github.com/articles/cloning-a-repository/) your new fork of the repository from GitHub onto your local computer. @@ -29,10 +31,10 @@ Follow these instructions to set up your development environment, which you need 11. Install the [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) 12. Open and close the Redux DevTools using `ctrl+h`, and move them with `ctrl+w` -NOTE- Windows users should use `copy` instead of `cp` during installation. - ## Docker Installation +Note: The installation steps assume you are using a Unix-like shell. If you are using Windows, you will need to use `copy` instead of `cp`. + Using Docker, you can have a complete, consistent development environment without having to manually install dependencies such as Node, Mongo, etc. It also helps isolate these dependencies and their data from other projects that you may have on the same computer that use different/conflicting versions, etc. Note that this takes up a significant amount of space on your machine. Make sure you have at least 5GB free. @@ -59,8 +61,6 @@ If you don't have the full server environment running, you can launch a one-off 10. `$ docker-compose -f docker-compose-development.yml run app --rm bash -l` -NOTE- Windows users should use `copy` instead of `cp` during installation. - ## S3 Bucket Configuration Note that this is optional, unless you are working on the part of the application that allows a user to upload images, videos, etc. Please refer to the folllowing [gist](https://gist.github.com/catarak/70c9301f0fd1ac2d6b58de03f61997e3) to set up an S3 bucket to be used with this project. From c4245d64afa9e90e8381f14005b88c2f6eb30bd3 Mon Sep 17 00:00:00 2001 From: Abhinav Sagar <40603139+abhinavsagar@users.noreply.github.com> Date: Thu, 28 Mar 2019 11:08:56 +0530 Subject: [PATCH 8/8] Update deployment.md --- developer_docs/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer_docs/deployment.md b/developer_docs/deployment.md index 55369d9b..cbf72b91 100644 --- a/developer_docs/deployment.md +++ b/developer_docs/deployment.md @@ -29,7 +29,7 @@ These are the steps that happen when you deploy the application. You'll only need to do this if you're testing the production environment locally. -Note: The installation steps assume you are using a Unix-like shell. If you are using Windows, you will need to use `copy` in place of `cp`. +Note: The installation steps assume you are using a Unix-like shell. If you are using Windows, you will need to use `copy` instead of `cp`. 1. Clone this repository and `cd` into it 2. `$ npm install`