From c7668b87c08a25370fbb12bfa9ba1af099f745c7 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 2 Apr 2023 10:39:43 +0300 Subject: [PATCH] chore: remove outdated sapper demo --- README.md | 1 - components-demo/sapper-demo/.gitignore | 6 - components-demo/sapper-demo/README.md | 3 - components-demo/sapper-demo/cypress.json | 4 - .../sapper-demo/cypress/fixtures/example.json | 5 - .../sapper-demo/cypress/integration/spec.js | 19 --- .../sapper-demo/cypress/plugins/index.js | 17 --- .../sapper-demo/cypress/support/commands.js | 25 ---- .../sapper-demo/cypress/support/index.js | 20 --- components-demo/sapper-demo/package.json | 39 ------ components-demo/sapper-demo/rollup.config.js | 120 ------------------ components-demo/sapper-demo/src/client.js | 5 - .../sapper-demo/src/components/Nav.svelte | 89 ------------- .../sapper-demo/src/routes/_error.svelte | 40 ------ .../sapper-demo/src/routes/_layout.svelte | 22 ---- .../sapper-demo/src/routes/about.svelte | 7 - .../src/routes/blog/[slug].json.js | 28 ---- .../sapper-demo/src/routes/blog/[slug].svelte | 64 ---------- .../sapper-demo/src/routes/blog/_posts.js | 92 -------------- .../sapper-demo/src/routes/blog/index.json.js | 16 --- .../sapper-demo/src/routes/blog/index.svelte | 74 ----------- .../sapper-demo/src/routes/index.svelte | 84 ------------ components-demo/sapper-demo/src/server.js | 17 --- .../sapper-demo/src/service-worker.js | 82 ------------ components-demo/sapper-demo/src/template.html | 33 ----- .../sapper-demo/static/favicon.png | Bin 3127 -> 0 bytes components-demo/sapper-demo/static/global.css | 36 ------ .../sapper-demo/static/great-success.png | Bin 81921 -> 0 bytes .../sapper-demo/static/logo-192.png | Bin 4760 -> 0 bytes .../sapper-demo/static/logo-512.png | Bin 13928 -> 0 bytes .../sapper-demo/static/manifest.json | 20 --- 31 files changed, 968 deletions(-) delete mode 100644 components-demo/sapper-demo/.gitignore delete mode 100644 components-demo/sapper-demo/README.md delete mode 100644 components-demo/sapper-demo/cypress.json delete mode 100644 components-demo/sapper-demo/cypress/fixtures/example.json delete mode 100644 components-demo/sapper-demo/cypress/integration/spec.js delete mode 100644 components-demo/sapper-demo/cypress/plugins/index.js delete mode 100644 components-demo/sapper-demo/cypress/support/commands.js delete mode 100644 components-demo/sapper-demo/cypress/support/index.js delete mode 100644 components-demo/sapper-demo/package.json delete mode 100644 components-demo/sapper-demo/rollup.config.js delete mode 100644 components-demo/sapper-demo/src/client.js delete mode 100644 components-demo/sapper-demo/src/components/Nav.svelte delete mode 100644 components-demo/sapper-demo/src/routes/_error.svelte delete mode 100644 components-demo/sapper-demo/src/routes/_layout.svelte delete mode 100644 components-demo/sapper-demo/src/routes/about.svelte delete mode 100644 components-demo/sapper-demo/src/routes/blog/[slug].json.js delete mode 100644 components-demo/sapper-demo/src/routes/blog/[slug].svelte delete mode 100644 components-demo/sapper-demo/src/routes/blog/_posts.js delete mode 100644 components-demo/sapper-demo/src/routes/blog/index.json.js delete mode 100644 components-demo/sapper-demo/src/routes/blog/index.svelte delete mode 100644 components-demo/sapper-demo/src/routes/index.svelte delete mode 100644 components-demo/sapper-demo/src/server.js delete mode 100644 components-demo/sapper-demo/src/service-worker.js delete mode 100644 components-demo/sapper-demo/src/template.html delete mode 100644 components-demo/sapper-demo/static/favicon.png delete mode 100644 components-demo/sapper-demo/static/global.css delete mode 100644 components-demo/sapper-demo/static/great-success.png delete mode 100644 components-demo/sapper-demo/static/logo-192.png delete mode 100644 components-demo/sapper-demo/static/logo-512.png delete mode 100644 components-demo/sapper-demo/static/manifest.json diff --git a/README.md b/README.md index 9343bb2..6680745 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,6 @@ Directory `components-demo` contains demo packages that show usage of icon compo - [Vue 2 demo](./components-demo/vue2-demo/) - demo for Vue 2 component. Run `npm run build` to build demo and `npm run serve` to start it. - [Svelte demo](./components-demo/svelte-demo/) - demo for Svelte component. Run `npm run dev` to start demo. - [Svelte demo with Vite](./components-demo/svelte-demo-vite/) - demo for Svelte component using Vite. Run `npm run dev` to start demo. -- [Sapper demo](./components-demo/sapper-demo/) - demo for Sapper, using Svelte component on the server and in the browser. Run `npm run dev` to start the demo (deprecated, use SvelteKit instead of Sapper). - [SvelteKit demo](./components-demo/sveltekit-demo/) - demo for SvelteKit, using Svelte component on the server and in the browser. Run `npm run dev` to start the demo. - [Ember demo](./components-demo/ember-demo/) - demo for Ember component. Run `npm run build` to build demo and `npm run start` to start it. diff --git a/components-demo/sapper-demo/.gitignore b/components-demo/sapper-demo/.gitignore deleted file mode 100644 index 5aea041..0000000 --- a/components-demo/sapper-demo/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -/node_modules/ -/src/node_modules/@sapper/ -yarn-error.log -/cypress/screenshots/ -/__sapper__/ diff --git a/components-demo/sapper-demo/README.md b/components-demo/sapper-demo/README.md deleted file mode 100644 index 51eb7aa..0000000 --- a/components-demo/sapper-demo/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# sapper-template - -The default [Sapper](https://github.com/sveltejs/sapper) template, available for Rollup and webpack. diff --git a/components-demo/sapper-demo/cypress.json b/components-demo/sapper-demo/cypress.json deleted file mode 100644 index f5622fa..0000000 --- a/components-demo/sapper-demo/cypress.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "baseUrl": "http://localhost:3000", - "video": false -} \ No newline at end of file diff --git a/components-demo/sapper-demo/cypress/fixtures/example.json b/components-demo/sapper-demo/cypress/fixtures/example.json deleted file mode 100644 index da18d93..0000000 --- a/components-demo/sapper-demo/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} \ No newline at end of file diff --git a/components-demo/sapper-demo/cypress/integration/spec.js b/components-demo/sapper-demo/cypress/integration/spec.js deleted file mode 100644 index 9a7140d..0000000 --- a/components-demo/sapper-demo/cypress/integration/spec.js +++ /dev/null @@ -1,19 +0,0 @@ -describe('Sapper template app', () => { - beforeEach(() => { - cy.visit('/') - }); - - it('has the correct

