tweak some config etc

pull/1937/head
Richard Harris 6 years ago
parent d58996534d
commit f746031f96

@ -3,6 +3,8 @@ Adapted from https://github.com/mattdesl
Distributed under MIT License https://github.com/mattdesl/eases/blob/master/LICENSE.md Distributed under MIT License https://github.com/mattdesl/eases/blob/master/LICENSE.md
*/ */
import { identity as linear } from 'svelte/internal';
export function backInOut(t) { export function backInOut(t) {
var s = 1.70158 * 1.525; var s = 1.70158 * 1.525;
if ((t *= 2) < 1) return 0.5 * (t * t * ((s + 1) * t - s)); if ((t *= 2) < 1) return 0.5 * (t * t * ((s + 1) * t - s));
@ -112,10 +114,6 @@ export function expoOut(t) {
return t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t); return t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t);
} }
export function linear(t) {
return t;
}
export function quadInOut(t) { export function quadInOut(t) {
t /= 0.5; t /= 0.5;
if (t < 1) return 0.5 * t * t; if (t < 1) return 0.5 * t * t;

@ -52,45 +52,31 @@ export default [
experimentalCodeSplitting: true experimentalCodeSplitting: true
}, },
/* internal.[m]js */ /* internal.[m]js, motion.mjs */
{ ...['internal', 'motion'].map(name => ({
input: 'src/internal/index.js', input: `src/${name}/index.js`,
output: [
{
file: 'internal.mjs',
format: 'esm'
},
{
file: 'internal.js',
format: 'cjs'
}
]
},
/* motion.[m]js */
{
input: 'src/motion/index.js',
output: [ output: [
{ {
file: 'motion.mjs', file: `${name}.mjs`,
format: 'esm', format: 'esm',
paths: id => id.replace('svelte', '.') paths: id => id.startsWith('svelte/') && id.replace('svelte', '.')
}, },
{ {
file: 'motion.js', file: `${name}.js`,
format: 'cjs', format: 'cjs',
paths: id => id.replace('svelte', '.') paths: id => id.startsWith('svelte/') && id.replace('svelte', '.')
} }
], ],
external: id => id.startsWith('svelte/') external: id => id.startsWith('svelte/')
}, })),
// runtime API // everything else
...['index', 'store', 'easing', 'motion', 'transition'].map(name => ({ ...['index', 'store', 'easing', 'transition'].map(name => ({
input: `${name}.mjs`, input: `${name}.mjs`,
output: { output: {
file: `${name}.js`, file: `${name}.js`,
format: 'cjs' format: 'cjs',
paths: id => id.startsWith('svelte/') && id.replace('svelte', '.')
}, },
external: id => id !== `${name}.mjs` external: id => id !== `${name}.mjs`
})) }))

Loading…
Cancel
Save