GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — :construction: :recycle: clear dir · nullstack/nullstack@bd8b616

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • scripts
    • index.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎scripts/index.js‎

Copy file name to clipboardExpand all lines: scripts/index.js
+12-6Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@ function loadEnv(name) {
2626
dotenv.config({ path: envPath })
2727
}
2828

29+
function clearDir() {
30+
if (existsSync(path.join(process.cwd(), '.development'))) {
31+
const tempFiles = readdirSync(path.join(process.cwd(), '.development'))
32+
for (const file of tempFiles) {
33+
if (file !== '.cache') {
34+
unlinkSync(path.join(process.cwd(), '.development', file))
35+
}
36+
}
37+
}
38+
}
39+
2940
async function start({ port, name, disk, loader, skipCache }) {
3041
loadEnv(name)
3142
console.info(` 🚀️ Building your application in development mode...`)
@@ -44,12 +55,7 @@ async function start({ port, name, disk, loader, skipCache }) {
4455
if (!process.env.NULLSTACK_WORKER_PROTOCOL) process.env.NULLSTACK_WORKER_PROTOCOL = 'http'
4556
const settings = config[0](null, { environment, disk, loader, skipCache, name })
4657
const compiler = webpack(settings)
47-
const tempFiles = readdirSync(path.join(process.cwd(), '.development'))
48-
for (const file of tempFiles) {
49-
if (file !== '.cache') {
50-
unlinkSync(path.join(process.cwd(), '.development', file))
51-
}
52-
}
58+
clearDir()
5359
compiler.watch({ aggregateTimeout: 200, hot: true, ignored: /node_modules/ }, (error, stats) => {
5460
if (error) {
5561
console.error(error.stack || error)

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.