Skip to content

Commit

Permalink
Project update. [p][robotic]
Browse files Browse the repository at this point in the history
  • Loading branch information
jaswrks committed Apr 8, 2024
1 parent 9cdb5e3 commit 6b04853
Show file tree
Hide file tree
Showing 14 changed files with 210 additions and 172 deletions.
2 changes: 1 addition & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 5, 2024 10:22 PM UTC.
# Last generated Apr 8, 2024 2:15 PM UTC.

[production]
node >= 20.9.0
Expand Down
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 5, 2024 10:22 PM UTC.
# Last generated Apr 8, 2024 2:15 PM UTC.

# Locals

Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 5, 2024 10:22 PM UTC.
# Last generated Apr 8, 2024 2:15 PM UTC.

# Default

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 5, 2024 10:22 PM UTC.
# Last generated Apr 8, 2024 2:15 PM UTC.

# Locals

Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 5, 2024 10:22 PM UTC.
# Last generated Apr 8, 2024 2:15 PM UTC.

# Locals

Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 5, 2024 10:22 PM UTC.
# Last generated Apr 8, 2024 2:15 PM UTC.

# Packages

Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @note This entire file will be updated automatically.
* @note Instead of editing here, please review `./settings.mjs`.
*
* Last generated using `./settings.mjs` Apr 5, 2024 10:22 PM UTC.
* Last generated using `./settings.mjs` Apr 8, 2024 2:15 PM UTC.
*/
{
"editor.formatOnType": false,
Expand Down
2 changes: 1 addition & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 5, 2024 10:22 PM UTC.
# Last generated Apr 8, 2024 2:15 PM UTC.

# Locals

Expand Down
2 changes: 2 additions & 0 deletions dev/.files/vite/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import importAliases from '../bin/includes/import-aliases.mjs';
import u from '../bin/includes/utilities.mjs';
import viteA16sDir from './includes/a16s/dir.mjs';
import viteC10nBrandConfig from './includes/c10n/brand-config.mjs';
import viteC10nCloudflareSockets from './includes/c10n/cloudflare-sockets.mjs';
import viteC10nHTMLTransformsConfig from './includes/c10n/html-transforms.mjs';
import viteC10nNoModulePreloadConfig from './includes/c10n/no-module-preload.mjs';
import viteC10nPostProcessingConfig from './includes/c10n/post-processing.mjs';
Expand Down Expand Up @@ -210,6 +211,7 @@ export default async ({ mode, command, isSsrBuild: isSSRBuild }) => {

await viteIconsConfig({}),
await viteC10nBrandConfig({ mode, appBaseURL }),
await viteC10nCloudflareSockets({ mode, command }),
//
await viteMDXConfig({ projDir }),
await viteEJSConfig({ mode, projDir, srcDir, pkg, env }),
Expand Down
36 changes: 36 additions & 0 deletions dev/.files/vite/includes/c10n/cloudflare-sockets.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* C10n Cloudflare sockets plugin.
*
* Vite is not aware of this config file's location.
*
* @note PLEASE DO NOT EDIT THIS FILE!
* @note This entire file will be updated automatically.
* @note Instead of editing here, please review <https://github.com/clevercanyon/skeleton>.
*/

/**
* Configures Cloudflare sockets plugin for Vite.
*
* @param props Props from vite config file driver.
*
* @returns Plugin configuration.
*/
export default async ({ mode, command }) => {
const virtualId = 'cloudflare:sockets';
const resolvedVirtualId = '\0' + virtualId;

return {
name: 'vite-plugin-c10n-cloudflare-sockets',

resolveId(id) {
if ('dev' === mode && 'serve' === command && id === virtualId) {
return '\0' + id;
}
},
async load(id) {
if ('dev' === mode && 'serve' === command && id === resolvedVirtualId) {
return 'export default {};';
}
},
};
};
Loading

0 comments on commit 6b04853

Please sign in to comment.