Skip to content

Commit

Permalink
Removed ignored files
Browse files Browse the repository at this point in the history
  • Loading branch information
wking-io committed Dec 14, 2023
1 parent aa75b98 commit e571cd0
Show file tree
Hide file tree
Showing 39 changed files with 22 additions and 18 deletions.
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
node_modules

/build
/public/build
/public/images
/public/pdf
/server-build
/docs-build
/docs-public/build
/docs-public/images
/docs-public/pdf
/docs-server-build
.env

*.local.*
Expand All @@ -14,4 +14,4 @@ node_modules

documentation
/scripts/crd-builder/specs
/public/documentation
/docs-public/documentation
2 changes: 1 addition & 1 deletion index.js → docs-index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dotenv/config'

if (process.env.NODE_ENV === 'production') {
await import('./server-build/index.js')
await import('./docs-server-build/index.js')
} else {
await import('./server/index.ts')
}
1 change: 1 addition & 0 deletions docs-public/build/_assets/tailwind-L5SHDPXO.css

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"build:server": "tsx ./scripts/build-server.ts",
"dev": "run-p dev:*",
"dev:remix": "remix dev -c \"npm run dev-server\" --no-restart",
"dev-server": "cross-env MOCKS=true tsx watch --clear-screen=false --ignore \"app/**\" --ignore \"build/**\" --ignore \"node_modules/**\" ./index.js",
"dev-server": "cross-env MOCKS=true tsx watch --clear-screen=false --ignore \"app/**\" --ignore \"docs-build/**\" --ignore \"node_modules/**\" ./index.js",
"format": "prettier --write .",
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .",
"lint:files": "ts-node --esm scripts/lint-file-case.ts",
"start": "cross-env NODE_ENV=production node .",
"start": "cross-env NODE_ENV=production node docs-index.js",
"test": "vitest",
"typecheck": "tsc",
"validate": "run-p lint typecheck test",
Expand All @@ -28,10 +28,10 @@
},
"eslintIgnore": [
"/node_modules",
"/build",
"/public/build",
"/docs-build",
"/docs-public/build",
"/playwright-report",
"/server-build"
"/docs-server-build"
],
"dependencies": {
"@headlessui/react": "^1.7.14",
Expand Down
3 changes: 3 additions & 0 deletions remix.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
*/
export default {
cacheDirectory: './node_modules/.cache/remix',
assetsBuildDirectory: 'docs-public/build',
serverBuildPath: 'docs-build/index.js',
publicPath: '/docs-public/build/',
ignoredRouteFiles: ['**/.*', '**/.test.{js,jsx,ts,tsx}'],
serverModuleFormat: 'esm',
serverPlatform: 'node',
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ for (const file of allFiles) {
if (/\.(ts|js|tsx|jsx)$/.test(file)) {
entries.push(file)
} else {
const dest = file.replace(here('../server'), here('../server-build'))
const dest = file.replace(here('../server'), here('../docs-server-build'))
fsExtra.ensureDirSync(path.parse(dest).dir)
fsExtra.copySync(file, dest)
console.log(`copied: ${file.replace(`${here('../server')}/`, '')}`)
Expand All @@ -32,7 +32,7 @@ console.log('building...')
esbuild
.build({
entryPoints: glob.sync(globsafe(here('../server/**/*.+(ts|js|tsx|jsx)'))),
outdir: here('../server-build'),
outdir: here('../docs-server-build'),
target: [`node${pkg.engines.node}`],
platform: 'node',
format: 'esm',
Expand Down
8 changes: 4 additions & 4 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from 'path-to-regexp'
import { fileURLToPath, pathToFileURL } from 'url'

const BUILD_DIR = path.join(process.cwd(), 'build', 'index.js')
const BUILD_DIR = path.join(process.cwd(), 'docs-build', 'index.js')
const BUILD_DIR_FILE_URL = pathToFileURL(BUILD_DIR).href

const __dirname = path.dirname(fileURLToPath(import.meta.url))
Expand All @@ -38,13 +38,13 @@ app.disable('x-powered-by')

// Remix fingerprints its assets so we can cache forever.
app.use(
'/build',
express.static('public/build', { immutable: true, maxAge: '1y' }),
'/docs-public/build',
express.static('docs-public/build', { immutable: true, maxAge: '1y' }),
)

// Everything else (like favicon.ico) is cached for an hour. You may want to be
// more aggressive with this caching.
app.use(express.static('public', { maxAge: '1h' }))
app.use(express.static('docs-public', { maxAge: '1h' }))

morgan.token('url', (req, res) => decodeURIComponent(req.url ?? ''))
app.use(morgan('tiny'))
Expand Down

0 comments on commit e571cd0

Please sign in to comment.