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 Sep 3, 2023
1 parent 0b9f802 commit 4c70d29
Show file tree
Hide file tree
Showing 3 changed files with 3,167 additions and 382 deletions.
12 changes: 7 additions & 5 deletions dev/.files/vite/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import { $fs, $glob } from '../../../node_modules/@clevercanyon/utilities.node/d
import { $http as $cfpꓺhttp } from '../../../node_modules/@clevercanyon/utilities.cfp/dist/index.js';
import { $is, $str, $obj, $obp, $time } from '../../../node_modules/@clevercanyon/utilities/dist/index.js';

import { StandAlone as $preactꓺ404ꓺStandAlone } from '../../../node_modules/@clevercanyon/utilities/dist/preact/components/404.js';
import { renderToString as $preactꓺrenderToString } from '../../../node_modules/@clevercanyon/utilities/dist/preact/apis/ssr.js';
import { StandAlone as $preactꓺcomponentsꓺ404ꓺStandAlone } from '../../../node_modules/@clevercanyon/utilities/dist/preact/routes/404.js';
import { renderToString as $preactꓺapisꓺssrꓺrenderToString } from '../../../node_modules/@clevercanyon/utilities/dist/preact/apis/ssr.js';

import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
Expand Down Expand Up @@ -351,7 +351,7 @@ export default async ({ mode, command, ssrBuild: isSSRBuild }) => {
fileContents = fileContents.replace('$$__APP_CFP_DEFAULT_HEADERS__$$', cfpDefaultHeaders);
}
if (['404.html'].includes(fileRelPath)) {
const cfpDefault404 = '<!DOCTYPE html>' + $preactꓺrenderToString(preact.h($preactꓺ404ꓺStandAlone));
const cfpDefault404 = '<!DOCTYPE html>' + $preactꓺapisꓺssrꓺrenderToString(preact.h($preactꓺcomponentsꓺ404ꓺStandAlone));
fileContents = fileContents.replace('$$__APP_CFP_DEFAULT_404_HTML__$$', cfpDefault404);
}
if (['_headers', '_redirects', 'robots.txt'].includes(fileRelPath)) {
Expand Down Expand Up @@ -501,10 +501,12 @@ export default async ({ mode, command, ssrBuild: isSSRBuild }) => {
'**/node_modules/**',
'**/jspm_packages/**',
'**/bower_components/**',
'**/{x-*}/**', // Deliberate exclusions.
'**/x-*/**', // Deliberate exclusions.
...(vitestSandboxEnable ? [] : ['**/sandbox/**']),
'**/*.d.{ts,tsx,cts,ctsx,mts,mtsx}',
];
const vitestWatchExcludes = vitestExcludes.filter((v) => '**/x-*/**' !== v);

const vitestIncludes = vitestSandboxEnable
? [
'**/sandbox/**/*.{test,tests,spec,specs}.{js,jsx,cjs,cjsx,node,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtsx}',
Expand Down Expand Up @@ -541,7 +543,7 @@ export default async ({ mode, command, ssrBuild: isSSRBuild }) => {
css: { include: /.+/u },

exclude: vitestExcludes,
watchExclude: vitestExcludes,
watchExclude: vitestWatchExcludes,

restoreMocks: true, // Remove all mocks before a test begins.
unstubEnvs: true, // Remove all env stubs before a test begins.
Expand Down
Loading

0 comments on commit 4c70d29

Please sign in to comment.