From b3dac82887508b6d5098b970da40a5ba9420f797 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Sat, 1 Sep 2018 10:47:13 -0700 Subject: Remove lib.globals.d.ts --- rollup.config.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'rollup.config.js') diff --git a/rollup.config.js b/rollup.config.js index 299bdad92..3dbe29260 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -24,6 +24,12 @@ const tsconfigOverride = { } }; +// this is a preamble for the `globals.d.ts` file to allow it to be the default +// lib for deno. +const libPreamble = `/// +/// +`; + // this is a rollup plugin which will look for imports ending with `!string` and resolve // them with a module that will inline the contents of the file as a string. Needed to // support `js/assets.ts`. @@ -62,7 +68,9 @@ function strings({ include, exclude } = {}) { transform(code, id) { if (filter(id)) { return { - code: `export default ${JSON.stringify(code)};`, + code: `export default ${JSON.stringify( + id.endsWith("globals.d.ts") ? libPreamble + code : code + )};`, map: { mappings: "" } }; } -- cgit v1.2.3