', () => { - cy.contains('h1', 'Great success!') - }); - - it('navigates to /about', () => { - cy.get('nav a').contains('about').click(); - cy.url().should('include', '/about'); - }); - - it('navigates to /blog', () => { - cy.get('nav a').contains('blog').click(); - cy.url().should('include', '/blog'); - }); -}); \ No newline at end of file diff --git a/components-demo/sapper-demo/cypress/plugins/index.js b/components-demo/sapper-demo/cypress/plugins/index.js deleted file mode 100644 index fd170fb..0000000 --- a/components-demo/sapper-demo/cypress/plugins/index.js +++ /dev/null @@ -1,17 +0,0 @@ -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -module.exports = (on, config) => { - // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config -} diff --git a/components-demo/sapper-demo/cypress/support/commands.js b/components-demo/sapper-demo/cypress/support/commands.js deleted file mode 100644 index c1f5a77..0000000 --- a/components-demo/sapper-demo/cypress/support/commands.js +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add("login", (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This is will overwrite an existing command -- -// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) diff --git a/components-demo/sapper-demo/cypress/support/index.js b/components-demo/sapper-demo/cypress/support/index.js deleted file mode 100644 index d68db96..0000000 --- a/components-demo/sapper-demo/cypress/support/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/components-demo/sapper-demo/package.json b/components-demo/sapper-demo/package.json deleted file mode 100644 index d4fe6be..0000000 --- a/components-demo/sapper-demo/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "@iconify-demo/sapper", - "description": "Sapper demo for Iconify for Svelte", - "version": "0.0.1", - "private": true, - "scripts": { - "dev": "sapper dev", - "build": "sapper build --legacy", - "export": "sapper export --legacy", - "start": "node __sapper__/build", - "cy:run": "cypress run", - "cy:open": "cypress open", - "test": "run-p --race dev cy:run" - }, - "dependencies": { - "compression": "^1.7.4", - "polka": "^0.5.2", - "sirv": "^2.0.2" - }, - "devDependencies": { - "@babel/core": "^7.21.4", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-transform-runtime": "^7.21.4", - "@babel/preset-env": "^7.21.4", - "@babel/runtime": "^7.21.0", - "@iconify-icons/openmoji": "^1.2.20", - "@iconify/svelte": "workspace:*", - "@rollup/plugin-babel": "^6.0.3", - "@rollup/plugin-commonjs": "^24.0.1", - "@rollup/plugin-node-resolve": "^15.0.1", - "@rollup/plugin-replace": "^5.0.2", - "npm-run-all": "^4.1.5", - "rollup": "^3.20.2", - "rollup-plugin-svelte": "^7.1.4", - "rollup-plugin-terser": "^7.0.2", - "sapper": "^0.29.3", - "svelte": "^3.58.0" - } -} diff --git a/components-demo/sapper-demo/rollup.config.js b/components-demo/sapper-demo/rollup.config.js deleted file mode 100644 index 8ebfb18..0000000 --- a/components-demo/sapper-demo/rollup.config.js +++ /dev/null @@ -1,120 +0,0 @@ -import resolve from '@rollup/plugin-node-resolve'; -import replace from '@rollup/plugin-replace'; -import commonjs from '@rollup/plugin-commonjs'; -import svelte from 'rollup-plugin-svelte'; -import babel from '@rollup/plugin-babel'; -import { terser } from 'rollup-plugin-terser'; -import config from 'sapper/config/rollup.js'; -import pkg from './package.json'; - -const mode = process.env.NODE_ENV; -const dev = mode === 'development'; -const legacy = !!process.env.SAPPER_LEGACY_BUILD; - -const onwarn = (warning, onwarn) => - (warning.code === 'MISSING_EXPORT' && /'preload'/.test(warning.message)) || - (warning.code === 'CIRCULAR_DEPENDENCY' && - /[/\\]@sapper[/\\]/.test(warning.message)) || - onwarn(warning); - -export default { - client: { - input: config.client.input(), - output: config.client.output(), - plugins: [ - replace({ - 'process.browser': true, - 'process.env.NODE_ENV': JSON.stringify(mode), - }), - svelte({ - compilerOptions: { - dev, - hydratable: true, - // emitCss: true, - }, - }), - resolve({ - browser: true, - dedupe: ['svelte'], - }), - commonjs(), - - legacy && - babel({ - extensions: ['.js', '.mjs', '.html', '.svelte'], - babelHelpers: 'runtime', - exclude: ['node_modules/@babel/**'], - presets: [ - [ - '@babel/preset-env', - { - targets: '> 0.25%, not dead', - }, - ], - ], - plugins: [ - '@babel/plugin-syntax-dynamic-import', - [ - '@babel/plugin-transform-runtime', - { - useESModules: true, - }, - ], - ], - }), - - !dev && - terser({ - module: true, - }), - ], - - preserveEntrySignatures: false, - onwarn, - }, - - server: { - input: config.server.input(), - output: config.server.output(), - plugins: [ - replace({ - 'process.browser': false, - 'process.env.NODE_ENV': JSON.stringify(mode), - }), - svelte({ - compilerOptions: { - generate: 'ssr', - hydratable: true, - dev, - }, - }), - resolve({ - dedupe: ['svelte'], - }), - commonjs(), - ], - external: Object.keys(pkg.dependencies).concat( - require('module').builtinModules - ), - - preserveEntrySignatures: 'strict', - onwarn, - }, - - serviceworker: { - input: config.serviceworker.input(), - output: config.serviceworker.output(), - plugins: [ - resolve(), - replace({ - 'process.browser': true, - 'process.env.NODE_ENV': JSON.stringify(mode), - }), - commonjs(), - !dev && terser(), - ], - - preserveEntrySignatures: false, - onwarn, - }, -}; diff --git a/components-demo/sapper-demo/src/client.js b/components-demo/sapper-demo/src/client.js deleted file mode 100644 index cec9172..0000000 --- a/components-demo/sapper-demo/src/client.js +++ /dev/null @@ -1,5 +0,0 @@ -import * as sapper from '@sapper/app'; - -sapper.start({ - target: document.querySelector('#sapper') -}); \ No newline at end of file diff --git a/components-demo/sapper-demo/src/components/Nav.svelte b/components-demo/sapper-demo/src/components/Nav.svelte deleted file mode 100644 index fefaaf9..0000000 --- a/components-demo/sapper-demo/src/components/Nav.svelte +++ /dev/null @@ -1,89 +0,0 @@ - - - - - diff --git a/components-demo/sapper-demo/src/routes/_error.svelte b/components-demo/sapper-demo/src/routes/_error.svelte deleted file mode 100644 index 320e587..0000000 --- a/components-demo/sapper-demo/src/routes/_error.svelte +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - {status} - - -

{status}

- -

{error.message}

- -{#if dev && error.stack} -
{error.stack}
-{/if} diff --git a/components-demo/sapper-demo/src/routes/_layout.svelte b/components-demo/sapper-demo/src/routes/_layout.svelte deleted file mode 100644 index 8432299..0000000 --- a/components-demo/sapper-demo/src/routes/_layout.svelte +++ /dev/null @@ -1,22 +0,0 @@ - - - - -