Skip to content

Commit

Permalink
fix: scripts unable to resolve dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Jan 10, 2023
1 parent 2141c50 commit 312caf3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/usr/bin/env zx
#!/usr/bin/env node
// The zx shebang doesn't resolve dependencies correctly
import 'zx/globals'

import path from 'path'
import { fs } from 'zx'
import { findUp } from 'find-up'
import * as tar from 'tar'
import { validateManifest } from '@companion-module/base'
import { createRequire } from 'module'

const require = createRequire(import.meta.url)

async function findModuleDir(cwd) {
const stat = await fs.stat(cwd)
Expand Down
4 changes: 3 additions & 1 deletion scripts/check.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env zx
#!/usr/bin/env node
// The zx shebang doesn't resolve dependencies correctly
import 'zx/globals'

import path from 'path'
import { fs } from 'zx'
Expand Down
4 changes: 3 additions & 1 deletion scripts/generate-manifest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env zx
#!/usr/bin/env node
// The zx shebang doesn't resolve dependencies correctly
import 'zx/globals'

import { fs, path, $ } from 'zx'
import parseAuthor from 'parse-author'
Expand Down

0 comments on commit 312caf3

Please sign in to comment.