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
*/
import { identity as linear } from 'svelte/internal';
export function backInOut(t) {
var s = 1.70158 * 1.525;
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);
}
export function linear(t) {
return t;
}
export function quadInOut(t) {
t /= 0.5;
if (t < 1) return 0.5 * t * t;

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

Loading…
Cancel
Save