thunderous-server 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/cli.ts +6 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thunderous-server",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "A simple server to enhance Thunderous components with SSR.",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan DeWitt <jon.dewitt@thunder.solutions>",
@@ -52,7 +52,7 @@
52
52
  "string-width": "^8.2.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "thunderous": ">=2.4.1"
55
+ "thunderous": ">=2.4.2"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsup --no-clean",
package/src/cli.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { build } from './build';
2
2
  import nodemon from 'nodemon';
3
- import { readFileSync } from 'fs';
3
+ import { existsSync, readFileSync } from 'fs';
4
4
  import { config } from './config';
5
5
  import { relative, resolve } from 'path';
6
6
  import chalk from 'chalk';
@@ -9,8 +9,11 @@ const args = process.argv.slice(2);
9
9
 
10
10
  if (args[0] === 'dev') {
11
11
  try {
12
- const ignoreFile = readFileSync('.gitignore', 'utf-8');
13
- const ignores = ignoreFile.split('\n').filter((line) => line.trim() !== '' && !line.startsWith('#'));
12
+ const ignores = existsSync('.gitignore')
13
+ ? readFileSync('.gitignore', 'utf-8')
14
+ .split('\n')
15
+ .filter((line) => line.trim() !== '' && !line.startsWith('#'))
16
+ : [];
14
17
 
15
18
  // Set up nodemon for auto-restart on server changes
16
19
  if (process.env.NODE_ENV !== 'production') {