Skip to content

Commit

Permalink
Adjust usage of replace-in-file
Browse files Browse the repository at this point in the history
  • Loading branch information
KittySparkles committed Aug 4, 2024
1 parent 2bff2bb commit e90c814
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/modulify.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs'
import path from 'path'
import replace from 'replace-in-file'
import { replaceInFileSync } from 'replace-in-file'

const pkg = JSON.parse(fs.readFileSync(path.resolve('./package.json'), 'utf8'))
const options = {
Expand All @@ -11,7 +11,7 @@ const options = {

if (pkg.type !== 'module') {
try {
const results = replace.sync(options)
const results = replaceInFileSync(options)
console.log('Replacement results:', results)
} catch (error) {
console.error('Error occurred:', error)
Expand Down

0 comments on commit e90c814

Please sign in to comment.