From ddfe53e11c4678f965152f4e8fab4afa390ef66e Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Fri, 24 Jan 2020 09:55:58 +0100 Subject: [PATCH] chore: allow build of playground --- .gitignore | 1 + package.json | 8 +-- webpack.config.js | 16 +++-- yarn.lock | 165 ++++++++++++++-------------------------------- 4 files changed, 66 insertions(+), 124 deletions(-) diff --git a/.gitignore b/.gitignore index 1198041c..03553ff3 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ local.log e2e/reports e2e/screenshots examples/__build__ +playground_dist diff --git a/package.json b/package.json index 7179c836..cd016836 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "scripts": { "build": "yarn rollup -c rollup.config.js", "dev": "webpack-dev-server --mode=development", + "build:playground": "webpack --env.prod", "dev:examples": "webpack-dev-server --mode=development --config examples/webpack.config.js", "lint": "prettier -c --parser typescript \"{src,__tests__,e2e}/**/*.[jt]s?(x)\"", "lint:fix": "yarn run lint --write", @@ -26,7 +27,7 @@ "@types/jsdom": "^12.2.4", "@types/webpack": "^4.41.3", "@types/webpack-env": "^1.15.0", - "@vue/compiler-sfc": "^3.0.0-alpha.2", + "@vue/compiler-sfc": "^3.0.0-alpha.3", "axios": "^0.19.2", "browserstack-local": "^1.4.4", "chromedriver": "^79.0.0", @@ -34,7 +35,6 @@ "consola": "^2.11.3", "css-loader": "^3.4.2", "dotenv": "^8.2.0", - "expect": "^24.9.0", "faked-promise": "^2.2.2", "html-webpack-plugin": "^3.2.0", "jest": "^25.1.0", @@ -47,12 +47,12 @@ "rollup-plugin-terser": "^5.2.0", "rollup-plugin-typescript2": "^0.25.3", "selenium-server": "^3.141.59", - "style-loader": "^1.1.2", + "style-loader": "^1.1.3", "ts-jest": "^25.0.0", "ts-loader": "^6.2.1", "ts-node": "^8.6.2", "typescript": "^3.7.5", - "vue": "^3.0.0-alpha.2", + "vue": "^3.0.0-alpha.3", "vue-loader": "^16.0.0-alpha.2", "webpack": "^4.41.5", "webpack-cli": "^3.3.10", diff --git a/webpack.config.js b/webpack.config.js index 5f3fdd8b..7af1aef7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,15 +3,18 @@ const HtmlWebpackPlugin = require('html-webpack-plugin') const { VueLoaderPlugin } = require('vue-loader') const webpack = require('webpack') -const outputPath = resolve(__dirname, 'examples_dist') +const outputPath = resolve(__dirname, 'playground_dist') + +/** @type {import('webpack').ConfigurationFactory} */ +const config = (env = {}) => ({ + mode: env.prod ? 'production' : 'development', + devtool: env.prod ? 'source-map' : 'inline-source-map', -module.exports = { - mode: 'development', - devtool: 'inline-source-map', devServer: { contentBase: outputPath, historyApiFallback: true, hot: true, + stats: 'minimal', }, output: { @@ -19,6 +22,7 @@ module.exports = { publicPath: '/', filename: 'bundle.js', }, + entry: [resolve(__dirname, 'playground/main.ts')], module: { rules: [ @@ -54,4 +58,6 @@ module.exports = { }, }), ], -} +}) + +module.exports = config diff --git a/yarn.lock b/yarn.lock index 5c5c8a88..4efd8e7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -287,15 +287,6 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0" - integrity sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ== - dependencies: - "@jest/source-map" "^24.9.0" - chalk "^2.0.1" - slash "^2.0.0" - "@jest/console@^25.1.0": version "25.1.0" resolved "https://registry.yarnpkg.com/@jest/console/-/console-25.1.0.tgz#1fc765d44a1e11aec5029c08e798246bd37075ab" @@ -393,15 +384,6 @@ optionalDependencies: node-notifier "^6.0.0" -"@jest/source-map@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.9.0.tgz#0e263a94430be4b41da683ccc1e6bffe2a191714" - integrity sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg== - dependencies: - callsites "^3.0.0" - graceful-fs "^4.1.15" - source-map "^0.6.0" - "@jest/source-map@^25.1.0": version "25.1.0" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-25.1.0.tgz#b012e6c469ccdbc379413f5c1b1ffb7ba7034fb0" @@ -411,15 +393,6 @@ graceful-fs "^4.2.3" source-map "^0.6.0" -"@jest/test-result@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-24.9.0.tgz#11796e8aa9dbf88ea025757b3152595ad06ba0ca" - integrity sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA== - dependencies: - "@jest/console" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/istanbul-lib-coverage" "^2.0.0" - "@jest/test-result@^25.1.0": version "25.1.0" resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-25.1.0.tgz#847af2972c1df9822a8200457e64be4ff62821f7" @@ -714,29 +687,29 @@ dependencies: "@types/yargs-parser" "*" -"@vue/compiler-core@3.0.0-alpha.2": - version "3.0.0-alpha.2" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.0-alpha.2.tgz#c37e7b3df56e8c37c7a4085f24a0c4f76e93119e" - integrity sha512-BJAnc5NKl69Hs7X+W+i0mvu/FksgLvN4tIuXlPAmOKI1bBROTontNtqL6Dq+mZ3yu+eeIw8pM6s0gminDnCojg== +"@vue/compiler-core@3.0.0-alpha.3": + version "3.0.0-alpha.3" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.0-alpha.3.tgz#632dd4217e0490aa6aa2c8d2c3956045972b8bd9" + integrity sha512-xzqlzor8zZXvhfputSUTXlKZ7RT+w8ro9PjDDMOfgRNrdhRLAOUSULvLKh6fB1zMZiBPUYpX/WuAqB5+7ZXARw== dependencies: acorn "^7.1.0" estree-walker "^0.8.1" source-map "^0.6.1" -"@vue/compiler-dom@3.0.0-alpha.2": - version "3.0.0-alpha.2" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.0-alpha.2.tgz#76b0b77026e05831c8ca6aab9f90807843f45013" - integrity sha512-BeKtdWi253njQy2SxvNH8iNdtnBctUIbjRbEOXC/2KDOPo6lwrgHNWjHxS43kX0aBM6qJa11w+jzfcCcpQ4yVQ== +"@vue/compiler-dom@3.0.0-alpha.3": + version "3.0.0-alpha.3" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.0-alpha.3.tgz#e4844edfddefefd9661ebce2666d865d49c77397" + integrity sha512-m87mvZoYyE1HF3yNfl8qBxr6xqNeV4XSe/zneb+0tZNp5RyTTi9Kg8tnPZZ65HYBaX5huRxO66DAf1eb2O9Nfg== dependencies: - "@vue/compiler-core" "3.0.0-alpha.2" + "@vue/compiler-core" "3.0.0-alpha.3" -"@vue/compiler-sfc@^3.0.0-alpha.2": - version "3.0.0-alpha.2" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.0-alpha.2.tgz#b8d7485c2075a107508a1554b75cc5058460ba0b" - integrity sha512-lOlGX8znccwrC8iLcw/dQt58xt0rR9D+Sj7SDiWcIXCrOWEIE5j1obGdJnOjuysnZKu9w80XtQY5E4zeCNhJWw== +"@vue/compiler-sfc@^3.0.0-alpha.3": + version "3.0.0-alpha.3" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.0-alpha.3.tgz#5e1c8fd5dda5b8d8075140a547afb146225fd382" + integrity sha512-TmeS2xugaibC4XQqqMPeb7vyfMEoIVKepuI6nh7Ad54Mm1yl48eit3XJMoBUbKzSz6rrOw8ECvKoANu1WZFAmg== dependencies: - "@vue/compiler-core" "3.0.0-alpha.2" - "@vue/compiler-dom" "3.0.0-alpha.2" + "@vue/compiler-core" "3.0.0-alpha.3" + "@vue/compiler-dom" "3.0.0-alpha.3" consolidate "^0.15.1" hash-sum "^2.0.0" lru-cache "^5.1.1" @@ -745,24 +718,24 @@ postcss-selector-parser "^6.0.2" source-map "^0.6.1" -"@vue/reactivity@3.0.0-alpha.2": - version "3.0.0-alpha.2" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.0-alpha.2.tgz#8d0b235652f1834236325c36ea0ba419e06df423" - integrity sha512-uUQmNHR2mc2XPwY9stm0WuYCzZ0JEiAdtMNNFbdiIrgbbpFY5EYQEebXojmw4f13AhErUasB9dPPqBPxyGft3A== +"@vue/reactivity@3.0.0-alpha.3": + version "3.0.0-alpha.3" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.0-alpha.3.tgz#6056cff882b7d4c2d3fe280622b719d9d36df97d" + integrity sha512-quBlbMa3rOW3ivtDbrgP2PXbkzexS5c59HL/Y9CvDY7HXilq3VcDxudqvvPzIMpvSt7eym7hU6iQiJ1cAtjp1Q== -"@vue/runtime-core@3.0.0-alpha.2": - version "3.0.0-alpha.2" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.0-alpha.2.tgz#574af742f13cfc691eab9247d3d23e8db59f1f83" - integrity sha512-wyzZ69B4fO6pawN7Z/thLnWOwhymJ8eE45mO8VGjRWi91RbC70X+tDrjUhsVQBTDJy9C9YkimBtDhBAy/cREIw== +"@vue/runtime-core@3.0.0-alpha.3": + version "3.0.0-alpha.3" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.0-alpha.3.tgz#2c13f458a93c74a0604c59a1505e61b644571cee" + integrity sha512-OzNHFuaI7h9bXa3PWdhCtdJMROhwBWn90/4MLwnGL2a8+QFGfkk6ao7yN4XWWjMeIUwIjV/A/YJAAnXnHB36bg== dependencies: - "@vue/reactivity" "3.0.0-alpha.2" + "@vue/reactivity" "3.0.0-alpha.3" -"@vue/runtime-dom@3.0.0-alpha.2": - version "3.0.0-alpha.2" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.0-alpha.2.tgz#16d0cf1ce4ff806d7e1ef8c16aaf869093c8ebbd" - integrity sha512-YQexi68NcGH0miaSDVZ7TlMIjO/m8tlOKKw+2ze4TeEyHAb5cXq/pfeqs6JvnLKvZ53ThtG18Uuku4pDmt8bWw== +"@vue/runtime-dom@3.0.0-alpha.3": + version "3.0.0-alpha.3" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.0-alpha.3.tgz#7205b667115e3a058239854f87c3eb189919fbc2" + integrity sha512-Zyxu9TzlnVOd3RPm01ZostA1/BB1rTig0scl9HKzqoObIiFCZueRDCedFGeWDzXJbgO9Ap9fXjmtiuXGzjlKGg== dependencies: - "@vue/runtime-core" "3.0.0-alpha.2" + "@vue/runtime-core" "3.0.0-alpha.3" csstype "^2.6.8" "@webassemblyjs/ast@1.8.5": @@ -2787,18 +2760,6 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-24.9.0.tgz#b75165b4817074fa4a157794f46fe9f1ba15b6ca" - integrity sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q== - dependencies: - "@jest/types" "^24.9.0" - ansi-styles "^3.2.0" - jest-get-type "^24.9.0" - jest-matcher-utils "^24.9.0" - jest-message-util "^24.9.0" - jest-regex-util "^24.9.0" - expect@^25.1.0: version "25.1.0" resolved "https://registry.yarnpkg.com/expect/-/expect-25.1.0.tgz#7e8d7b06a53f7d66ec927278db3304254ee683ee" @@ -4151,7 +4112,7 @@ jest-config@^25.1.0: pretty-format "^25.1.0" realpath-native "^1.1.0" -jest-diff@^24.3.0, jest-diff@^24.9.0: +jest-diff@^24.3.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.9.0.tgz#931b7d0d5778a1baf7452cb816e325e3724055da" integrity sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ== @@ -4271,16 +4232,6 @@ jest-leak-detector@^25.1.0: jest-get-type "^25.1.0" pretty-format "^25.1.0" -jest-matcher-utils@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz#f5b3661d5e628dffe6dd65251dfdae0e87c3a073" - integrity sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA== - dependencies: - chalk "^2.0.1" - jest-diff "^24.9.0" - jest-get-type "^24.9.0" - pretty-format "^24.9.0" - jest-matcher-utils@^25.1.0: version "25.1.0" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.1.0.tgz#fa5996c45c7193a3c24e73066fc14acdee020220" @@ -4291,20 +4242,6 @@ jest-matcher-utils@^25.1.0: jest-get-type "^25.1.0" pretty-format "^25.1.0" -jest-message-util@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-24.9.0.tgz#527f54a1e380f5e202a8d1149b0ec872f43119e3" - integrity sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/stack-utils" "^1.0.1" - chalk "^2.0.1" - micromatch "^3.1.10" - slash "^2.0.0" - stack-utils "^1.0.1" - jest-message-util@^25.1.0: version "25.1.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-25.1.0.tgz#702a9a5cb05c144b9aa73f06e17faa219389845e" @@ -4331,11 +4268,6 @@ jest-pnp-resolver@^1.2.1: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ== -jest-regex-util@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-24.9.0.tgz#c13fb3380bde22bf6575432c493ea8fe37965636" - integrity sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA== - jest-regex-util@^25.1.0: version "25.1.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-25.1.0.tgz#efaf75914267741838e01de24da07b2192d16d87" @@ -6668,7 +6600,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.0.1, schema-utils@^2.6.0: +schema-utils@^2.6.0: version "2.6.1" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.1.tgz#eb78f0b945c7bcfa2082b3565e8db3548011dc4f" integrity sha512-0WXHDs1VDJyo+Zqs9TKLKyD/h7yDpHUhEFsM2CzkICFdoX1av+GBq/J2xRTFfsQO5kBfhZzANf2VcIm84jqDbg== @@ -6676,6 +6608,14 @@ schema-utils@^2.0.1, schema-utils@^2.6.0: ajv "^6.10.2" ajv-keywords "^3.4.1" +schema-utils@^2.6.4: + version "2.6.4" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.4.tgz#a27efbf6e4e78689d91872ee3ccfa57d7bdd0f53" + integrity sha512-VNjcaUxVnEeun6B2fiiUDjXXBtD4ZSH7pdbfIu1pOFwgptDPLMo/z9jr4sUfsjFVPqDCEin/F7IYlq7/E6yDbQ== + dependencies: + ajv "^6.10.2" + ajv-keywords "^3.4.1" + select-hose@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" @@ -6832,11 +6772,6 @@ sisteransi@^1.0.3: resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.4.tgz#386713f1ef688c7c0304dc4c0632898941cad2e3" integrity sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig== -slash@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" - integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== - slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -7214,13 +7149,13 @@ strip-json-comments@2.0.1, strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -style-loader@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.1.2.tgz#1b519c19faf548df6182b93e72ea1a4156022c2f" - integrity sha512-0Mpq1ZHFDCNq1F+6avNBgv+7q8V+mWRuzehxyJT+aKgzyN/yfKTwjYqaYwBgx+11UpQxL21zNQfzzlz+JcGURw== +style-loader@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.1.3.tgz#9e826e69c683c4d9bf9db924f85e9abb30d5e200" + integrity sha512-rlkH7X/22yuwFYK357fMN/BxYOorfnfq0eD7+vqlemSK4wEcejFF1dg4zxP0euBW8NrYx2WZzZ8PPFevr7D+Kw== dependencies: loader-utils "^1.2.3" - schema-utils "^2.0.1" + schema-utils "^2.6.4" supports-color@6.0.0: version "6.0.0" @@ -7778,13 +7713,13 @@ vue-loader@^16.0.0-alpha.2: merge-source-map "^1.1.0" source-map "^0.6.1" -vue@^3.0.0-alpha.2: - version "3.0.0-alpha.2" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.0-alpha.2.tgz#98e1769e264110404e7131a4258f23ba554a885b" - integrity sha512-juu9wygL/NwSTU/ZvsvSoBIoK740MbQLp90nPgCSp8VDxfaDvF8V21SqUbNLrPHy4lLydkiX+OxdH0hrnC8MzQ== +vue@^3.0.0-alpha.3: + version "3.0.0-alpha.3" + resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.0-alpha.3.tgz#f7eea63de0a45e367a60f4f664ba86ff1003dbf8" + integrity sha512-FXK5MNIuXX9fYLFgxjeQvDaBF323OUGB2/i3nSkDt+tXUyDlmxg4kXL0DuIpPZ5EF1uERUqAeoKtZXnKrpudFg== dependencies: - "@vue/compiler-dom" "3.0.0-alpha.2" - "@vue/runtime-dom" "3.0.0-alpha.2" + "@vue/compiler-dom" "3.0.0-alpha.3" + "@vue/runtime-dom" "3.0.0-alpha.3" w3c-hr-time@^1.0.1: version "1.0.1" -- 2.47.2