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
|
||||
|
||||
const inquirer = require('inquirer');
|
||||
const { fileURLToPath } = require('url');
|
||||
const { dirname } = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { generateManifest } = require('./manifest.js');
|
||||
import inquirer from 'inquirer';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname } from 'path';
|
||||
import { execSync } from 'child_process';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { generateManifest } from './manifest.js';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// 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) {
|
||||
throw new Error('FID must be a positive integer');
|
||||
}
|
||||
@ -39,5 +39,3 @@ async function generateManifest(fid, seedPhrase) {
|
||||
|
||||
return jsonJfs;
|
||||
}
|
||||
|
||||
module.exports = { generateManifest };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user