Skip to content

Commit

Permalink
feat: minor housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayakkulkarni committed Aug 29, 2021
1 parent bbe1211 commit 49c0c8d
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
},
"files.eol": "\n",
"typescript.tsdk": "node_modules/typescript/lib"
}
6 changes: 5 additions & 1 deletion build/rollup.config.min.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import sucrase from '@rollup/plugin-sucrase';
import scss from 'rollup-plugin-scss';
import svelte from 'rollup-plugin-svelte';
import { terser } from 'rollup-plugin-terser';
import autoPreprocess from 'svelte-preprocess';
import pkg from '../package.json';

const plugins = [
Expand All @@ -23,7 +24,10 @@ const plugins = [
extensions: ['.js', '.ts', '.svelte'],
exclude: 'src/**',
}),
svelte({ emitCss: true }),
svelte({
emitCss: true,
preprocess: autoPreprocess(),
}),
scss({
output: 'dist/s-offline.min.css',
// @ts-ignore
Expand Down
6 changes: 5 additions & 1 deletion build/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import resolve from '@rollup/plugin-node-resolve';
import sucrase from '@rollup/plugin-sucrase';
import scss from 'rollup-plugin-scss';
import svelte from 'rollup-plugin-svelte';
import autoPreprocess from 'svelte-preprocess';
import pkg from '../package.json';

export const banner = `/*!
Expand All @@ -29,7 +30,10 @@ const plugins = [
extensions: ['.js', '.ts', '.svelte'],
exclude: 'src/**',
}),
svelte({ emitCss: true }),
svelte({
emitCss: true,
preprocess: autoPreprocess(),
}),
scss({
output: 'dist/s-offline.css',
}),
Expand Down
123 changes: 123 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^22.0.0",
"svelte": "^3.42.4",
"svelte-preprocess": "^4.8.0",
"typescript": "^4.4.2"
},
"keywords": [
Expand Down
6 changes: 5 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ export type SOfflineProps = {
pingUrl?: string;
};

export const SOffline: SvelteComponentTyped<SOfflineProps>;
export interface SOfflineEvents {
detectedCondition: { isOnline: boolean };
}

export const SOffline: SvelteComponentTyped<SOfflineProps, SOfflineEvents>;

0 comments on commit 49c0c8d

Please sign in to comment.