Skip to content
This repository was archived by the owner on Jun 28, 2022. It is now read-only.

Commit a4e19ab

Browse files
committed
Merge remote-tracking branch 'template/master'
2 parents 988e2a8 + f92a0a4 commit a4e19ab

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"name": "svelte-app",
33
"version": "1.0.0",
4+
"private": true,
45
"scripts": {
56
"build": "rollup -c",
67
"autobuild": "rollup -c -w",
78
"dev": "run-p start:dev autobuild",
8-
"start": "sirv public",
9+
"start": "sirv public --no-clear",
910
"start:dev": "sirv public --dev",
1011
"eslint:check": "eslint . --ext .svelte",
1112
"eslint:fix": "npm run eslint:check -- --fix",

scripts/setupTypeScript.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ const projectRoot = argv[2] || path.join(__dirname, '..');
2222
// Add deps to pkg.json
2323
const packageJSON = JSON.parse(fs.readFileSync(path.join(projectRoot, 'package.json'), 'utf8'));
2424
packageJSON.devDependencies = Object.assign(packageJSON.devDependencies, {
25-
'svelte-check': '^1.0.0',
25+
'svelte-check': '^2.0.0',
2626
'svelte-preprocess': '^4.0.0',
27-
'@rollup/plugin-typescript': '^6.0.0',
28-
typescript: '^3.9.3',
27+
'@rollup/plugin-typescript': '^8.0.0',
28+
typescript: '^4.0.0',
2929
tslib: '^2.0.0',
30-
'@tsconfig/svelte': '^1.0.0',
30+
'@tsconfig/svelte': '^2.0.0',
3131
});
3232

3333
// Add script for checking
3434
packageJSON.scripts = Object.assign(packageJSON.scripts, {
35-
validate: 'svelte-check',
35+
check: 'svelte-check --tsconfig ./tsconfig.json',
3636
});
3737

3838
// Write the package JSON
@@ -88,6 +88,10 @@ const tsconfig = `{
8888
const tsconfigPath = path.join(projectRoot, 'tsconfig.json');
8989
fs.writeFileSync(tsconfigPath, tsconfig);
9090

91+
// Add global.d.ts
92+
const dtsPath = path.join(projectRoot, 'src', 'global.d.ts');
93+
fs.writeFileSync(dtsPath, `/// <reference types="svelte" />`);
94+
9195
// Delete this script, but not during testing
9296
if (!argv[2]) {
9397
// Remove the script

0 commit comments

Comments
 (0)