79fe09fa30
* Adds a basic @astrojs/prefetch integration * adding tests for custom selectors * missed in last commit * Adding a few docs, removing the option for `selectors` to be an element array * adding an option for the concurrency limit * fixing test for updated integration options * Update packages/labs/prefetch/src/client.ts Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * nit: removing the NodeJS.Timer type to allow typescript to infer the return * updating docs for default selector with ~= * Skip prefetching on 2G connections, or when data saver is enabled * refactor: moving to packages/integrations, Astro Labs TBD down the road * README typo fix Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
39 lines
1.1 KiB
JSON
39 lines
1.1 KiB
JSON
{
|
|
"name": "@astrojs/prefetch",
|
|
"description": "Faster page navigations by prefetching links when the browser is idle.",
|
|
"version": "0.0.1",
|
|
"type": "module",
|
|
"types": "./dist/index.d.ts",
|
|
"author": "withastro",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/withastro/astro.git",
|
|
"directory": "packages/astro-prefetch"
|
|
},
|
|
"bugs": "https://github.com/withastro/astro/issues",
|
|
"homepage": "https://astro.build",
|
|
"exports": {
|
|
".": "./dist/index.js",
|
|
"./client.js": "./dist/client.js",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"scripts": {
|
|
"build": "astro-scripts build \"src/**/*.ts\" && tsc",
|
|
"build:ci": "astro-scripts build \"src/**/*.ts\"",
|
|
"dev": "astro-scripts dev \"src/**/*.ts\"",
|
|
"test": "playwright test",
|
|
"test:match": "playwright test -g"
|
|
},
|
|
"devDependencies": {
|
|
"@types/chai": "^4.3.1",
|
|
"@types/chai-as-promised": "^7.1.5",
|
|
"@types/mocha": "^9.1.1",
|
|
"astro": "workspace:*",
|
|
"astro-scripts": "workspace:*",
|
|
"playwright": "^1.22.2"
|
|
},
|
|
"dependencies": {
|
|
"throttles": "^1.0.1"
|
|
}
|
|
}
|