mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-16 08:08:56 -05:00
fix: remove commonjs syntax
This commit is contained in:
parent
de626cac17
commit
317e302e48
14
bin/index.js
14
bin/index.js
@ -1,12 +1,12 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const inquirer = require('inquirer');
|
import inquirer from 'inquirer';
|
||||||
const { fileURLToPath } = require('url');
|
import { fileURLToPath } from 'url';
|
||||||
const { dirname } = require('path');
|
import { dirname } from 'path';
|
||||||
const { execSync } = require('child_process');
|
import { execSync } from 'child_process';
|
||||||
const fs = require('fs');
|
import fs from 'fs';
|
||||||
const path = require('path');
|
import path from 'path';
|
||||||
const { generateManifest } = require('./manifest.js');
|
import { generateManifest } from './manifest.js';
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = dirname(__filename);
|
const __dirname = dirname(__filename);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// utils to generate a manifest.json file for a frames v2 app
|
// utils to generate a manifest.json file for a frames v2 app
|
||||||
const { mnemonicToAccount } = require('viem/accounts');
|
import { mnemonicToAccount } from 'viem/accounts';
|
||||||
|
|
||||||
async function generateManifest(fid, seedPhrase) {
|
export async function generateManifest(fid, seedPhrase) {
|
||||||
if (!Number.isInteger(fid) || fid <= 0) {
|
if (!Number.isInteger(fid) || fid <= 0) {
|
||||||
throw new Error('FID must be a positive integer');
|
throw new Error('FID must be a positive integer');
|
||||||
}
|
}
|
||||||
@ -39,5 +39,3 @@ async function generateManifest(fid, seedPhrase) {
|
|||||||
|
|
||||||
return jsonJfs;
|
return jsonJfs;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { generateManifest };
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user