remove v2 devtools meta

pull/4742/head
pushkine 5 years ago
parent 87a05ec47b
commit 796c8c6be6

1
.gitignore vendored

@ -8,7 +8,6 @@ node_modules
/src/compiler/compile/internal_exports.ts /src/compiler/compile/internal_exports.ts
/animate /animate
/dev
/easing /easing
/environment/ /environment/
/internal /internal

@ -13,18 +13,8 @@ const ts_plugin = is_publish
? typescript({ include: 'src/**', typescript: require('typescript') }) ? typescript({ include: 'src/**', typescript: require('typescript') })
: sucrase({ transforms: ['typescript'] }); : sucrase({ transforms: ['typescript'] });
// documented in src/ambient.ts
const globals = (name) => const globals = (name) =>
name === 'compiler' replace({
? replace({
'var __VERSION__: string': 'var rollup_removes_this',
'__VERSION__': `"${pkg.version}"`,
})
: replace({
'var __DEV__: boolean': 'var rollup_removes_this',
'__DEV__': name === 'dev',
'var __TEST__: boolean': 'var rollup_removes_this',
'__TEST__': name === 'test',
'var __VERSION__: string': 'var rollup_removes_this', 'var __VERSION__: string': 'var rollup_removes_this',
'__VERSION__': `"${pkg.version}"`, '__VERSION__': `"${pkg.version}"`,
}); });
@ -61,12 +51,6 @@ export default [
* -> 'svelte/index.js' * -> 'svelte/index.js'
*/ */
default: { file: 'index', path: '.' }, default: { file: 'index', path: '.' },
/**
* Development main runtime
* -> 'svelte/dev/index.js'
* redirected to by the compiler
*/
dev: { file: 'index', path: '.' },
}, },
plugins: [ts_plugin], plugins: [ts_plugin],
}), }),
@ -83,12 +67,6 @@ export default [
* -> 'svelte/[library]/index.js' * -> 'svelte/[library]/index.js'
*/ */
[library]: { file: 'index', path: '..' }, [library]: { file: 'index', path: '..' },
/**
* Development runtime
* -> 'svelte/dev/[library].js'
* Must be redirected to by user's bundler
*/
dev: { file: library, path: '.' },
}, },
plugins: [ plugins: [
ts_plugin, ts_plugin,

@ -1,55 +1 @@
/**
* __DEV__
*
* Used in src/runtime
*
* Bundles dev runtime to svelte/dev/[library].[m]js
* the compiler rewrites its own 'svelte' imports to 'svelte/dev' automatically
*
*/
declare var __DEV__: boolean;
/**
* __VERSION__
*
* Svelte's version in package.json
* Used in src/compiler and src/runtime
*
*/
declare var __VERSION__: string; declare var __VERSION__: string;
/**
* __COMPILER_API_VERSION__
*
* Unique ID passed to the compiler
* Used to mitigate breaking changes with bundler plugins
*
* VERSIONS ( default is "3.0.0" )
*
* >3.22.0 : {
*
* The change :
* A different runtime is now used in dev mode,
* every import has to go through 'svelte/dev' instead of 'svelte'
*
* Requirement :
* In dev mode, bundler plugins must make sure that every 'svelte' import is replaced by 'svelte/dev'
*
* }
*
*/
//declare var __COMPILER_API_VERSION__: boolean;
/**
* Unique ID devtools must pass to the compiler
* Used to
*
* VERSIONS ( default is "^3.21.0" )
* - 0 (default) : compiler imports from prod runtime
* - 1 : in dev mode, compiler imports from dev runtime
*/
//declare var __DEVTOOLS_API_VERSION__: boolean;
/**
* TODO
* Bundle different runtime for tests
* instead of relying on hacks
*/
declare var __TEST__: boolean;

Loading…
Cancel
Save