From e8ff35a60a8d4e375e9cfd2dea9ee933148637c7 Mon Sep 17 00:00:00 2001 From: Vaillant Samuel Date: Thu, 18 Apr 2019 15:54:45 +0200 Subject: [PATCH 1/3] refactor(templates): use Vue CLI --- .../public/favicon.ico-snap.png | Bin 0 -> 4286 bytes .../public/favicon.png-snap.png | Bin e2e/__snapshots__/templates.test.js.snap | 263 ++++++------------ .../Vue InstantSearch/.babelrc.template | 6 - src/templates/Vue InstantSearch/.eslintrc.js | 5 +- .../Vue InstantSearch/.gitignore.template | 26 +- src/templates/Vue InstantSearch/.prettierrc | 5 + .../Vue InstantSearch/babel.config.js | 3 + src/templates/Vue InstantSearch/index.html | 31 --- src/templates/Vue InstantSearch/manifest.json | 15 - src/templates/Vue InstantSearch/package.json | 38 ++- .../Vue InstantSearch/public/favicon.png | Bin 0 -> 1635 bytes .../Vue InstantSearch/public/index.html | 22 ++ src/templates/Vue InstantSearch/src/App.vue | 9 +- src/templates/Vue InstantSearch/src/main.js | 10 +- .../Vue InstantSearch/webpack.config.js | 76 ----- 16 files changed, 172 insertions(+), 337 deletions(-) create mode 100644 e2e/__image_snapshots__/vue-instantsearch/public/favicon.ico-snap.png rename src/templates/Vue InstantSearch/favicon.png => e2e/__image_snapshots__/vue-instantsearch/public/favicon.png-snap.png (100%) delete mode 100644 src/templates/Vue InstantSearch/.babelrc.template create mode 100644 src/templates/Vue InstantSearch/.prettierrc create mode 100644 src/templates/Vue InstantSearch/babel.config.js delete mode 100644 src/templates/Vue InstantSearch/index.html delete mode 100644 src/templates/Vue InstantSearch/manifest.json create mode 100644 src/templates/Vue InstantSearch/public/favicon.png create mode 100644 src/templates/Vue InstantSearch/public/index.html delete mode 100644 src/templates/Vue InstantSearch/webpack.config.js diff --git a/e2e/__image_snapshots__/vue-instantsearch/public/favicon.ico-snap.png b/e2e/__image_snapshots__/vue-instantsearch/public/favicon.ico-snap.png new file mode 100644 index 0000000000000000000000000000000000000000..df36fcfb72584e00488330b560ebcf34a41c64c2 GIT binary patch literal 4286 zcmds*O-Phc6o&64GDVCEQHxsW(p4>LW*W<827=Unuo8sGpRux(DN@jWP-e29Wl%wj zY84_aq9}^Am9-cWTD5GGEo#+5Fi2wX_P*bo+xO!)p*7B;iKlbFd(U~_d(U?#hLj56 zPhFkj-|A6~Qk#@g^#D^U0XT1cu=c-vu1+SElX9NR;kzAUV(q0|dl0|%h|dI$%VICy zJnu2^L*Te9JrJMGh%-P79CL0}dq92RGU6gI{v2~|)p}sG5x0U*z<8U;Ij*hB9z?ei z@g6Xq-pDoPl=MANPiR7%172VA%r)kevtV-_5H*QJKFmd;8yA$98zCxBZYXTNZ#QFk2(TX0;Y2dt&WitL#$96|gJY=3xX zpCoi|YNzgO3R`f@IiEeSmKrPSf#h#Qd<$%Ej^RIeeYfsxhPMOG`S`Pz8q``=511zm zAm)MX5AV^5xIWPyEu7u>qYs?pn$I4nL9J!=K=SGlKLXpE<5x+2cDTXq?brj?n6sp= zphe9;_JHf40^9~}9i08r{XM$7HB!`{Ys~TK0kx<}ZQng`UPvH*11|q7&l9?@FQz;8 zx!=3<4seY*%=OlbCbcae?5^V_}*K>Uo6ZWV8mTyE^B=DKy7-sdLYkR5Z?paTgK-zyIkKjIcpyO z{+uIt&YSa_$QnN_@t~L014dyK(fOOo+W*MIxbA6Ndgr=Y!f#Tokqv}n<7-9qfHkc3 z=>a|HWqcX8fzQCT=dqVbogRq!-S>H%yA{1w#2Pn;=e>JiEj7Hl;zdt-2f+j2%DeVD zsW0Ab)ZK@0cIW%W7z}H{&~yGhn~D;aiP4=;m-HCo`BEI+Kd6 z={Xwx{TKxD#iCLfl2vQGDitKtN>z|-AdCN|$jTFDg0m3O`WLD4_s#$S literal 0 HcmV?d00001 diff --git a/src/templates/Vue InstantSearch/favicon.png b/e2e/__image_snapshots__/vue-instantsearch/public/favicon.png-snap.png similarity index 100% rename from src/templates/Vue InstantSearch/favicon.png rename to e2e/__image_snapshots__/vue-instantsearch/public/favicon.png-snap.png diff --git a/e2e/__snapshots__/templates.test.js.snap b/e2e/__snapshots__/templates.test.js.snap index 5484c9444..798ea0787 100644 --- a/e2e/__snapshots__/templates.test.js.snap +++ b/e2e/__snapshots__/templates.test.js.snap @@ -4963,15 +4963,6 @@ Array [ ] `; -exports[`Templates Vue InstantSearch File content: .babelrc 1`] = ` -"{ - \\"presets\\": [ - [\\"env\\", { \\"modules\\": false }], - \\"stage-3\\" - ] -}" -`; - exports[`Templates Vue InstantSearch File content: .editorconfig 1`] = ` "root = true @@ -4986,19 +4977,46 @@ trim_trailing_whitespace = true" exports[`Templates Vue InstantSearch File content: .eslintrc.js 1`] = ` "module.exports = { - extends: 'algolia/vue', + // extends from 'prettier/vue' until we update the Algolia configuration + extends: ['algolia/vue', 'prettier/vue'], rules: { 'import/no-commonjs': 'off', + // enable the rule until we update the Algolia configuration + 'vue/component-name-in-template-casing': ['error', 'kebab-case'], }, };" `; exports[`Templates Vue InstantSearch File content: .gitignore 1`] = ` -"node_modules/ -npm-debug.log -yarn-debug.log -yarn-error.log -dist/" +".DS_Store +node_modules +/dist + +# local env files +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw?" +`; + +exports[`Templates Vue InstantSearch File content: .prettierrc 1`] = ` +"{ + \\"singleQuote\\": true, + \\"proseWrap\\": \\"never\\", + \\"trailingComma\\": \\"es5\\" +}" `; exports[`Templates Vue InstantSearch File content: README.md 1`] = ` @@ -5025,56 +5043,10 @@ yarn start Open http://localhost:3000 to see your app." `; -exports[`Templates Vue InstantSearch File content: index.html 1`] = ` -" - - - - - - - - - - - - - - vue-instantsearch-app - - - - - -
- - - - -" -`; - -exports[`Templates Vue InstantSearch File content: manifest.json 1`] = ` -"{ - \\"short_name\\": \\"vue-instantsearch-app\\", - \\"name\\": \\"vue-instantsearch-app Sample\\", - \\"icons\\": [ - { - \\"src\\": \\"favicon.png\\", - \\"sizes\\": \\"64x64 32x32 24x24 16x16\\", - \\"type\\": \\"image/x-icon\\" - } - ], - \\"start_url\\": \\"./index.html\\", - \\"display\\": \\"standalone\\", - \\"theme_color\\": \\"#000000\\", - \\"background_color\\": \\"#ffffff\\" -}" +exports[`Templates Vue InstantSearch File content: babel.config.js 1`] = ` +"module.exports = { + presets: ['@vue/app'], +};" `; exports[`Templates Vue InstantSearch File content: package.json 1`] = ` @@ -5083,23 +5055,55 @@ exports[`Templates Vue InstantSearch File content: package.json 1`] = ` \\"version\\": \\"1.0.0\\", \\"private\\": true, \\"scripts\\": { - \\"start\\": \\"cross-env NODE_ENV=development webpack-dev-server --port 3000 --hot\\", - \\"build\\": \\"cross-env NODE_ENV=production webpack --progress --hide-modules\\", - \\"lint\\": \\"eslint --ext .js,.vue .\\", + \\"start\\": \\"vue-cli-service serve\\", + \\"build\\": \\"vue-cli-service build\\", + \\"lint\\": \\"vue-cli-service lint\\", \\"lint:fix\\": \\"npm run lint -- --fix\\" }, + \\"browserslist\\": [ + \\"> 1%\\", + \\"last 2 versions\\", + \\"not ie <= 8\\" + ], \\"partialDependencies\\": { \\"vue-instantsearch\\": \\"2.0.0\\" } }" `; +exports[`Templates Vue InstantSearch File content: public/index.html 1`] = ` +" + + + + + + favicon.png\\"> + + + vue-instantsearch-app + + + +
+ + +" +`; + exports[`Templates Vue InstantSearch File content: src/App.vue 1`] = ` "