mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-16 08:08:56 -05:00
remove debug logs
This commit is contained in:
parent
7ad6530cb8
commit
d5cbd099cd
35
bin/index.js
35
bin/index.js
@ -225,15 +225,7 @@ async function init() {
|
||||
try {
|
||||
console.log(`\nCloning repository from ${REPO_URL}...`);
|
||||
execSync(`git clone -b main ${REPO_URL} "${projectPath}" && cd "${projectPath}" && git fetch origin main && git reset --hard origin/main`);
|
||||
|
||||
// Debug: Check initial page.tsx content
|
||||
const pagePath = path.join(projectPath, 'src', 'app', 'page.tsx');
|
||||
if (fs.existsSync(pagePath)) {
|
||||
console.log('\nInitial page.tsx content:');
|
||||
console.log(fs.readFileSync(pagePath, 'utf8'));
|
||||
} else {
|
||||
console.log('\npage.tsx does not exist after clone');
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.error('\n❌ Error: Failed to create project directory.');
|
||||
console.error('Please make sure you have write permissions and try again.');
|
||||
@ -244,13 +236,6 @@ async function init() {
|
||||
console.log('\nRemoving .git directory...');
|
||||
fs.rmSync(path.join(projectPath, '.git'), { recursive: true, force: true });
|
||||
|
||||
// Debug: Check page.tsx content after .git removal
|
||||
const pagePath = path.join(projectPath, 'src', 'app', 'page.tsx');
|
||||
if (fs.existsSync(pagePath)) {
|
||||
console.log('\npage.tsx content after .git removal:');
|
||||
console.log(fs.readFileSync(pagePath, 'utf8'));
|
||||
}
|
||||
|
||||
// Remove package-lock.json
|
||||
console.log('\nRemoving package-lock.json...');
|
||||
const packageLockPath = path.join(projectPath, 'package-lock.json');
|
||||
@ -263,12 +248,6 @@ async function init() {
|
||||
const packageJsonPath = path.join(projectPath, 'package.json');
|
||||
let packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
||||
|
||||
// Debug: Check page.tsx content after package.json update
|
||||
if (fs.existsSync(pagePath)) {
|
||||
console.log('\npage.tsx content after package.json update:');
|
||||
console.log(fs.readFileSync(pagePath, 'utf8'));
|
||||
}
|
||||
|
||||
packageJson.name = projectName;
|
||||
packageJson.version = '0.1.0';
|
||||
delete packageJson.author;
|
||||
@ -381,22 +360,10 @@ async function init() {
|
||||
|
||||
// Install dependencies
|
||||
console.log('\nInstalling dependencies...');
|
||||
|
||||
// Debug: Check page.tsx content before npm install
|
||||
if (fs.existsSync(pagePath)) {
|
||||
console.log('\npage.tsx content before npm install:');
|
||||
console.log(fs.readFileSync(pagePath, 'utf8'));
|
||||
}
|
||||
|
||||
execSync('npm cache clean --force', { cwd: projectPath, stdio: 'inherit' });
|
||||
execSync('npm install', { cwd: projectPath, stdio: 'inherit' });
|
||||
|
||||
// Debug: Check page.tsx content after npm install
|
||||
if (fs.existsSync(pagePath)) {
|
||||
console.log('\npage.tsx content after npm install:');
|
||||
console.log(fs.readFileSync(pagePath, 'utf8'));
|
||||
}
|
||||
|
||||
// Remove the bin directory
|
||||
console.log('\nRemoving bin directory...');
|
||||
const binPath = path.join(projectPath, 'bin');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "create-neynar-farcaster-frame",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"bin/index.js"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user