Skip to content

Commit

Permalink
chore: update browser-sync types
Browse files Browse the repository at this point in the history
use @types/browser-sync
  • Loading branch information
cossssmin committed Feb 8, 2024
1 parent 3313dd7 commit b8eeb4c
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 53 deletions.
101 changes: 101 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
Expand Up @@ -78,6 +78,7 @@
"tailwindcss": "^3.2.7"
},
"devDependencies": {
"@types/browser-sync": "^2.29.0",
"@types/js-beautify": "^1.14.0",
"@types/markdown-it": "^13.0.0",
"ava": "^5.2.0",
Expand Down
58 changes: 5 additions & 53 deletions src/index.d.ts
Expand Up @@ -2,6 +2,7 @@ import type {StringifyOptions} from 'query-string';
import type {CoreBeautifyOptions} from 'js-beautify';
import type {Options as MarkdownItOptions} from 'markdown-it';
import type {Opts as PlaintextOptions} from 'string-strip-html';
import type {Options as BrowserSyncOptions} from 'browser-sync';

declare namespace MaizzleFramework {
interface LayoutsConfig {
Expand Down Expand Up @@ -550,56 +551,7 @@ declare namespace MaizzleFramework {
compiled?: string;
}

interface BrowsersyncConfig {
/**
Enable the file explorer when the dev server is started.
@default true
*/
directory?: boolean;

/**
Enable Browsersync's pop-over notifications.
@default false
*/
notify?: boolean;

/**
Which URL to open automatically when Browsersync starts.
@default false
*/
open?: boolean | string;

/**
The port to run the dev server on.
@default 3000
*/
port?: number;

/**
Whether to tunnel the dev server through a random public URL.
@default false
*/
tunnel?: boolean | string;

/**
Configure the Browsersync server UI.
@default {port: 3001}
*/
ui?: Record<any, any> | boolean;

/**
Additional paths for Browsersync to watch.
@default ['src/**', 'tailwind.config.js', 'config.*.js']
*/
watch?: string[];
}
type BrowserSyncConfig = BrowserSyncOptions

interface PostHTMLOptions {
/**
Expand Down Expand Up @@ -839,7 +791,7 @@ declare namespace MaizzleFramework {
When you run the `maizzle serve` command, Maizzle uses [Browsersync](https://browsersync.io/)
to start a local development server and open a directory listing of your emails in your default browser.
*/
browsersync?: BrowsersyncConfig;
browsersync?: BrowserSyncConfig;
/**
Configure how build errors are handled when developing with the Maizzle CLI.
Expand Down Expand Up @@ -1529,7 +1481,7 @@ declare namespace MaizzleFramework {
layouts: LayoutsConfig,
components: ComponentsConfig,
posthtml: PostHTMLConfig,
browserSync: BrowserSyncConfig,
browsersync: BrowserSyncConfig,
fail: 'silent' // or 'verbose'
}
}
Expand Down Expand Up @@ -2105,7 +2057,7 @@ declare namespace MaizzleFramework {
ComponentsConfig,
ExpressionsConfig,
TailwindConfig,
BrowsersyncConfig,
BrowserSyncConfig,
PostHTMLConfig,
BuildConfig,
InlineCSSConfig,
Expand Down

0 comments on commit b8eeb4c

Please sign in to comment.