From 21f2137367900f0ec137d10e026d856a00009a58 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Thu, 10 Dec 2020 22:24:23 -0800 Subject: [PATCH] Use verbose "mount" configuration in CSA, make public directory static (#1894) * update csa templates * add staticHtml option * Revert "add staticHtml option" This reverts commit 4be0c5a8acf678eec6ccb95d09e0db2057aecd9d. * better format * rename _dist_ to dist --- .../snowpack.config.js | 4 +- .../app-scripts-preact/snowpack.config.js | 4 +- .../app-scripts-react/snowpack.config.js | 4 +- .../app-scripts-svelte/snowpack.config.js | 4 +- .../app-scripts-vue/snowpack.config.js | 4 +- .../app-template-11ty/snowpack.config.js | 4 +- .../snowpack.config.js | 4 +- .../app-template-blank/snowpack.config.js | 4 +- .../snowpack.config.js | 4 +- .../snowpack.config.js | 4 +- .../snowpack.config.js | 4 +- .../app-template-preact/snowpack.config.js | 4 +- .../snowpack.config.js | 4 +- .../app-template-react/snowpack.config.js | 4 +- .../snowpack.config.js | 4 +- .../app-template-svelte/snowpack.config.js | 4 +- .../snowpack.config.js | 4 +- .../app-template-vue/snowpack.config.js | 4 +- .../create-snowpack-app.test.js.snap | 570 +++++++++--------- .../__snapshots__ | 11 +- 20 files changed, 325 insertions(+), 328 deletions(-) diff --git a/create-snowpack-app/app-scripts-lit-element/snowpack.config.js b/create-snowpack-app/app-scripts-lit-element/snowpack.config.js index 482c6b995a..3284d8fef9 100644 --- a/create-snowpack-app/app-scripts-lit-element/snowpack.config.js +++ b/create-snowpack-app/app-scripts-lit-element/snowpack.config.js @@ -6,8 +6,8 @@ const isTS = fs.existsSync(url.pathToFileURL(path.join(process.cwd(), 'tsconfig. module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: ['@snowpack/plugin-babel', '@snowpack/plugin-dotenv'], devOptions: {}, diff --git a/create-snowpack-app/app-scripts-preact/snowpack.config.js b/create-snowpack-app/app-scripts-preact/snowpack.config.js index 861675fb9e..a42531e176 100644 --- a/create-snowpack-app/app-scripts-preact/snowpack.config.js +++ b/create-snowpack-app/app-scripts-preact/snowpack.config.js @@ -6,8 +6,8 @@ const isTS = fs.existsSync(path.join(cwd, 'tsconfig.json')); module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: ['@snowpack/plugin-babel', '@prefresh/snowpack', '@snowpack/plugin-dotenv'], installOptions: { diff --git a/create-snowpack-app/app-scripts-react/snowpack.config.js b/create-snowpack-app/app-scripts-react/snowpack.config.js index 01d1ecf46a..f6feb61e0d 100644 --- a/create-snowpack-app/app-scripts-react/snowpack.config.js +++ b/create-snowpack-app/app-scripts-react/snowpack.config.js @@ -6,8 +6,8 @@ const isTS = fs.existsSync(path.join(cwd, 'tsconfig.json')); module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: [ '@snowpack/plugin-react-refresh', diff --git a/create-snowpack-app/app-scripts-svelte/snowpack.config.js b/create-snowpack-app/app-scripts-svelte/snowpack.config.js index efb4e26827..6265288e02 100644 --- a/create-snowpack-app/app-scripts-svelte/snowpack.config.js +++ b/create-snowpack-app/app-scripts-svelte/snowpack.config.js @@ -1,7 +1,7 @@ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: ['@snowpack/plugin-svelte', '@snowpack/plugin-dotenv'], }; diff --git a/create-snowpack-app/app-scripts-vue/snowpack.config.js b/create-snowpack-app/app-scripts-vue/snowpack.config.js index e26bef8715..a041e40586 100644 --- a/create-snowpack-app/app-scripts-vue/snowpack.config.js +++ b/create-snowpack-app/app-scripts-vue/snowpack.config.js @@ -1,7 +1,7 @@ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: ['@snowpack/plugin-vue', '@snowpack/plugin-dotenv'], }; diff --git a/create-snowpack-app/app-template-11ty/snowpack.config.js b/create-snowpack-app/app-template-11ty/snowpack.config.js index 2f18364923..60d7f6b1eb 100644 --- a/create-snowpack-app/app-template-11ty/snowpack.config.js +++ b/create-snowpack-app/app-template-11ty/snowpack.config.js @@ -1,8 +1,8 @@ /** @type {import("snowpack").SnowpackUserConfig } */ module.exports = { mount: { - _output: '/', - src: '/_dist_', + _output: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: [ ['@snowpack/plugin-run-script', { cmd: 'eleventy', watch: '$1 --watch' }], diff --git a/create-snowpack-app/app-template-blank-typescript/snowpack.config.js b/create-snowpack-app/app-template-blank-typescript/snowpack.config.js index 5de35aa41b..f0f84f96dc 100644 --- a/create-snowpack-app/app-template-blank-typescript/snowpack.config.js +++ b/create-snowpack-app/app-template-blank-typescript/snowpack.config.js @@ -1,8 +1,8 @@ /** @type {import("snowpack").SnowpackUserConfig } */ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: ['@snowpack/plugin-typescript'], install: [ diff --git a/create-snowpack-app/app-template-blank/snowpack.config.js b/create-snowpack-app/app-template-blank/snowpack.config.js index 49526ee086..c65a584446 100644 --- a/create-snowpack-app/app-template-blank/snowpack.config.js +++ b/create-snowpack-app/app-template-blank/snowpack.config.js @@ -1,8 +1,8 @@ /** @type {import("snowpack").SnowpackUserConfig } */ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: [ /* ... */ diff --git a/create-snowpack-app/app-template-lit-element-typescript/snowpack.config.js b/create-snowpack-app/app-template-lit-element-typescript/snowpack.config.js index 812f5a01d6..d1eea1d993 100644 --- a/create-snowpack-app/app-template-lit-element-typescript/snowpack.config.js +++ b/create-snowpack-app/app-template-lit-element-typescript/snowpack.config.js @@ -1,8 +1,8 @@ /** @type {import("snowpack").SnowpackUserConfig } */ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: [ '@snowpack/plugin-babel', diff --git a/create-snowpack-app/app-template-lit-element/snowpack.config.js b/create-snowpack-app/app-template-lit-element/snowpack.config.js index be648b0143..9a730de14b 100644 --- a/create-snowpack-app/app-template-lit-element/snowpack.config.js +++ b/create-snowpack-app/app-template-lit-element/snowpack.config.js @@ -1,8 +1,8 @@ /** @type {import("snowpack").SnowpackUserConfig } */ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: ['@snowpack/plugin-babel', '@snowpack/plugin-dotenv'], install: [ diff --git a/create-snowpack-app/app-template-preact-typescript/snowpack.config.js b/create-snowpack-app/app-template-preact-typescript/snowpack.config.js index 0a3799f66d..869411bdeb 100644 --- a/create-snowpack-app/app-template-preact-typescript/snowpack.config.js +++ b/create-snowpack-app/app-template-preact-typescript/snowpack.config.js @@ -1,8 +1,8 @@ /** @type {import("snowpack").SnowpackUserConfig } */ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: [ '@snowpack/plugin-dotenv', diff --git a/create-snowpack-app/app-template-preact/snowpack.config.js b/create-snowpack-app/app-template-preact/snowpack.config.js index 409566ee27..930ee31d31 100644 --- a/create-snowpack-app/app-template-preact/snowpack.config.js +++ b/create-snowpack-app/app-template-preact/snowpack.config.js @@ -1,8 +1,8 @@ /** @type {import("snowpack").SnowpackUserConfig } */ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: ['@snowpack/plugin-dotenv', '@prefresh/snowpack'], install: [ diff --git a/create-snowpack-app/app-template-react-typescript/snowpack.config.js b/create-snowpack-app/app-template-react-typescript/snowpack.config.js index 796a492f1d..9e97354827 100644 --- a/create-snowpack-app/app-template-react-typescript/snowpack.config.js +++ b/create-snowpack-app/app-template-react-typescript/snowpack.config.js @@ -1,8 +1,8 @@ /** @type {import("snowpack").SnowpackUserConfig } */ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: [ '@snowpack/plugin-react-refresh', diff --git a/create-snowpack-app/app-template-react/snowpack.config.js b/create-snowpack-app/app-template-react/snowpack.config.js index 426315b638..d373e4b102 100644 --- a/create-snowpack-app/app-template-react/snowpack.config.js +++ b/create-snowpack-app/app-template-react/snowpack.config.js @@ -1,8 +1,8 @@ /** @type {import("snowpack").SnowpackUserConfig } */ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: ['@snowpack/plugin-react-refresh', '@snowpack/plugin-dotenv'], install: [ diff --git a/create-snowpack-app/app-template-svelte-typescript/snowpack.config.js b/create-snowpack-app/app-template-svelte-typescript/snowpack.config.js index 8c27b7053c..a1f7cfe546 100644 --- a/create-snowpack-app/app-template-svelte-typescript/snowpack.config.js +++ b/create-snowpack-app/app-template-svelte-typescript/snowpack.config.js @@ -1,8 +1,8 @@ /** @type {import("snowpack").SnowpackUserConfig } */ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: [ '@snowpack/plugin-svelte', diff --git a/create-snowpack-app/app-template-svelte/snowpack.config.js b/create-snowpack-app/app-template-svelte/snowpack.config.js index 41a243768d..71802223c0 100644 --- a/create-snowpack-app/app-template-svelte/snowpack.config.js +++ b/create-snowpack-app/app-template-svelte/snowpack.config.js @@ -1,8 +1,8 @@ /** @type {import("snowpack").SnowpackUserConfig } */ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: [ '@snowpack/plugin-svelte', diff --git a/create-snowpack-app/app-template-vue-typescript/snowpack.config.js b/create-snowpack-app/app-template-vue-typescript/snowpack.config.js index 8659af095c..100e7a8033 100644 --- a/create-snowpack-app/app-template-vue-typescript/snowpack.config.js +++ b/create-snowpack-app/app-template-vue-typescript/snowpack.config.js @@ -1,8 +1,8 @@ /** @type {import("snowpack").SnowpackUserConfig } */ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: [ '@snowpack/plugin-vue', diff --git a/create-snowpack-app/app-template-vue/snowpack.config.js b/create-snowpack-app/app-template-vue/snowpack.config.js index 2e8d80754c..2df8c4d965 100644 --- a/create-snowpack-app/app-template-vue/snowpack.config.js +++ b/create-snowpack-app/app-template-vue/snowpack.config.js @@ -1,8 +1,8 @@ /** @type {import("snowpack").SnowpackUserConfig } */ module.exports = { mount: { - public: '/', - src: '/_dist_', + public: {url: '/', static: true}, + src: {url: '/dist'}, }, plugins: ['@snowpack/plugin-vue', '@snowpack/plugin-dotenv'], install: [ diff --git a/test/create-snowpack-app/__snapshots__/create-snowpack-app.test.js.snap b/test/create-snowpack-app/__snapshots__/create-snowpack-app.test.js.snap index a857cc3ed4..e1ddef47b0 100644 --- a/test/create-snowpack-app/__snapshots__/create-snowpack-app.test.js.snap +++ b/test/create-snowpack-app/__snapshots__/create-snowpack-app.test.js.snap @@ -2,18 +2,6 @@ exports[`create-snowpack-app app-template-11ty > build: __snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; -exports[`create-snowpack-app app-template-11ty > build: _dist_/index.js 1`] = ` -"/** - * This file is just a silly example to show everything working in the browser. - * When you're ready to start on your site, clear the file. Happy hacking! - **/ -import confetti from '../web_modules/canvas-XXXXXXXX.js'; -confetti.create(document.getElementById('canvas'), { - resize: true, - useWorker: true, -})({ particleCount: 200, spread: 200 });" -`; - exports[`create-snowpack-app app-template-11ty > build: about/index.html 1`] = ` " @@ -48,8 +36,8 @@ exports[`create-snowpack-app app-template-11ty > build: about/index.html 1`] = ` exports[`create-snowpack-app app-template-11ty > build: allFiles 1`] = ` Array [ "__snowpack__/env.js", - "_dist_/index.js", "about/index.html", + "dist/index.js", "index.html", "static/favicon.png", "static/index.css", @@ -59,6 +47,18 @@ Array [ ] `; +exports[`create-snowpack-app app-template-11ty > build: dist/index.js 1`] = ` +"/** + * This file is just a silly example to show everything working in the browser. + * When you're ready to start on your site, clear the file. Happy hacking! + **/ +import confetti from '../web_modules/canvas-XXXXXXXX.js'; +confetti.create(document.getElementById('canvas'), { + resize: true, + useWorker: true, +})({ particleCount: 200, spread: 200 });" +`; + exports[`create-snowpack-app app-template-11ty > build: index.html 1`] = ` " @@ -620,22 +620,10 @@ exports[`create-snowpack-app app-template-11ty > build: web_modules/import-map.j exports[`create-snowpack-app app-template-blank > build: __snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; -exports[`create-snowpack-app app-template-blank > build: _dist_/index.js 1`] = ` -"/** - * This file is just a silly example to show everything working in the browser. - * When you're ready to start on your site, clear the file. Happy hacking! - **/ -import confetti from '../web_modules/canvas-XXXXXXXX.js'; -confetti.create(document.getElementById('canvas'), { - resize: true, - useWorker: true, -})({ particleCount: 200, spread: 200 });" -`; - exports[`create-snowpack-app app-template-blank > build: allFiles 1`] = ` Array [ "__snowpack__/env.js", - "_dist_/index.js", + "dist/index.js", "favicon.ico", "index.css", "index.html", @@ -646,6 +634,18 @@ Array [ ] `; +exports[`create-snowpack-app app-template-blank > build: dist/index.js 1`] = ` +"/** + * This file is just a silly example to show everything working in the browser. + * When you're ready to start on your site, clear the file. Happy hacking! + **/ +import confetti from '../web_modules/canvas-XXXXXXXX.js'; +confetti.create(document.getElementById('canvas'), { + resize: true, + useWorker: true, +})({ particleCount: 200, spread: 200 });" +`; + exports[`create-snowpack-app app-template-blank > build: index.css 1`] = ` "#img { display: block; @@ -1193,18 +1193,10 @@ exports[`create-snowpack-app app-template-blank > build: web_modules/import-map. exports[`create-snowpack-app app-template-blank-typescript > build: __snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; -exports[`create-snowpack-app app-template-blank-typescript > build: _dist_/index.js 1`] = ` -"import confetti from \\"../web_modules/canvas-XXXXXXXX.js\\"; -confetti.create(document.getElementById(\\"canvas\\"), { - resize: true, - useWorker: true -})({particleCount: 200, spread: 200});" -`; - exports[`create-snowpack-app app-template-blank-typescript > build: allFiles 1`] = ` Array [ "__snowpack__/env.js", - "_dist_/index.js", + "dist/index.js", "favicon.ico", "index.css", "index.html", @@ -1215,6 +1207,14 @@ Array [ ] `; +exports[`create-snowpack-app app-template-blank-typescript > build: dist/index.js 1`] = ` +"import confetti from \\"../web_modules/canvas-XXXXXXXX.js\\"; +confetti.create(document.getElementById(\\"canvas\\"), { + resize: true, + useWorker: true +})({particleCount: 200, spread: 200});" +`; + exports[`create-snowpack-app app-template-blank-typescript > build: index.css 1`] = ` "#img { display: block; @@ -1762,7 +1762,21 @@ exports[`create-snowpack-app app-template-blank-typescript > build: web_modules/ exports[`create-snowpack-app app-template-lit-element > build: __snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; -exports[`create-snowpack-app app-template-lit-element > build: _dist_/app-root.js 1`] = ` +exports[`create-snowpack-app app-template-lit-element > build: allFiles 1`] = ` +Array [ + "__snowpack__/env.js", + "dist/app-root.js", + "dist/index.js", + "favicon.ico", + "index.css", + "index.html", + "robots.txt", + "web_modules/import-map.json", + "web_modules/lit-element.js", +] +`; + +exports[`create-snowpack-app app-template-lit-element > build: dist/app-root.js 1`] = ` "function _decorate(decorators, factory, superClass, mixins) { var api = _getDecoratorsApi(); if (mixins) { for (var i = 0; i < mixins.length; i++) { api = mixins[i](api); } } var r = factory(function initialize(O) { api.initializeInstanceElements(O, decorated.elements); }, superClass); var decorated = api.decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators); api.initializeClassElements(r.F, decorated.elements); return api.runClassFinishers(r.F, decorated.finishers); } function _getDecoratorsApi() { _getDecoratorsApi = function () { return api; }; var api = { elementsDefinitionOrder: [[\\"method\\"], [\\"field\\"]], initializeInstanceElements: function (O, elements) { [\\"method\\", \\"field\\"].forEach(function (kind) { elements.forEach(function (element) { if (element.kind === kind && element.placement === \\"own\\") { this.defineClassElement(O, element); } }, this); }, this); }, initializeClassElements: function (F, elements) { var proto = F.prototype; [\\"method\\", \\"field\\"].forEach(function (kind) { elements.forEach(function (element) { var placement = element.placement; if (element.kind === kind && (placement === \\"static\\" || placement === \\"prototype\\")) { var receiver = placement === \\"static\\" ? F : proto; this.defineClassElement(receiver, element); } }, this); }, this); }, defineClassElement: function (receiver, element) { var descriptor = element.descriptor; if (element.kind === \\"field\\") { var initializer = element.initializer; descriptor = { enumerable: descriptor.enumerable, writable: descriptor.writable, configurable: descriptor.configurable, value: initializer === void 0 ? void 0 : initializer.call(receiver) }; } Object.defineProperty(receiver, element.key, descriptor); }, decorateClass: function (elements, decorators) { var newElements = []; var finishers = []; var placements = { static: [], prototype: [], own: [] }; elements.forEach(function (element) { this.addElementPlacement(element, placements); }, this); elements.forEach(function (element) { if (!_hasDecorators(element)) return newElements.push(element); var elementFinishersExtras = this.decorateElement(element, placements); newElements.push(elementFinishersExtras.element); newElements.push.apply(newElements, elementFinishersExtras.extras); finishers.push.apply(finishers, elementFinishersExtras.finishers); }, this); if (!decorators) { return { elements: newElements, finishers: finishers }; } var result = this.decorateConstructor(newElements, decorators); finishers.push.apply(finishers, result.finishers); result.finishers = finishers; return result; }, addElementPlacement: function (element, placements, silent) { var keys = placements[element.placement]; if (!silent && keys.indexOf(element.key) !== -1) { throw new TypeError(\\"Duplicated element (\\" + element.key + \\")\\"); } keys.push(element.key); }, decorateElement: function (element, placements) { var extras = []; var finishers = []; for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) { var keys = placements[element.placement]; keys.splice(keys.indexOf(element.key), 1); var elementObject = this.fromElementDescriptor(element); var elementFinisherExtras = this.toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject); element = elementFinisherExtras.element; this.addElementPlacement(element, placements); if (elementFinisherExtras.finisher) { finishers.push(elementFinisherExtras.finisher); } var newExtras = elementFinisherExtras.extras; if (newExtras) { for (var j = 0; j < newExtras.length; j++) { this.addElementPlacement(newExtras[j], placements); } extras.push.apply(extras, newExtras); } } return { element: element, finishers: finishers, extras: extras }; }, decorateConstructor: function (elements, decorators) { var finishers = []; for (var i = decorators.length - 1; i >= 0; i--) { var obj = this.fromClassDescriptor(elements); var elementsAndFinisher = this.toClassDescriptor((0, decorators[i])(obj) || obj); if (elementsAndFinisher.finisher !== undefined) { finishers.push(elementsAndFinisher.finisher); } if (elementsAndFinisher.elements !== undefined) { elements = elementsAndFinisher.elements; for (var j = 0; j < elements.length - 1; j++) { for (var k = j + 1; k < elements.length; k++) { if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) { throw new TypeError(\\"Duplicated element (\\" + elements[j].key + \\")\\"); } } } } } return { elements: elements, finishers: finishers }; }, fromElementDescriptor: function (element) { var obj = { kind: element.kind, key: element.key, placement: element.placement, descriptor: element.descriptor }; var desc = { value: \\"Descriptor\\", configurable: true }; Object.defineProperty(obj, Symbol.toStringTag, desc); if (element.kind === \\"field\\") obj.initializer = element.initializer; return obj; }, toElementDescriptors: function (elementObjects) { if (elementObjects === undefined) return; return _toArray(elementObjects).map(function (elementObject) { var element = this.toElementDescriptor(elementObject); this.disallowProperty(elementObject, \\"finisher\\", \\"An element descriptor\\"); this.disallowProperty(elementObject, \\"extras\\", \\"An element descriptor\\"); return element; }, this); }, toElementDescriptor: function (elementObject) { var kind = String(elementObject.kind); if (kind !== \\"method\\" && kind !== \\"field\\") { throw new TypeError('An element descriptor\\\\'s .kind property must be either \\"method\\" or' + ' \\"field\\", but a decorator created an element descriptor with' + ' .kind \\"' + kind + '\\"'); } var key = _toPropertyKey(elementObject.key); var placement = String(elementObject.placement); if (placement !== \\"static\\" && placement !== \\"prototype\\" && placement !== \\"own\\") { throw new TypeError('An element descriptor\\\\'s .placement property must be one of \\"static\\",' + ' \\"prototype\\" or \\"own\\", but a decorator created an element descriptor' + ' with .placement \\"' + placement + '\\"'); } var descriptor = elementObject.descriptor; this.disallowProperty(elementObject, \\"elements\\", \\"An element descriptor\\"); var element = { kind: kind, key: key, placement: placement, descriptor: Object.assign({}, descriptor) }; if (kind !== \\"field\\") { this.disallowProperty(elementObject, \\"initializer\\", \\"A method descriptor\\"); } else { this.disallowProperty(descriptor, \\"get\\", \\"The property descriptor of a field descriptor\\"); this.disallowProperty(descriptor, \\"set\\", \\"The property descriptor of a field descriptor\\"); this.disallowProperty(descriptor, \\"value\\", \\"The property descriptor of a field descriptor\\"); element.initializer = elementObject.initializer; } return element; }, toElementFinisherExtras: function (elementObject) { var element = this.toElementDescriptor(elementObject); var finisher = _optionalCallableProperty(elementObject, \\"finisher\\"); var extras = this.toElementDescriptors(elementObject.extras); return { element: element, finisher: finisher, extras: extras }; }, fromClassDescriptor: function (elements) { var obj = { kind: \\"class\\", elements: elements.map(this.fromElementDescriptor, this) }; var desc = { value: \\"Descriptor\\", configurable: true }; Object.defineProperty(obj, Symbol.toStringTag, desc); return obj; }, toClassDescriptor: function (obj) { var kind = String(obj.kind); if (kind !== \\"class\\") { throw new TypeError('A class descriptor\\\\'s .kind property must be \\"class\\", but a decorator' + ' created a class descriptor with .kind \\"' + kind + '\\"'); } this.disallowProperty(obj, \\"key\\", \\"A class descriptor\\"); this.disallowProperty(obj, \\"placement\\", \\"A class descriptor\\"); this.disallowProperty(obj, \\"descriptor\\", \\"A class descriptor\\"); this.disallowProperty(obj, \\"initializer\\", \\"A class descriptor\\"); this.disallowProperty(obj, \\"extras\\", \\"A class descriptor\\"); var finisher = _optionalCallableProperty(obj, \\"finisher\\"); var elements = this.toElementDescriptors(obj.elements); return { elements: elements, finisher: finisher }; }, runClassFinishers: function (constructor, finishers) { for (var i = 0; i < finishers.length; i++) { var newConstructor = (0, finishers[i])(constructor); if (newConstructor !== undefined) { if (typeof newConstructor !== \\"function\\") { throw new TypeError(\\"Finishers must return a constructor.\\"); } constructor = newConstructor; } } return constructor; }, disallowProperty: function (obj, name, objectType) { if (obj[name] !== undefined) { throw new TypeError(objectType + \\" can't have a .\\" + name + \\" property.\\"); } } }; return api; } function _createElementDescriptor(def) { var key = _toPropertyKey(def.key); var descriptor; if (def.kind === \\"method\\") { descriptor = { value: def.value, writable: true, configurable: true, enumerable: false }; } else if (def.kind === \\"get\\") { descriptor = { get: def.value, configurable: true, enumerable: false }; } else if (def.kind === \\"set\\") { descriptor = { set: def.value, configurable: true, enumerable: false }; } else if (def.kind === \\"field\\") { descriptor = { configurable: true, writable: true, enumerable: true }; } var element = { kind: def.kind === \\"field\\" ? \\"field\\" : \\"method\\", key: key, placement: def.static ? \\"static\\" : def.kind === \\"field\\" ? \\"own\\" : \\"prototype\\", descriptor: descriptor }; if (def.decorators) element.decorators = def.decorators; if (def.kind === \\"field\\") element.initializer = def.value; return element; } @@ -1844,21 +1858,7 @@ export let AppRoot = _decorate([customElement('app-root')], function (_initializ }, LitElement);" `; -exports[`create-snowpack-app app-template-lit-element > build: _dist_/index.js 1`] = `"import './app-root.js';"`; - -exports[`create-snowpack-app app-template-lit-element > build: allFiles 1`] = ` -Array [ - "__snowpack__/env.js", - "_dist_/app-root.js", - "_dist_/index.js", - "favicon.ico", - "index.css", - "index.html", - "robots.txt", - "web_modules/import-map.json", - "web_modules/lit-element.js", -] -`; +exports[`create-snowpack-app app-template-lit-element > build: dist/index.js 1`] = `"import './app-root.js';"`; exports[`create-snowpack-app app-template-lit-element > build: index.css 1`] = ` "body { @@ -4540,7 +4540,21 @@ export { LitElement, css, customElement, html, property };" exports[`create-snowpack-app app-template-lit-element-typescript > build: __snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; -exports[`create-snowpack-app app-template-lit-element-typescript > build: _dist_/app-root.js 1`] = ` +exports[`create-snowpack-app app-template-lit-element-typescript > build: allFiles 1`] = ` +Array [ + "__snowpack__/env.js", + "dist/app-root.js", + "dist/index.js", + "favicon.ico", + "index.css", + "index.html", + "robots.txt", + "web_modules/import-map.json", + "web_modules/lit-element.js", +] +`; + +exports[`create-snowpack-app app-template-lit-element-typescript > build: dist/app-root.js 1`] = ` "function _decorate(decorators, factory, superClass, mixins) { var api = _getDecoratorsApi(); if (mixins) { for (var i = 0; i < mixins.length; i++) { api = mixins[i](api); } } var r = factory(function initialize(O) { api.initializeInstanceElements(O, decorated.elements); }, superClass); var decorated = api.decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators); api.initializeClassElements(r.F, decorated.elements); return api.runClassFinishers(r.F, decorated.finishers); } function _getDecoratorsApi() { _getDecoratorsApi = function () { return api; }; var api = { elementsDefinitionOrder: [[\\"method\\"], [\\"field\\"]], initializeInstanceElements: function (O, elements) { [\\"method\\", \\"field\\"].forEach(function (kind) { elements.forEach(function (element) { if (element.kind === kind && element.placement === \\"own\\") { this.defineClassElement(O, element); } }, this); }, this); }, initializeClassElements: function (F, elements) { var proto = F.prototype; [\\"method\\", \\"field\\"].forEach(function (kind) { elements.forEach(function (element) { var placement = element.placement; if (element.kind === kind && (placement === \\"static\\" || placement === \\"prototype\\")) { var receiver = placement === \\"static\\" ? F : proto; this.defineClassElement(receiver, element); } }, this); }, this); }, defineClassElement: function (receiver, element) { var descriptor = element.descriptor; if (element.kind === \\"field\\") { var initializer = element.initializer; descriptor = { enumerable: descriptor.enumerable, writable: descriptor.writable, configurable: descriptor.configurable, value: initializer === void 0 ? void 0 : initializer.call(receiver) }; } Object.defineProperty(receiver, element.key, descriptor); }, decorateClass: function (elements, decorators) { var newElements = []; var finishers = []; var placements = { static: [], prototype: [], own: [] }; elements.forEach(function (element) { this.addElementPlacement(element, placements); }, this); elements.forEach(function (element) { if (!_hasDecorators(element)) return newElements.push(element); var elementFinishersExtras = this.decorateElement(element, placements); newElements.push(elementFinishersExtras.element); newElements.push.apply(newElements, elementFinishersExtras.extras); finishers.push.apply(finishers, elementFinishersExtras.finishers); }, this); if (!decorators) { return { elements: newElements, finishers: finishers }; } var result = this.decorateConstructor(newElements, decorators); finishers.push.apply(finishers, result.finishers); result.finishers = finishers; return result; }, addElementPlacement: function (element, placements, silent) { var keys = placements[element.placement]; if (!silent && keys.indexOf(element.key) !== -1) { throw new TypeError(\\"Duplicated element (\\" + element.key + \\")\\"); } keys.push(element.key); }, decorateElement: function (element, placements) { var extras = []; var finishers = []; for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) { var keys = placements[element.placement]; keys.splice(keys.indexOf(element.key), 1); var elementObject = this.fromElementDescriptor(element); var elementFinisherExtras = this.toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject); element = elementFinisherExtras.element; this.addElementPlacement(element, placements); if (elementFinisherExtras.finisher) { finishers.push(elementFinisherExtras.finisher); } var newExtras = elementFinisherExtras.extras; if (newExtras) { for (var j = 0; j < newExtras.length; j++) { this.addElementPlacement(newExtras[j], placements); } extras.push.apply(extras, newExtras); } } return { element: element, finishers: finishers, extras: extras }; }, decorateConstructor: function (elements, decorators) { var finishers = []; for (var i = decorators.length - 1; i >= 0; i--) { var obj = this.fromClassDescriptor(elements); var elementsAndFinisher = this.toClassDescriptor((0, decorators[i])(obj) || obj); if (elementsAndFinisher.finisher !== undefined) { finishers.push(elementsAndFinisher.finisher); } if (elementsAndFinisher.elements !== undefined) { elements = elementsAndFinisher.elements; for (var j = 0; j < elements.length - 1; j++) { for (var k = j + 1; k < elements.length; k++) { if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) { throw new TypeError(\\"Duplicated element (\\" + elements[j].key + \\")\\"); } } } } } return { elements: elements, finishers: finishers }; }, fromElementDescriptor: function (element) { var obj = { kind: element.kind, key: element.key, placement: element.placement, descriptor: element.descriptor }; var desc = { value: \\"Descriptor\\", configurable: true }; Object.defineProperty(obj, Symbol.toStringTag, desc); if (element.kind === \\"field\\") obj.initializer = element.initializer; return obj; }, toElementDescriptors: function (elementObjects) { if (elementObjects === undefined) return; return _toArray(elementObjects).map(function (elementObject) { var element = this.toElementDescriptor(elementObject); this.disallowProperty(elementObject, \\"finisher\\", \\"An element descriptor\\"); this.disallowProperty(elementObject, \\"extras\\", \\"An element descriptor\\"); return element; }, this); }, toElementDescriptor: function (elementObject) { var kind = String(elementObject.kind); if (kind !== \\"method\\" && kind !== \\"field\\") { throw new TypeError('An element descriptor\\\\'s .kind property must be either \\"method\\" or' + ' \\"field\\", but a decorator created an element descriptor with' + ' .kind \\"' + kind + '\\"'); } var key = _toPropertyKey(elementObject.key); var placement = String(elementObject.placement); if (placement !== \\"static\\" && placement !== \\"prototype\\" && placement !== \\"own\\") { throw new TypeError('An element descriptor\\\\'s .placement property must be one of \\"static\\",' + ' \\"prototype\\" or \\"own\\", but a decorator created an element descriptor' + ' with .placement \\"' + placement + '\\"'); } var descriptor = elementObject.descriptor; this.disallowProperty(elementObject, \\"elements\\", \\"An element descriptor\\"); var element = { kind: kind, key: key, placement: placement, descriptor: Object.assign({}, descriptor) }; if (kind !== \\"field\\") { this.disallowProperty(elementObject, \\"initializer\\", \\"A method descriptor\\"); } else { this.disallowProperty(descriptor, \\"get\\", \\"The property descriptor of a field descriptor\\"); this.disallowProperty(descriptor, \\"set\\", \\"The property descriptor of a field descriptor\\"); this.disallowProperty(descriptor, \\"value\\", \\"The property descriptor of a field descriptor\\"); element.initializer = elementObject.initializer; } return element; }, toElementFinisherExtras: function (elementObject) { var element = this.toElementDescriptor(elementObject); var finisher = _optionalCallableProperty(elementObject, \\"finisher\\"); var extras = this.toElementDescriptors(elementObject.extras); return { element: element, finisher: finisher, extras: extras }; }, fromClassDescriptor: function (elements) { var obj = { kind: \\"class\\", elements: elements.map(this.fromElementDescriptor, this) }; var desc = { value: \\"Descriptor\\", configurable: true }; Object.defineProperty(obj, Symbol.toStringTag, desc); return obj; }, toClassDescriptor: function (obj) { var kind = String(obj.kind); if (kind !== \\"class\\") { throw new TypeError('A class descriptor\\\\'s .kind property must be \\"class\\", but a decorator' + ' created a class descriptor with .kind \\"' + kind + '\\"'); } this.disallowProperty(obj, \\"key\\", \\"A class descriptor\\"); this.disallowProperty(obj, \\"placement\\", \\"A class descriptor\\"); this.disallowProperty(obj, \\"descriptor\\", \\"A class descriptor\\"); this.disallowProperty(obj, \\"initializer\\", \\"A class descriptor\\"); this.disallowProperty(obj, \\"extras\\", \\"A class descriptor\\"); var finisher = _optionalCallableProperty(obj, \\"finisher\\"); var elements = this.toElementDescriptors(obj.elements); return { elements: elements, finisher: finisher }; }, runClassFinishers: function (constructor, finishers) { for (var i = 0; i < finishers.length; i++) { var newConstructor = (0, finishers[i])(constructor); if (newConstructor !== undefined) { if (typeof newConstructor !== \\"function\\") { throw new TypeError(\\"Finishers must return a constructor.\\"); } constructor = newConstructor; } } return constructor; }, disallowProperty: function (obj, name, objectType) { if (obj[name] !== undefined) { throw new TypeError(objectType + \\" can't have a .\\" + name + \\" property.\\"); } } }; return api; } function _createElementDescriptor(def) { var key = _toPropertyKey(def.key); var descriptor; if (def.kind === \\"method\\") { descriptor = { value: def.value, writable: true, configurable: true, enumerable: false }; } else if (def.kind === \\"get\\") { descriptor = { get: def.value, configurable: true, enumerable: false }; } else if (def.kind === \\"set\\") { descriptor = { set: def.value, configurable: true, enumerable: false }; } else if (def.kind === \\"field\\") { descriptor = { configurable: true, writable: true, enumerable: true }; } var element = { kind: def.kind === \\"field\\" ? \\"field\\" : \\"method\\", key: key, placement: def.static ? \\"static\\" : def.kind === \\"field\\" ? \\"own\\" : \\"prototype\\", descriptor: descriptor }; if (def.decorators) element.decorators = def.decorators; if (def.kind === \\"field\\") element.initializer = def.value; return element; } @@ -4622,21 +4636,7 @@ export let AppRoot = _decorate([customElement('app-root')], function (_initializ }, LitElement);" `; -exports[`create-snowpack-app app-template-lit-element-typescript > build: _dist_/index.js 1`] = `"import './app-root.js';"`; - -exports[`create-snowpack-app app-template-lit-element-typescript > build: allFiles 1`] = ` -Array [ - "__snowpack__/env.js", - "_dist_/app-root.js", - "_dist_/index.js", - "favicon.ico", - "index.css", - "index.html", - "robots.txt", - "web_modules/import-map.json", - "web_modules/lit-element.js", -] -`; +exports[`create-snowpack-app app-template-lit-element-typescript > build: dist/index.js 1`] = `"import './app-root.js';"`; exports[`create-snowpack-app app-template-lit-element-typescript > build: index.css 1`] = ` "body { @@ -7410,7 +7410,28 @@ module.exports = { exports[`create-snowpack-app app-template-preact > build: __snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; -exports[`create-snowpack-app app-template-preact > build: _dist_/App.css 1`] = ` +exports[`create-snowpack-app app-template-preact > build: allFiles 1`] = ` +Array [ + "__snowpack__/env.js", + "dist/App.css", + "dist/App.css.proxy.js", + "dist/App.js", + "dist/index.css", + "dist/index.css.proxy.js", + "dist/index.js", + "dist/logo.png", + "dist/logo.png.proxy.js", + "favicon.ico", + "index.html", + "robots.txt", + "web_modules/import-map.json", + "web_modules/preact.js", + "web_modules/preact/devtools.js", + "web_modules/preact/hooks.js", +] +`; + +exports[`create-snowpack-app app-template-preact > build: dist/App.css 1`] = ` ".App { text-align: center; } @@ -7451,7 +7472,7 @@ exports[`create-snowpack-app app-template-preact > build: _dist_/App.css 1`] = ` }" `; -exports[`create-snowpack-app app-template-preact > build: _dist_/App.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-preact > build: dist/App.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\".App { text-align: center;}.App code { background: #FFF3; padding: 4px 8px; border-radius: 4px;}.App p { margin: 0.4rem;}.App-header { background-color: #282c34; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: calc(10px + 2vmin); color: white;}.App-link { color: #61dafb;}.App-logo { height: 36vmin; pointer-events: none; margin-bottom: 3rem; animation: App-logo-spin infinite 1.6s ease-in-out alternate;}@keyframes App-logo-spin { from { transform: scale(1); } to { transform: scale(1.06); }}\\"; @@ -7463,7 +7484,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-preact > build: _dist_/App.js 1`] = ` +exports[`create-snowpack-app app-template-preact > build: dist/App.js 1`] = ` "import {h} from \\"../web_modules/preact.js\\"; import {useState, useEffect} from \\"../web_modules/preact/hooks.js\\"; import logo2 from \\"./logo.png.proxy.js\\"; @@ -7492,7 +7513,7 @@ function App2() { export default App2;" `; -exports[`create-snowpack-app app-template-preact > build: _dist_/index.css 1`] = ` +exports[`create-snowpack-app app-template-preact > build: dist/index.css 1`] = ` "body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', @@ -7507,7 +7528,7 @@ code { }" `; -exports[`create-snowpack-app app-template-preact > build: _dist_/index.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-preact > build: dist/index.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\"body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;}\\"; @@ -7519,7 +7540,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-preact > build: _dist_/index.js 1`] = ` +exports[`create-snowpack-app app-template-preact > build: dist/index.js 1`] = ` "import {h, render} from \\"../web_modules/preact.js\\"; import \\"../web_modules/preact/devtools.js\\"; import App2 from \\"./App.js\\"; @@ -7527,28 +7548,7 @@ import \\"./index.css.proxy.js\\"; render(/* @__PURE__ */ h(App2, null), document.getElementById(\\"root\\"));" `; -exports[`create-snowpack-app app-template-preact > build: _dist_/logo.png.proxy.js 1`] = `"export default \\"/_dist_/logo.png\\";"`; - -exports[`create-snowpack-app app-template-preact > build: allFiles 1`] = ` -Array [ - "__snowpack__/env.js", - "_dist_/App.css", - "_dist_/App.css.proxy.js", - "_dist_/App.js", - "_dist_/index.css", - "_dist_/index.css.proxy.js", - "_dist_/index.js", - "_dist_/logo.png", - "_dist_/logo.png.proxy.js", - "favicon.ico", - "index.html", - "robots.txt", - "web_modules/import-map.json", - "web_modules/preact.js", - "web_modules/preact/devtools.js", - "web_modules/preact/hooks.js", -] -`; +exports[`create-snowpack-app app-template-preact > build: dist/logo.png.proxy.js 1`] = `"export default \\"/dist/logo.png\\";"`; exports[`create-snowpack-app app-template-preact > build: index.html 1`] = ` " @@ -7601,7 +7601,28 @@ export { y as useEffect, l as useState };" exports[`create-snowpack-app app-template-preact-typescript > build: __snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; -exports[`create-snowpack-app app-template-preact-typescript > build: _dist_/App.css 1`] = ` +exports[`create-snowpack-app app-template-preact-typescript > build: allFiles 1`] = ` +Array [ + "__snowpack__/env.js", + "dist/App.css", + "dist/App.css.proxy.js", + "dist/App.js", + "dist/index.css", + "dist/index.css.proxy.js", + "dist/index.js", + "dist/logo.png", + "dist/logo.png.proxy.js", + "favicon.ico", + "index.html", + "robots.txt", + "web_modules/import-map.json", + "web_modules/preact.js", + "web_modules/preact/devtools.js", + "web_modules/preact/hooks.js", +] +`; + +exports[`create-snowpack-app app-template-preact-typescript > build: dist/App.css 1`] = ` ".App { text-align: center; } @@ -7642,7 +7663,7 @@ exports[`create-snowpack-app app-template-preact-typescript > build: _dist_/App. }" `; -exports[`create-snowpack-app app-template-preact-typescript > build: _dist_/App.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-preact-typescript > build: dist/App.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\".App { text-align: center;}.App code { background: #FFF3; padding: 4px 8px; border-radius: 4px;}.App p { margin: 0.4rem;}.App-header { background-color: #282c34; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: calc(10px + 2vmin); color: white;}.App-link { color: #61dafb;}.App-logo { height: 36vmin; pointer-events: none; margin-bottom: 3rem; animation: App-logo-spin infinite 1.6s ease-in-out alternate;}@keyframes App-logo-spin { from { transform: scale(1); } to { transform: scale(1.06); }}\\"; @@ -7654,7 +7675,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-preact-typescript > build: _dist_/App.js 1`] = ` +exports[`create-snowpack-app app-template-preact-typescript > build: dist/App.js 1`] = ` "import {h} from \\"../web_modules/preact.js\\"; import {useState, useEffect} from \\"../web_modules/preact/hooks.js\\"; import logo2 from \\"./logo.png.proxy.js\\"; @@ -7683,7 +7704,7 @@ function App2() { export default App2;" `; -exports[`create-snowpack-app app-template-preact-typescript > build: _dist_/index.css 1`] = ` +exports[`create-snowpack-app app-template-preact-typescript > build: dist/index.css 1`] = ` "body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', @@ -7698,7 +7719,7 @@ code { }" `; -exports[`create-snowpack-app app-template-preact-typescript > build: _dist_/index.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-preact-typescript > build: dist/index.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\"body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;}\\"; @@ -7710,7 +7731,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-preact-typescript > build: _dist_/index.js 1`] = ` +exports[`create-snowpack-app app-template-preact-typescript > build: dist/index.js 1`] = ` "import {h, render} from \\"../web_modules/preact.js\\"; import \\"../web_modules/preact/devtools.js\\"; import App2 from \\"./App.js\\"; @@ -7721,28 +7742,7 @@ if (root) { }" `; -exports[`create-snowpack-app app-template-preact-typescript > build: _dist_/logo.png.proxy.js 1`] = `"export default \\"/_dist_/logo.png\\";"`; - -exports[`create-snowpack-app app-template-preact-typescript > build: allFiles 1`] = ` -Array [ - "__snowpack__/env.js", - "_dist_/App.css", - "_dist_/App.css.proxy.js", - "_dist_/App.js", - "_dist_/index.css", - "_dist_/index.css.proxy.js", - "_dist_/index.js", - "_dist_/logo.png", - "_dist_/logo.png.proxy.js", - "favicon.ico", - "index.html", - "robots.txt", - "web_modules/import-map.json", - "web_modules/preact.js", - "web_modules/preact/devtools.js", - "web_modules/preact/hooks.js", -] -`; +exports[`create-snowpack-app app-template-preact-typescript > build: dist/logo.png.proxy.js 1`] = `"export default \\"/dist/logo.png\\";"`; exports[`create-snowpack-app app-template-preact-typescript > build: index.html 1`] = ` " @@ -7795,7 +7795,27 @@ export { y as useEffect, l as useState };" exports[`create-snowpack-app app-template-react > build: __snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; -exports[`create-snowpack-app app-template-react > build: _dist_/App.css 1`] = ` +exports[`create-snowpack-app app-template-react > build: allFiles 1`] = ` +Array [ + "__snowpack__/env.js", + "dist/App.css", + "dist/App.css.proxy.js", + "dist/App.js", + "dist/index.css", + "dist/index.css.proxy.js", + "dist/index.js", + "dist/logo.svg", + "dist/logo.svg.proxy.js", + "favicon.ico", + "index.html", + "robots.txt", + "web_modules/import-map.json", + "web_modules/react-dom.js", + "web_modules/react.js", +] +`; + +exports[`create-snowpack-app app-template-react > build: dist/App.css 1`] = ` ".App { text-align: center; } @@ -7839,7 +7859,7 @@ exports[`create-snowpack-app app-template-react > build: _dist_/App.css 1`] = ` }" `; -exports[`create-snowpack-app app-template-react > build: _dist_/App.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-react > build: dist/App.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\".App { text-align: center;}.App code { background: #FFF3; padding: 4px 8px; border-radius: 4px;}.App p { margin: 0.4rem;}.App-logo { height: 40vmin; pointer-events: none;}@media (prefers-reduced-motion: no-preference) { .App-logo { animation: App-logo-spin infinite 20s linear; }}.App-header { background-color: #282c34; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: calc(10px + 2vmin); color: white;}.App-link { color: #61dafb;}@keyframes App-logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); }}\\"; @@ -7851,7 +7871,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-react > build: _dist_/App.js 1`] = ` +exports[`create-snowpack-app app-template-react > build: dist/App.js 1`] = ` "import React, {useState, useEffect} from \\"../web_modules/react.js\\"; import logo2 from \\"./logo.svg.proxy.js\\"; import \\"./App.css.proxy.js\\"; @@ -7879,7 +7899,7 @@ function App2() { export default App2;" `; -exports[`create-snowpack-app app-template-react > build: _dist_/index.css 1`] = ` +exports[`create-snowpack-app app-template-react > build: dist/index.css 1`] = ` "body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', @@ -7894,7 +7914,7 @@ code { }" `; -exports[`create-snowpack-app app-template-react > build: _dist_/index.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-react > build: dist/index.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\"body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;}\\"; @@ -7906,7 +7926,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-react > build: _dist_/index.js 1`] = ` +exports[`create-snowpack-app app-template-react > build: dist/index.js 1`] = ` "import __SNOWPACK_ENV__ from '../__snowpack__/env.js'; import.meta.env = __SNOWPACK_ENV__; import React from \\"../web_modules/react.js\\"; @@ -7919,27 +7939,7 @@ if (import.meta.hot) { }" `; -exports[`create-snowpack-app app-template-react > build: _dist_/logo.svg.proxy.js 1`] = `"export default \\"/_dist_/logo.svg\\";"`; - -exports[`create-snowpack-app app-template-react > build: allFiles 1`] = ` -Array [ - "__snowpack__/env.js", - "_dist_/App.css", - "_dist_/App.css.proxy.js", - "_dist_/App.js", - "_dist_/index.css", - "_dist_/index.css.proxy.js", - "_dist_/index.js", - "_dist_/logo.svg", - "_dist_/logo.svg.proxy.js", - "favicon.ico", - "index.html", - "robots.txt", - "web_modules/import-map.json", - "web_modules/react-dom.js", - "web_modules/react.js", -] -`; +exports[`create-snowpack-app app-template-react > build: dist/logo.svg.proxy.js 1`] = `"export default \\"/dist/logo.svg\\";"`; exports[`create-snowpack-app app-template-react > build: index.html 1`] = ` " @@ -8333,7 +8333,27 @@ export default reactDom;" exports[`create-snowpack-app app-template-react-typescript > build: __snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; -exports[`create-snowpack-app app-template-react-typescript > build: _dist_/App.css 1`] = ` +exports[`create-snowpack-app app-template-react-typescript > build: allFiles 1`] = ` +Array [ + "__snowpack__/env.js", + "dist/App.css", + "dist/App.css.proxy.js", + "dist/App.js", + "dist/index.css", + "dist/index.css.proxy.js", + "dist/index.js", + "dist/logo.svg", + "dist/logo.svg.proxy.js", + "favicon.ico", + "index.html", + "robots.txt", + "web_modules/import-map.json", + "web_modules/react-dom.js", + "web_modules/react.js", +] +`; + +exports[`create-snowpack-app app-template-react-typescript > build: dist/App.css 1`] = ` ".App { text-align: center; } @@ -8377,7 +8397,7 @@ exports[`create-snowpack-app app-template-react-typescript > build: _dist_/App.c }" `; -exports[`create-snowpack-app app-template-react-typescript > build: _dist_/App.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-react-typescript > build: dist/App.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\".App { text-align: center;}.App code { background: #FFF3; padding: 4px 8px; border-radius: 4px;}.App p { margin: 0.4rem;}.App-logo { height: 40vmin; pointer-events: none;}@media (prefers-reduced-motion: no-preference) { .App-logo { animation: App-logo-spin infinite 20s linear; }}.App-header { background-color: #282c34; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: calc(10px + 2vmin); color: white;}.App-link { color: #61dafb;}@keyframes App-logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); }}\\"; @@ -8389,7 +8409,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-react-typescript > build: _dist_/App.js 1`] = ` +exports[`create-snowpack-app app-template-react-typescript > build: dist/App.js 1`] = ` "import React, {useState, useEffect} from \\"../web_modules/react.js\\"; import logo2 from \\"./logo.svg.proxy.js\\"; import \\"./App.css.proxy.js\\"; @@ -8417,7 +8437,7 @@ function App2({}) { export default App2;" `; -exports[`create-snowpack-app app-template-react-typescript > build: _dist_/index.css 1`] = ` +exports[`create-snowpack-app app-template-react-typescript > build: dist/index.css 1`] = ` "body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", @@ -8432,7 +8452,7 @@ code { }" `; -exports[`create-snowpack-app app-template-react-typescript > build: _dist_/index.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-react-typescript > build: dist/index.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\"body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, \\\\\\"Segoe UI\\\\\\", \\\\\\"Roboto\\\\\\", \\\\\\"Oxygen\\\\\\", \\\\\\"Ubuntu\\\\\\", \\\\\\"Cantarell\\\\\\", \\\\\\"Fira Sans\\\\\\", \\\\\\"Droid Sans\\\\\\", \\\\\\"Helvetica Neue\\\\\\", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}code { font-family: source-code-pro, Menlo, Monaco, Consolas, \\\\\\"Courier New\\\\\\", monospace;}\\"; @@ -8444,7 +8464,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-react-typescript > build: _dist_/index.js 1`] = ` +exports[`create-snowpack-app app-template-react-typescript > build: dist/index.js 1`] = ` "import __SNOWPACK_ENV__ from '../__snowpack__/env.js'; import.meta.env = __SNOWPACK_ENV__; import React from \\"../web_modules/react.js\\"; @@ -8457,27 +8477,7 @@ if (import.meta.hot) { }" `; -exports[`create-snowpack-app app-template-react-typescript > build: _dist_/logo.svg.proxy.js 1`] = `"export default \\"/_dist_/logo.svg\\";"`; - -exports[`create-snowpack-app app-template-react-typescript > build: allFiles 1`] = ` -Array [ - "__snowpack__/env.js", - "_dist_/App.css", - "_dist_/App.css.proxy.js", - "_dist_/App.js", - "_dist_/index.css", - "_dist_/index.css.proxy.js", - "_dist_/index.js", - "_dist_/logo.svg", - "_dist_/logo.svg.proxy.js", - "favicon.ico", - "index.html", - "robots.txt", - "web_modules/import-map.json", - "web_modules/react-dom.js", - "web_modules/react.js", -] -`; +exports[`create-snowpack-app app-template-react-typescript > build: dist/logo.svg.proxy.js 1`] = `"export default \\"/dist/logo.svg\\";"`; exports[`create-snowpack-app app-template-react-typescript > build: index.html 1`] = ` " @@ -8871,9 +8871,26 @@ export default reactDom;" exports[`create-snowpack-app app-template-svelte > build: __snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; -exports[`create-snowpack-app app-template-svelte > build: _dist_/App.css 1`] = `"body{margin:0;font-family:Arial, Helvetica, sans-serif}.App.svelte-rq4gzr.svelte-rq4gzr{text-align:center}.App.svelte-rq4gzr code.svelte-rq4gzr{background:#0002;padding:4px 8px;border-radius:4px}.App.svelte-rq4gzr p.svelte-rq4gzr{margin:0.4rem}.App-header.svelte-rq4gzr.svelte-rq4gzr{background-color:#f9f6f6;color:#333;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin)}.App-link.svelte-rq4gzr.svelte-rq4gzr{color:#ff3e00}.App-logo.svelte-rq4gzr.svelte-rq4gzr{height:36vmin;pointer-events:none;margin-bottom:3rem;animation:svelte-rq4gzr-App-logo-pulse infinite 1.6s ease-in-out alternate}@keyframes svelte-rq4gzr-App-logo-pulse{from{transform:scale(1)}to{transform:scale(1.06)}}"`; +exports[`create-snowpack-app app-template-svelte > build: allFiles 1`] = ` +Array [ + "__snowpack__/env.js", + "dist/App.css", + "dist/App.css.proxy.js", + "dist/App.js", + "dist/index.js", + "favicon.ico", + "index.html", + "logo.svg", + "robots.txt", + "web_modules/import-map.json", + "web_modules/svelte.js", + "web_modules/svelte/internal.js", +] +`; + +exports[`create-snowpack-app app-template-svelte > build: dist/App.css 1`] = `"body{margin:0;font-family:Arial, Helvetica, sans-serif}.App.svelte-rq4gzr.svelte-rq4gzr{text-align:center}.App.svelte-rq4gzr code.svelte-rq4gzr{background:#0002;padding:4px 8px;border-radius:4px}.App.svelte-rq4gzr p.svelte-rq4gzr{margin:0.4rem}.App-header.svelte-rq4gzr.svelte-rq4gzr{background-color:#f9f6f6;color:#333;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin)}.App-link.svelte-rq4gzr.svelte-rq4gzr{color:#ff3e00}.App-logo.svelte-rq4gzr.svelte-rq4gzr{height:36vmin;pointer-events:none;margin-bottom:3rem;animation:svelte-rq4gzr-App-logo-pulse infinite 1.6s ease-in-out alternate}@keyframes svelte-rq4gzr-App-logo-pulse{from{transform:scale(1)}to{transform:scale(1.06)}}"`; -exports[`create-snowpack-app app-template-svelte > build: _dist_/App.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-svelte > build: dist/App.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\"body{margin:0;font-family:Arial, Helvetica, sans-serif}.App.svelte-rq4gzr.svelte-rq4gzr{text-align:center}.App.svelte-rq4gzr code.svelte-rq4gzr{background:#0002;padding:4px 8px;border-radius:4px}.App.svelte-rq4gzr p.svelte-rq4gzr{margin:0.4rem}.App-header.svelte-rq4gzr.svelte-rq4gzr{background-color:#f9f6f6;color:#333;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin)}.App-link.svelte-rq4gzr.svelte-rq4gzr{color:#ff3e00}.App-logo.svelte-rq4gzr.svelte-rq4gzr{height:36vmin;pointer-events:none;margin-bottom:3rem;animation:svelte-rq4gzr-App-logo-pulse infinite 1.6s ease-in-out alternate}@keyframes svelte-rq4gzr-App-logo-pulse{from{transform:scale(1)}to{transform:scale(1.06)}}\\"; @@ -8885,7 +8902,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-svelte > build: _dist_/App.js 1`] = ` +exports[`create-snowpack-app app-template-svelte > build: dist/App.js 1`] = ` "import './App.css.proxy.js'; import { SvelteComponent, @@ -8988,7 +9005,7 @@ class App extends SvelteComponent { export default App;" `; -exports[`create-snowpack-app app-template-svelte > build: _dist_/index.js 1`] = ` +exports[`create-snowpack-app app-template-svelte > build: dist/index.js 1`] = ` "import __SNOWPACK_ENV__ from '../__snowpack__/env.js'; import.meta.env = __SNOWPACK_ENV__; import App from \\"./App.js\\"; @@ -9006,23 +9023,6 @@ if (import.meta.hot) { }" `; -exports[`create-snowpack-app app-template-svelte > build: allFiles 1`] = ` -Array [ - "__snowpack__/env.js", - "_dist_/App.css", - "_dist_/App.css.proxy.js", - "_dist_/App.js", - "_dist_/index.js", - "favicon.ico", - "index.html", - "logo.svg", - "robots.txt", - "web_modules/import-map.json", - "web_modules/svelte.js", - "web_modules/svelte/internal.js", -] -`; - exports[`create-snowpack-app app-template-svelte > build: index.html 1`] = ` " @@ -9063,9 +9063,26 @@ exports[`create-snowpack-app app-template-svelte > build: web_modules/svelte/int exports[`create-snowpack-app app-template-svelte-typescript > build: __snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; -exports[`create-snowpack-app app-template-svelte-typescript > build: _dist_/App.css 1`] = `"body{margin:0;font-family:Arial, Helvetica, sans-serif}.App.svelte-1sqyd3v.svelte-1sqyd3v{text-align:center}.App.svelte-1sqyd3v code.svelte-1sqyd3v{background:#0002;padding:4px 8px;border-radius:4px}.App.svelte-1sqyd3v p.svelte-1sqyd3v{margin:0.4rem}.App-header.svelte-1sqyd3v.svelte-1sqyd3v{background-color:#f9f6f6;color:#333;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin)}.App-link.svelte-1sqyd3v.svelte-1sqyd3v{color:#ff3e00}.App-logo.svelte-1sqyd3v.svelte-1sqyd3v{height:36vmin;pointer-events:none;margin-bottom:3rem;animation:svelte-1sqyd3v-App-logo-spin infinite 1.6s ease-in-out alternate}@keyframes svelte-1sqyd3v-App-logo-spin{from{transform:scale(1)}to{transform:scale(1.06)}}"`; +exports[`create-snowpack-app app-template-svelte-typescript > build: allFiles 1`] = ` +Array [ + "__snowpack__/env.js", + "dist/App.css", + "dist/App.css.proxy.js", + "dist/App.js", + "dist/index.js", + "favicon.ico", + "index.html", + "logo.svg", + "robots.txt", + "web_modules/import-map.json", + "web_modules/svelte.js", + "web_modules/svelte/internal.js", +] +`; + +exports[`create-snowpack-app app-template-svelte-typescript > build: dist/App.css 1`] = `"body{margin:0;font-family:Arial, Helvetica, sans-serif}.App.svelte-1sqyd3v.svelte-1sqyd3v{text-align:center}.App.svelte-1sqyd3v code.svelte-1sqyd3v{background:#0002;padding:4px 8px;border-radius:4px}.App.svelte-1sqyd3v p.svelte-1sqyd3v{margin:0.4rem}.App-header.svelte-1sqyd3v.svelte-1sqyd3v{background-color:#f9f6f6;color:#333;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin)}.App-link.svelte-1sqyd3v.svelte-1sqyd3v{color:#ff3e00}.App-logo.svelte-1sqyd3v.svelte-1sqyd3v{height:36vmin;pointer-events:none;margin-bottom:3rem;animation:svelte-1sqyd3v-App-logo-spin infinite 1.6s ease-in-out alternate}@keyframes svelte-1sqyd3v-App-logo-spin{from{transform:scale(1)}to{transform:scale(1.06)}}"`; -exports[`create-snowpack-app app-template-svelte-typescript > build: _dist_/App.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-svelte-typescript > build: dist/App.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\"body{margin:0;font-family:Arial, Helvetica, sans-serif}.App.svelte-1sqyd3v.svelte-1sqyd3v{text-align:center}.App.svelte-1sqyd3v code.svelte-1sqyd3v{background:#0002;padding:4px 8px;border-radius:4px}.App.svelte-1sqyd3v p.svelte-1sqyd3v{margin:0.4rem}.App-header.svelte-1sqyd3v.svelte-1sqyd3v{background-color:#f9f6f6;color:#333;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin)}.App-link.svelte-1sqyd3v.svelte-1sqyd3v{color:#ff3e00}.App-logo.svelte-1sqyd3v.svelte-1sqyd3v{height:36vmin;pointer-events:none;margin-bottom:3rem;animation:svelte-1sqyd3v-App-logo-spin infinite 1.6s ease-in-out alternate}@keyframes svelte-1sqyd3v-App-logo-spin{from{transform:scale(1)}to{transform:scale(1.06)}}\\"; @@ -9077,7 +9094,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-svelte-typescript > build: _dist_/App.js 1`] = ` +exports[`create-snowpack-app app-template-svelte-typescript > build: dist/App.js 1`] = ` "import './App.css.proxy.js'; import { SvelteComponent, @@ -9180,7 +9197,7 @@ class App extends SvelteComponent { export default App;" `; -exports[`create-snowpack-app app-template-svelte-typescript > build: _dist_/index.js 1`] = ` +exports[`create-snowpack-app app-template-svelte-typescript > build: dist/index.js 1`] = ` "import __SNOWPACK_ENV__ from '../__snowpack__/env.js'; import.meta.env = __SNOWPACK_ENV__; import App2 from \\"./App.js\\"; @@ -9196,23 +9213,6 @@ if (import.meta.hot) { }" `; -exports[`create-snowpack-app app-template-svelte-typescript > build: allFiles 1`] = ` -Array [ - "__snowpack__/env.js", - "_dist_/App.css", - "_dist_/App.css.proxy.js", - "_dist_/App.js", - "_dist_/index.js", - "favicon.ico", - "index.html", - "logo.svg", - "robots.txt", - "web_modules/import-map.json", - "web_modules/svelte.js", - "web_modules/svelte/internal.js", -] -`; - exports[`create-snowpack-app app-template-svelte-typescript > build: index.html 1`] = ` " @@ -9253,7 +9253,24 @@ exports[`create-snowpack-app app-template-svelte-typescript > build: web_modules exports[`create-snowpack-app app-template-vue > build: __snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; -exports[`create-snowpack-app app-template-vue > build: _dist_/App.css 1`] = ` +exports[`create-snowpack-app app-template-vue > build: allFiles 1`] = ` +Array [ + "__snowpack__/env.js", + "dist/App.css", + "dist/App.css.proxy.js", + "dist/App.js", + "dist/index.js", + "favicon-32x32.png", + "favicon.ico", + "index.html", + "logo.svg", + "robots.txt", + "web_modules/import-map.json", + "web_modules/vue.js", +] +`; + +exports[`create-snowpack-app app-template-vue > build: dist/App.css 1`] = ` " .App { text-align: center; @@ -9287,7 +9304,7 @@ to { }" `; -exports[`create-snowpack-app app-template-vue > build: _dist_/App.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-vue > build: dist/App.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\".App { text-align: center;}.App-header { background-color: #f9f6f6; color: #32485f; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: calc(10px + 2vmin);}.App-link { color: #00c185;}.App-logo { height: 40vmin; pointer-events: none; margin-bottom: 1rem; animation: App-logo-spin infinite 1.6s ease-in-out alternate;}@keyframes App-logo-spin {from { transform: scale(1);}to { transform: scale(1.06);}}\\"; @@ -9299,7 +9316,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-vue > build: _dist_/App.js 1`] = ` +exports[`create-snowpack-app app-template-vue > build: dist/App.js 1`] = ` "import './App.css.proxy.js'; const defaultExport = { data() { @@ -9340,7 +9357,7 @@ defaultExport.render = render export default defaultExport" `; -exports[`create-snowpack-app app-template-vue > build: _dist_/index.js 1`] = ` +exports[`create-snowpack-app app-template-vue > build: dist/index.js 1`] = ` "import __SNOWPACK_ENV__ from '../__snowpack__/env.js'; import.meta.env = __SNOWPACK_ENV__; import { createApp } from \\"../web_modules/vue.js\\"; @@ -9357,23 +9374,6 @@ if (import.meta.hot) { }" `; -exports[`create-snowpack-app app-template-vue > build: allFiles 1`] = ` -Array [ - "__snowpack__/env.js", - "_dist_/App.css", - "_dist_/App.css.proxy.js", - "_dist_/App.js", - "_dist_/index.js", - "favicon-32x32.png", - "favicon.ico", - "index.html", - "logo.svg", - "robots.txt", - "web_modules/import-map.json", - "web_modules/vue.js", -] -`; - exports[`create-snowpack-app app-template-vue > build: index.html 1`] = ` " @@ -14420,7 +14420,36 @@ export { createApp, createBlock, createTextVNode, createVNode, openBlock, toDisp exports[`create-snowpack-app app-template-vue-typescript > build: __snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/App.css 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: allFiles 1`] = ` +Array [ + "__snowpack__/env.js", + "dist/App.css", + "dist/App.css.proxy.js", + "dist/App.js", + "dist/components/Bar.js", + "dist/components/Bar.module.css", + "dist/components/Bar.module.css.proxy.js", + "dist/components/BarJsx.css", + "dist/components/BarJsx.css.proxy.js", + "dist/components/BarJsx.js", + "dist/components/Foo.js", + "dist/components/Foo.module.css", + "dist/components/Foo.module.css.proxy.js", + "dist/components/FooTsx.css", + "dist/components/FooTsx.css.proxy.js", + "dist/components/FooTsx.js", + "dist/index.js", + "favicon-32x32.png", + "favicon.ico", + "index.html", + "logo.svg", + "robots.txt", + "web_modules/import-map.json", + "web_modules/vue.js", +] +`; + +exports[`create-snowpack-app app-template-vue-typescript > build: dist/App.css 1`] = ` " .App { text-align: center; @@ -14461,7 +14490,7 @@ to { }" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/App.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/App.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\".App { text-align: center;}.App-header { background-color: #f9f6f6; color: #32485f; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: calc(10px + 2vmin);}.App-link { color: #00c185;}.App-logo { height: 40vmin; pointer-events: none; margin-bottom: 1rem; animation: App-logo-spin infinite 1.6s ease-in-out alternate;}.App-tsx { display: flex;}.App-tsx > div { margin-left: 30px; font-size: 16px;}@keyframes App-logo-spin {from { transform: scale(1);}to { transform: scale(1.06);}}\\"; @@ -14473,7 +14502,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/App.js 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/App.js 1`] = ` "import './App.css.proxy.js'; import {defineComponent, reactive} from \\"../web_modules/vue.js\\"; import FooTsxVue from \\"./components/FooTsx.js\\"; @@ -14539,7 +14568,7 @@ defaultExport.render = render export default defaultExport" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/components/Bar.js 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/components/Bar.js 1`] = ` "import { Fragment } from '../../web_modules/vue.js'; import {createVNode, isVNode} from '../../web_modules/vue.js'; const slice = Array.prototype.slice; @@ -14564,13 +14593,13 @@ export default defineComponent({ });" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/components/Bar.module.css 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/components/Bar.module.css 1`] = ` ".bar-jsx { color: red; }" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/components/Bar.module.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/components/Bar.module.css.proxy.js 1`] = ` " export let code = \\"._bar-jsx_XXXXX_XX { color: red;}\\"; let json = {\\"bar-jsx\\":\\"_bar-jsx_XXXXX_XX\\"}; @@ -14585,14 +14614,14 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/components/BarJsx.css 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/components/BarJsx.css 1`] = ` " .bar-jsx-vue { color: red; }" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/components/BarJsx.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/components/BarJsx.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\"/* unsupport scoped css in vue with tsx, jsx*/.bar-jsx-vue { color: red;}\\"; @@ -14604,7 +14633,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/components/BarJsx.js 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/components/BarJsx.js 1`] = ` "import './BarJsx.css.proxy.js'; import { Fragment } from '../../web_modules/vue.js'; import {createVNode, isVNode} from '../../web_modules/vue.js'; @@ -14629,7 +14658,7 @@ export default defineComponent({ });" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/components/Foo.js 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/components/Foo.js 1`] = ` "import { Fragment } from '../../web_modules/vue.js'; import {createVNode, isVNode} from '../../web_modules/vue.js'; const slice = Array.prototype.slice; @@ -14654,13 +14683,13 @@ export default defineComponent({ });" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/components/Foo.module.css 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/components/Foo.module.css 1`] = ` ".foo-tsx { color: green; }" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/components/Foo.module.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/components/Foo.module.css.proxy.js 1`] = ` " export let code = \\"._foo-tsx_XXXXX_XX { color: green;}\\"; let json = {\\"foo-tsx\\":\\"_foo-tsx_XXXXX_XX\\"}; @@ -14675,14 +14704,14 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/components/FooTsx.css 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/components/FooTsx.css 1`] = ` " .foo-tsx-vue { color: green; }" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/components/FooTsx.css.proxy.js 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/components/FooTsx.css.proxy.js 1`] = ` "// [snowpack] add styles to the page (skip if no document exists) if (typeof document !== 'undefined') { const code = \\"/* unsupport scoped css in vue with tsx, jsx*/.foo-tsx-vue { color: green;}\\"; @@ -14694,7 +14723,7 @@ if (typeof document !== 'undefined') { }" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/components/FooTsx.js 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/components/FooTsx.js 1`] = ` "import './FooTsx.css.proxy.js'; import { Fragment } from '../../web_modules/vue.js'; import {createVNode, isVNode} from '../../web_modules/vue.js'; @@ -14719,7 +14748,7 @@ export default defineComponent({ });" `; -exports[`create-snowpack-app app-template-vue-typescript > build: _dist_/index.js 1`] = ` +exports[`create-snowpack-app app-template-vue-typescript > build: dist/index.js 1`] = ` "import __SNOWPACK_ENV__ from '../__snowpack__/env.js'; import.meta.env = __SNOWPACK_ENV__; import { createApp } from \\"../web_modules/vue.js\\"; @@ -14736,35 +14765,6 @@ if (import.meta.hot) { }" `; -exports[`create-snowpack-app app-template-vue-typescript > build: allFiles 1`] = ` -Array [ - "__snowpack__/env.js", - "_dist_/App.css", - "_dist_/App.css.proxy.js", - "_dist_/App.js", - "_dist_/components/Bar.js", - "_dist_/components/Bar.module.css", - "_dist_/components/Bar.module.css.proxy.js", - "_dist_/components/BarJsx.css", - "_dist_/components/BarJsx.css.proxy.js", - "_dist_/components/BarJsx.js", - "_dist_/components/Foo.js", - "_dist_/components/Foo.module.css", - "_dist_/components/Foo.module.css.proxy.js", - "_dist_/components/FooTsx.css", - "_dist_/components/FooTsx.css.proxy.js", - "_dist_/components/FooTsx.js", - "_dist_/index.js", - "favicon-32x32.png", - "favicon.ico", - "index.html", - "logo.svg", - "robots.txt", - "web_modules/import-map.json", - "web_modules/vue.js", -] -`; - exports[`create-snowpack-app app-template-vue-typescript > build: index.html 1`] = ` " diff --git a/test/esinstall/config-package-lookup-fields/__snapshots__ b/test/esinstall/config-package-lookup-fields/__snapshots__ index 8b95f1dc9f..53094258be 100644 --- a/test/esinstall/config-package-lookup-fields/__snapshots__ +++ b/test/esinstall/config-package-lookup-fields/__snapshots__ @@ -3,24 +3,21 @@ exports[`config-package-lookup-fields matches the snapshot: allFiles 1`] = ` Array [ "import-map.json", - "some-svelte-package.js", + "some-custom-lookup-package.js", ] `; exports[`config-package-lookup-fields matches the snapshot: cli output 1`] = ` "[snowpack] ! installing dependencies... -[snowpack] ✔ install complete! -[snowpack] - ⦿ web_modules/ size gzip brotli - └─ some-svelte-package.js XXXX KB XXXX KB XXXX KB" +[snowpack] Package \\"some-svelte-package\\" not found. Have you installed it?" `; exports[`config-package-lookup-fields matches the snapshot: web_modules/import-map.json 1`] = ` "{ \\"imports\\": { - \\"some-svelte-package\\": \\"./some-svelte-package.js\\" + \\"some-custom-lookup-package\\": \\"./some-custom-lookup-package.js\\" } }" `; -exports[`config-package-lookup-fields matches the snapshot: web_modules/some-svelte-package.js 1`] = `"console.log('TEST: THIS IS THE GOOD ENTRYPOINT');"`; +exports[`config-package-lookup-fields matches the snapshot: web_modules/some-custom-lookup-package.js 1`] = `"console.log('TEST: THIS IS THE GOOD ENTRYPOINT');"`;