-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
104 changed files
with
2,173 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/node_modules/ | ||
/public/build/ | ||
|
||
.DS_Store | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# `svelte-example` | ||
|
||
More info coming soon... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "@uppy-example/svelte-app", | ||
"scripts": { | ||
"build": "rollup -c", | ||
"dev": "rollup -c -w", | ||
"start": "sirv public", | ||
"validate": "svelte-check" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^16.0.0", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^10.0.0", | ||
"@rollup/plugin-typescript": "^6.0.0", | ||
"@tsconfig/svelte": "^1.0.0", | ||
"postcss": "^8.2.1", | ||
"postcss-import": "^13.0.0", | ||
"postcss-load-config": "^3.0.0", | ||
"rollup": "^2.3.4", | ||
"rollup-plugin-css-only": "^3.0.0", | ||
"rollup-plugin-livereload": "^2.0.0", | ||
"rollup-plugin-svelte": "^7.0.0", | ||
"rollup-plugin-terser": "^7.0.0", | ||
"svelte": ">=3.24.0", | ||
"svelte-check": "^1.0.0", | ||
"svelte-preprocess": "^4.6.1", | ||
"tslib": "^2.0.0", | ||
"typescript": "^3.9.3" | ||
}, | ||
"dependencies": { | ||
"@uppy/core": "^1.14.1", | ||
"@uppy/svelte": "../../packages/@uppy/svelte", | ||
"@uppy/webcam": "^1.8.1", | ||
"@uppy/xhr-upload": "^1.6.7", | ||
"sirv-cli": "^1.0.0" | ||
}, | ||
"private": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
plugins: [ | ||
require('postcss-import')() | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
html, | ||
body { | ||
position: relative; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
body { | ||
color: #333; | ||
margin: 0; | ||
padding: 8px; | ||
box-sizing: border-box; | ||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | ||
} | ||
|
||
a { | ||
color: rgb(0, 100, 200); | ||
text-decoration: none; | ||
} | ||
|
||
a:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
a:visited { | ||
color: rgb(0, 80, 160); | ||
} | ||
|
||
label { | ||
display: block; | ||
} | ||
|
||
input, | ||
button, | ||
select, | ||
textarea { | ||
font-family: inherit; | ||
font-size: inherit; | ||
-webkit-padding: 0.4em 0; | ||
padding: 0.4em; | ||
margin: 0 0 0.5em 0; | ||
box-sizing: border-box; | ||
border: 1px solid #ccc; | ||
border-radius: 2px; | ||
} | ||
|
||
input:disabled { | ||
color: #ccc; | ||
} | ||
|
||
button { | ||
color: #333; | ||
background-color: #f4f4f4; | ||
outline: none; | ||
} | ||
|
||
button:disabled { | ||
color: #999; | ||
} | ||
|
||
button:not(:disabled):active { | ||
background-color: #ddd; | ||
} | ||
|
||
button:focus { | ||
border-color: #666; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset='utf-8'> | ||
<meta name='viewport' content='width=device-width,initial-scale=1'> | ||
|
||
<title>Svelte app</title> | ||
|
||
<link rel='icon' type='image/png' href='/favicon.png'> | ||
<link rel='stylesheet' href='/global.css'> | ||
<link rel='stylesheet' href='/build/bundle.css'> | ||
<script defer src='/build/bundle.js'></script> | ||
</head> | ||
|
||
<body> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import svelte from 'rollup-plugin-svelte' | ||
import commonjs from '@rollup/plugin-commonjs' | ||
import resolve from '@rollup/plugin-node-resolve' | ||
import livereload from 'rollup-plugin-livereload' | ||
import { terser } from 'rollup-plugin-terser' | ||
import sveltePreprocess from 'svelte-preprocess' | ||
import typescript from '@rollup/plugin-typescript' | ||
import css from 'rollup-plugin-css-only' | ||
|
||
const production = !process.env.ROLLUP_WATCH | ||
|
||
function serve () { | ||
let server | ||
|
||
function toExit () { | ||
if (server) server.kill(0) | ||
} | ||
|
||
return { | ||
writeBundle () { | ||
if (server) return | ||
server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], { | ||
stdio: ['ignore', 'inherit', 'inherit'], | ||
shell: true | ||
}) | ||
|
||
process.on('SIGTERM', toExit) | ||
process.on('exit', toExit) | ||
} | ||
} | ||
} | ||
|
||
export default { | ||
input: 'src/main.ts', | ||
output: { | ||
sourcemap: true, | ||
format: 'iife', | ||
name: 'app', | ||
file: 'public/build/bundle.js' | ||
}, | ||
plugins: [ | ||
svelte({ | ||
preprocess: sveltePreprocess({ | ||
postcss: true | ||
}), | ||
compilerOptions: { | ||
// enable run-time checks when not in production | ||
dev: !production | ||
} | ||
}), | ||
// we'll extract any component CSS out into | ||
// a separate file - better for performance | ||
css({ output: 'bundle.css' }), | ||
|
||
// If you have external dependencies installed from | ||
// npm, you'll most likely need these plugins. In | ||
// some cases you'll need additional configuration - | ||
// consult the documentation for details: | ||
// https://github.com/rollup/plugins/tree/master/packages/commonjs | ||
resolve({ | ||
browser: true, | ||
dedupe: ['svelte', '@uppy/core'] | ||
}), | ||
commonjs(), | ||
typescript({ | ||
sourceMap: !production, | ||
inlineSources: !production | ||
}), | ||
|
||
// In dev mode, call `npm run start` once | ||
// the bundle has been generated | ||
!production && serve(), | ||
|
||
// Watch the `public` directory and refresh the | ||
// browser on changes when not in production | ||
!production && livereload('public'), | ||
|
||
// If we're building for production (npm run build | ||
// instead of npm run dev), minify | ||
production && terser() | ||
], | ||
watch: { | ||
clearScreen: false | ||
} | ||
} |
Oops, something went wrong.