create-definedmotion 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/cli.js +5 -31
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-definedmotion",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Create a new DefinedMotion animation project",
|
|
5
5
|
"author": "Hugo Olsson",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,4 +34,4 @@
|
|
|
34
34
|
"three.js",
|
|
35
35
|
"motion-graphics"
|
|
36
36
|
]
|
|
37
|
-
}
|
|
37
|
+
}
|
package/src/cli.js
CHANGED
|
@@ -3,7 +3,6 @@ import path from 'path';
|
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
import minimist from 'minimist';
|
|
6
|
-
import { execSync } from 'child_process';
|
|
7
6
|
|
|
8
7
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
8
|
const argv = minimist(process.argv.slice(2));
|
|
@@ -32,7 +31,7 @@ async function createProject() {
|
|
|
32
31
|
|
|
33
32
|
// Copy template
|
|
34
33
|
const templateDir = path.join(__dirname, '..', 'template');
|
|
35
|
-
|
|
34
|
+
|
|
36
35
|
console.log(chalk.gray('Creating project structure...'));
|
|
37
36
|
fs.copySync(templateDir, targetDir);
|
|
38
37
|
|
|
@@ -52,44 +51,19 @@ async function createProject() {
|
|
|
52
51
|
|
|
53
52
|
console.log(chalk.green('✓') + ' Project structure created');
|
|
54
53
|
|
|
55
|
-
//
|
|
56
|
-
if (!argv['skip-install']) {
|
|
57
|
-
console.log(chalk.gray('\nInstalling dependencies (this may take a minute)...\n'));
|
|
58
|
-
|
|
59
|
-
try {
|
|
60
|
-
execSync('npm install', {
|
|
61
|
-
cwd: targetDir,
|
|
62
|
-
stdio: 'inherit'
|
|
63
|
-
});
|
|
64
|
-
console.log('\n' + chalk.green('✓') + ' Dependencies installed');
|
|
65
|
-
} catch (error) {
|
|
66
|
-
console.log('\n' + chalk.yellow('⚠') + ' Failed to install dependencies');
|
|
67
|
-
console.log(chalk.gray(' You can install them manually:'));
|
|
68
|
-
console.log(' ' + chalk.cyan(`cd ${projectName}`));
|
|
69
|
-
console.log(' ' + chalk.cyan('npm install'));
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Success message
|
|
54
|
+
// Always skip dependency installation; print next steps instead
|
|
74
55
|
console.log('\n' + chalk.bold.green('✨ Success!') + ' Created ' + chalk.cyan(projectName));
|
|
75
56
|
console.log('\n' + chalk.bold('Next steps:'));
|
|
76
57
|
console.log(chalk.gray('\n Navigate to your project:'));
|
|
77
58
|
console.log(' ' + chalk.cyan(`cd ${projectName}`));
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
console.log(chalk.gray('\n Install dependencies:'));
|
|
81
|
-
console.log(' ' + chalk.cyan('npm install'));
|
|
82
|
-
}
|
|
83
|
-
|
|
59
|
+
console.log(chalk.gray('\n Install dependencies:'));
|
|
60
|
+
console.log(' ' + chalk.cyan('npm install'));
|
|
84
61
|
console.log(chalk.gray('\n Start development:'));
|
|
85
62
|
console.log(' ' + chalk.cyan('npm run dev'));
|
|
86
|
-
|
|
87
63
|
console.log(chalk.gray('\n Create your animations in:'));
|
|
88
64
|
console.log(' ' + chalk.cyan('src/renderer/src/scenes/'));
|
|
89
|
-
|
|
90
65
|
console.log('\n' + chalk.gray('Need help? Check out the docs:'));
|
|
91
66
|
console.log(' ' + chalk.cyan('https://github.com/HugoOlsson/DefinedMotion'));
|
|
92
|
-
|
|
93
67
|
console.log('\n' + chalk.bold('Happy animating! 🚀\n'));
|
|
94
68
|
}
|
|
95
69
|
|
|
@@ -97,4 +71,4 @@ async function createProject() {
|
|
|
97
71
|
createProject().catch(error => {
|
|
98
72
|
console.error(chalk.red('Error:'), error.message);
|
|
99
73
|
process.exit(1);
|
|
100
|
-
});
|
|
74
|
+
});
|