Skip to content

Commit

Permalink
CJS
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJaredWilcurt committed Dec 14, 2023
1 parent 33c3e61 commit b18fa38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/usr/bin/env node

import { promises as fs } from 'node:fs';
import path from 'node:path';
import * as url from 'node:url';
// SUPER IMPORTANT:
// Node is extremely annoying and refuses to allow ESM imports in
// CLI tools, so we have to use require here, do not change to import.
const fs = require('node:fs').promises;
const path = require('node:path');

let https;
try {
https = await import('node:https');
} catch (error) {
https = require('node:https');
} catch (err) {
console.error('https support is disabled!');
}

const __dirname = url.fileURLToPath(new URL('.', import.meta.url));

let originalManifestIndentation = 2;
let originalManifestEOL = '\n';

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "base-volta-off-of-nwjs",
"version": "0.0.1",
"version": "0.0.2",
"main": "index.js",
"bin": "./index.js",
"license": "MIT",
Expand Down

0 comments on commit b18fa38

Please sign in to comment.