From 41f8fe5024fde9c400ae31bd812b805cd51d3a5e Mon Sep 17 00:00:00 2001 From: Abhinav Jha Date: Tue, 20 Aug 2019 15:09:08 +0530 Subject: [PATCH] Add Editor Configuration Files --- app/client/.editorconfig | 12 +++ app/client/.gitignore | 2 + app/client/.nvmrc | 1 + app/client/.prettierignore | 5 ++ app/client/.prettierrc | 9 ++ app/client/package.json | 8 +- app/client/src/constants/DefaultTheme.tsx | 4 +- .../editorComponents/ContainerComponent.tsx | 4 +- app/client/tsconfig.json | 3 +- app/client/yarn.lock | 82 +++++++++++-------- 10 files changed, 87 insertions(+), 43 deletions(-) create mode 100644 app/client/.editorconfig create mode 100644 app/client/.nvmrc create mode 100644 app/client/.prettierignore create mode 100644 app/client/.prettierrc diff --git a/app/client/.editorconfig b/app/client/.editorconfig new file mode 100644 index 0000000000..a402d3daf0 --- /dev/null +++ b/app/client/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/app/client/.gitignore b/app/client/.gitignore index 4d29575de8..c3255281b3 100755 --- a/app/client/.gitignore +++ b/app/client/.gitignore @@ -21,3 +21,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* + +/out \ No newline at end of file diff --git a/app/client/.nvmrc b/app/client/.nvmrc new file mode 100644 index 0000000000..c68ea6ff65 --- /dev/null +++ b/app/client/.nvmrc @@ -0,0 +1 @@ +lts/dubnium \ No newline at end of file diff --git a/app/client/.prettierignore b/app/client/.prettierignore new file mode 100644 index 0000000000..e6a5d5aac2 --- /dev/null +++ b/app/client/.prettierignore @@ -0,0 +1,5 @@ +build/ +node_modules/ +package-lock.json +yarn.lock +package.json \ No newline at end of file diff --git a/app/client/.prettierrc b/app/client/.prettierrc new file mode 100644 index 0000000000..17740f0c8b --- /dev/null +++ b/app/client/.prettierrc @@ -0,0 +1,9 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "semi": true, + "singleQuote": false, + "trailingComma": "all", + "parser": "typescript" +} \ No newline at end of file diff --git a/app/client/package.json b/app/client/package.json index 8906cbfbeb..3dea6b9119 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -2,6 +2,10 @@ "name": "picasso", "version": "0.1.0", "private": true, + "engines": { + "node": "10.16.3", + "npm": "6.9.0" + }, "dependencies": { "@blueprintjs/core": "^3.11.0", "@blueprintjs/datetime": "^3.6.0", @@ -26,8 +30,8 @@ "normalizr": "^3.3.0", "prettier": "^1.16.0", "react": "^16.7.0", - "react-dnd": "^7.0.2", - "react-dnd-html5-backend": "^7.0.2", + "react-dnd": "^9.3.4", + "react-dnd-html5-backend": "^9.3.4", "react-dom": "^16.7.0", "react-redux": "^6.0.0", "react-router": "^4.3.1", diff --git a/app/client/src/constants/DefaultTheme.tsx b/app/client/src/constants/DefaultTheme.tsx index 5ab588d2fd..8c8040dd38 100644 --- a/app/client/src/constants/DefaultTheme.tsx +++ b/app/client/src/constants/DefaultTheme.tsx @@ -20,7 +20,7 @@ export interface IFontInterface { export interface IThemeInterface { primaryColor: Color secondaryColor: Color - ascentColor: Color + accentColor: Color headerFont: IFontInterface, titleFont: IFontInterface, subTitleFont: IFontInterface @@ -35,7 +35,7 @@ const defaultFont: IFontInterface = { export const theme = { primaryColor: Colors.FullBlack, secondaryColor: Colors.FullWhite, - ascentColor: Colors.FullBlack, + accentColor: Colors.FullBlack, headerFont: defaultFont, titleFont: defaultFont, subTitleFont: defaultFont diff --git a/app/client/src/editorComponents/ContainerComponent.tsx b/app/client/src/editorComponents/ContainerComponent.tsx index a069c3cd80..65e7c37f3c 100644 --- a/app/client/src/editorComponents/ContainerComponent.tsx +++ b/app/client/src/editorComponents/ContainerComponent.tsx @@ -4,8 +4,8 @@ import styled from "../constants/DefaultTheme" import React from "react" export const Container = styled("div")` - display: "flex" - flexDirection: ${props => { + display: flex; + flex-direction: ${props => { return props.orientation === "HORIZONTAL" ? "row" : "column" }}; background: ${props => props.style.backgroundColor}; diff --git a/app/client/tsconfig.json b/app/client/tsconfig.json index 0980b23fa1..5dae6633f5 100644 --- a/app/client/tsconfig.json +++ b/app/client/tsconfig.json @@ -6,6 +6,7 @@ "dom.iterable", "esnext" ], + "outDir": "./out/js/src", "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, @@ -20,6 +21,6 @@ "jsx": "preserve" }, "include": [ - "src" + "./src/**/*" ] } diff --git a/app/client/yarn.lock b/app/client/yarn.lock index fc8e3a6339..d6ada73f62 100755 --- a/app/client/yarn.lock +++ b/app/client/yarn.lock @@ -914,6 +914,11 @@ "@svgr/core" "^2.4.1" loader-utils "^1.1.0" +"@types/asap@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/asap/-/asap-2.0.0.tgz#d529e9608c83499a62ae08c871c5e62271aa2963" + integrity sha512-upIS0Gt9Mc8eEpCbYMZ1K8rhNosfKUtimNcINce+zLwJF5UpM3Vv7yz3S5l/1IX+DxTa8lTkUjqynvjRXyJzsg== + "@types/axios@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@types/axios/-/axios-0.14.0.tgz#ec2300fbe7d7dddd7eb9d3abf87999964cafce46" @@ -934,6 +939,19 @@ dependencies: "@types/react" "*" +"@types/hoist-non-react-statics@^3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" + integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== + dependencies: + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + +"@types/invariant@^2.2.30": + version "2.2.30" + resolved "https://registry.yarnpkg.com/@types/invariant/-/invariant-2.2.30.tgz#20efa342807606ada5483731a8137cb1561e5fe9" + integrity sha512-98fB+yo7imSD2F7PF7GIpELNgtLNgo5wjivu0W5V4jx+KVVJxo6p/qN4zdzSTBWy4/sN3pPyXwnhRSD28QX+ag== + "@types/jest@^23.3.13": version "23.3.14" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.14.tgz#37daaf78069e7948520474c87b80092ea912520a" @@ -1003,6 +1021,11 @@ "@types/prop-types" "*" csstype "^2.2.0" +"@types/shallowequal@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/shallowequal/-/shallowequal-1.1.1.tgz#aad262bb3f2b1257d94c71d545268d592575c9b1" + integrity sha512-Lhni3aX80zbpdxRuWhnuYPm8j8UQaa571lHP/xI4W+7BAFhSIhRReXnqjEgT/XzPoXZTJkCqstFMJ8CZTK6IlQ== + "@types/styled-components@^4.1.8": version "4.1.12" resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-4.1.12.tgz#62c19bd1aa37b1a904d36c179a0fec66c24ac99c" @@ -2131,10 +2154,6 @@ chalk@^2.3.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -change-emitter@^0.1.2: - version "0.1.6" - resolved "https://registry.yarnpkg.com/change-emitter/-/change-emitter-0.1.6.tgz#e8b2fe3d7f1ab7d69a32199aff91ea6931409515" - chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -2957,13 +2976,15 @@ dir-glob@^2.0.0: arrify "^1.0.1" path-type "^3.0.0" -dnd-core@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/dnd-core/-/dnd-core-7.2.0.tgz#70d4ab6c0c6f90423c27b1711624b5d834025bf3" +dnd-core@^9.3.4: + version "9.3.4" + resolved "https://registry.yarnpkg.com/dnd-core/-/dnd-core-9.3.4.tgz#56b5fdc165aa7d102506d3d5a08ec1fa789e0775" + integrity sha512-sDzBiGXgpj9bQhs8gtPWFIKMg4WY8ywI9RI81rRAUWI4oNj/Sm/ztjS67UjCvMa+fWoQ2WNIV3U9oDqeBN0+2g== dependencies: + "@types/asap" "^2.0.0" + "@types/invariant" "^2.2.30" asap "^2.0.6" invariant "^2.2.4" - lodash "^4.17.11" redux "^4.0.1" dns-equal@^1.0.0: @@ -3632,7 +3653,7 @@ fb-watchman@^2.0.0: dependencies: bser "^2.0.0" -fbjs@^0.8.0, fbjs@^0.8.1: +fbjs@^0.8.0: version "0.8.17" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" dependencies: @@ -4279,7 +4300,7 @@ hoek@4.x.x: version "4.2.1" resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" -hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0: +hoist-non-react-statics@^2.5.0: version "2.5.5" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" @@ -4610,7 +4631,7 @@ internal-ip@^3.0.1: default-gateway "^2.6.0" ipaddr.js "^1.5.2" -invariant@^2.1.0, invariant@^2.2.1, invariant@^2.2.2, invariant@^2.2.4: +invariant@^2.2.1, invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: @@ -7699,22 +7720,22 @@ react-dev-utils@^7.0.1: strip-ansi "4.0.0" text-table "0.2.0" -react-dnd-html5-backend@^7.0.2: - version "7.2.0" - resolved "https://registry.yarnpkg.com/react-dnd-html5-backend/-/react-dnd-html5-backend-7.2.0.tgz#4cde55fb690020d98d7b6f3d4400c56b2ae82dfa" +react-dnd-html5-backend@^9.3.4: + version "9.3.4" + resolved "https://registry.yarnpkg.com/react-dnd-html5-backend/-/react-dnd-html5-backend-9.3.4.tgz#5d1f5ac608206d7b294b7407b9e1a336589eedd7" + integrity sha512-s+Xu0j7fHV9bLMSaOCuX76baQKcZfycAx0EzDmkxcFXPBiiFlI8l6rzwURdSJCjNcvLYXd8MLb4VkSNSq5ISZQ== dependencies: - dnd-core "^7.2.0" - lodash "^4.17.11" + dnd-core "^9.3.4" -react-dnd@^7.0.2: - version "7.3.1" - resolved "https://registry.yarnpkg.com/react-dnd/-/react-dnd-7.3.1.tgz#40591760d11d996ac859ac6312ea6f26dbfffd23" +react-dnd@^9.3.4: + version "9.3.4" + resolved "https://registry.yarnpkg.com/react-dnd/-/react-dnd-9.3.4.tgz#ebab4b5b430b72f3580c058a29298054e1f9d2b8" + integrity sha512-UUtyoHFRrryMxVMEGYa3EdZIdibnys/ax7ZRs6CKpETHlnJQOFhHE3rpI+ManvKS0o3MFc1DZ+aoudAFtrOvFA== dependencies: - dnd-core "^7.2.0" + "@types/hoist-non-react-statics" "^3.3.1" + "@types/shallowequal" "^1.1.1" + dnd-core "^9.3.4" hoist-non-react-statics "^3.3.0" - invariant "^2.1.0" - lodash "^4.17.11" - recompose "^0.30.0" shallowequal "^1.1.0" react-dom@^16.7.0: @@ -7734,7 +7755,7 @@ react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.2: version "16.8.4" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.4.tgz#90f336a68c3a29a096a3d648ab80e87ec61482a2" -react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4: +react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" @@ -7936,17 +7957,6 @@ realpath-native@^1.0.0: dependencies: util.promisify "^1.0.0" -recompose@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.30.0.tgz#82773641b3927e8c7d24a0d87d65aeeba18aabd0" - dependencies: - "@babel/runtime" "^7.0.0" - change-emitter "^0.1.2" - fbjs "^0.8.1" - hoist-non-react-statics "^2.3.1" - react-lifecycles-compat "^3.0.2" - symbol-observable "^1.0.4" - recursive-readdir@2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f" @@ -8971,7 +8981,7 @@ svgo@^1.0.0, svgo@^1.0.5: unquote "~1.1.1" util.promisify "~1.0.0" -symbol-observable@^1.0.2, symbol-observable@^1.0.4, symbol-observable@^1.1.0, symbol-observable@^1.2.0: +symbol-observable@^1.0.2, symbol-observable@^1.1.0, symbol-observable@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"