split typescript projects

pull/3030/head
mrkishi 5 years ago committed by Conduitry
parent 453b9ac2da
commit b0604b52a3

@ -37,8 +37,7 @@
"posttest": "agadoo internal/index.mjs",
"prepublishOnly": "export PUBLISH=true && npm test && npm run create-stubs",
"create-stubs": "node scripts/create-stubs.js",
"tsd": "tsc -p . --emitDeclarationOnly",
"typecheck": "tsc -p . --noEmit",
"tsd": "tsc -p src/compiler --emitDeclarationOnly && tsc -p src/runtime --emitDeclarationOnly",
"lint": "eslint \"{src,test}/**/*.{ts,js}\""
},
"repository": {

@ -1,4 +1,4 @@
import { assign } from '../../runtime/internal/index';
import { assign } from '../../runtime/internal/utils';
import Stats from '../Stats';
import parse from '../parse/index';
import render_dom from './render-dom/index';

@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.json",
"include": ["."],
"compilerOptions": {
"lib": ["es2017", "webworker"]
// TODO: remove mocha types from the whole project
// "types": ["node", "estree"]
}
}

@ -1,4 +1,5 @@
import { identity as linear, noop, now } from './utils';
import { identity as linear, noop } from './utils';
import { now } from './environment';
import { loop } from './loop';
import { create_rule, delete_rule } from './style_manager';
import { AnimationConfig } from '../animate';

@ -0,0 +1,16 @@
export const is_client = typeof window !== 'undefined';
export let now: () => number = is_client
? () => window.performance.now()
: () => Date.now();
export let raf = cb => requestAnimationFrame(cb);
// used internally for testing
export function set_now(fn) {
now = fn;
}
export function set_raf(fn) {
raf = fn;
}

@ -1,6 +1,7 @@
export * from './animations';
export * from './await-block';
export * from './dom';
export * from './environment';
export * from './keyed-each';
export * from './lifecycle';
export * from './loop';

@ -1,4 +1,4 @@
import { now, raf } from './utils';
import { now, raf } from './environment';
export interface Task { abort(): void; promise: Promise<void> }

@ -1,5 +1,5 @@
import { element } from './dom';
import { raf } from './utils';
import { raf } from './environment';
let stylesheet;
let active = 0;

@ -1,4 +1,5 @@
import { identity as linear, is_function, noop, now, run_all } from './utils';
import { identity as linear, is_function, noop, run_all } from './utils';
import { now } from "./environment";
import { loop } from './loop';
import { create_rule, delete_rule } from './style_manager';
import { custom_event } from './dom';

@ -89,20 +89,3 @@ export function once(fn) {
fn.call(this, ...args);
};
}
const is_client = typeof window !== 'undefined';
export let now: () => number = is_client
? () => window.performance.now()
: () => Date.now();
export let raf = cb => requestAnimationFrame(cb);
// used internally for testing
export function set_now(fn) {
now = fn;
}
export function set_raf(fn) {
raf = fn;
}

@ -0,0 +1,15 @@
{
"extends": "../../tsconfig.json",
"include": ["."],
"compilerOptions": {
"lib": ["es2015", "dom", "dom.iterable"],
"target": "es2015",
"types": [],
"baseUrl": ".",
"paths": {
"svelte/*": ["*"]
}
}
}

@ -0,0 +1,10 @@
{
"extends": "../tsconfig.json",
"include": ["."],
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"noEmit": true
}
}

@ -1,33 +1,30 @@
{
"include": [],
"compilerOptions": {
"target": "es2015",
"module": "es6",
"rootDir": "src",
// target node v8+ (https://node.green/)
// the only missing feature is Array.prototype.values
"lib": ["es2017"],
"target": "es2017",
"declaration": true,
"declarationDir": "types",
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noEmitOnError": true,
"lib": [
"es5",
"es6",
"dom",
"es2015"
],
"importHelpers": true,
"noErrorTruncation": true,
// rollup takes care of these
"module": "esnext",
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"svelte/internal": ["./src/runtime/internal/index"],
"svelte/easing": ["./src/runtime/easing/index"],
"svelte/motion": ["./src/runtime/motion/index"],
"svelte/store": ["./src/runtime/store/index"]
},
"typeRoots": [
"node_modules/@types"
]
},
"include": [
"src/**/*"
]
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
// TODO: error all the things
//"strict": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true
}
}

Loading…
Cancel
Save