@mtldev514/retro-portfolio-engine 1.0.0 → 1.1.2
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/.github/workflows/build-and-deploy.yml +105 -0
- package/ADMIN_SETUP.md +306 -0
- package/README.md +193 -301
- package/USAGE.md +451 -0
- package/build.sh +326 -0
- package/index.html +85 -0
- package/js/manifest-loader.js +313 -0
- package/manifest.json +74 -0
- package/package.json +14 -38
- package/setup-admin.sh +134 -0
- package/sync-after-admin.sh +58 -0
- package/bin/cli.js +0 -103
- package/engine/admin/admin.css +0 -720
- package/engine/admin/admin.html +0 -801
- package/engine/admin/admin_api.py +0 -230
- package/engine/admin/scripts/backup.sh +0 -116
- package/engine/admin/scripts/config_loader.py +0 -180
- package/engine/admin/scripts/init.sh +0 -141
- package/engine/admin/scripts/manager.py +0 -308
- package/engine/admin/scripts/restore.sh +0 -121
- package/engine/admin/scripts/server.py +0 -41
- package/engine/admin/scripts/update.sh +0 -321
- package/engine/admin/scripts/validate_json.py +0 -62
- package/engine/fonts.css +0 -37
- package/engine/index.html +0 -190
- package/engine/js/config-loader.js +0 -370
- package/engine/js/config.js +0 -173
- package/engine/js/counter.js +0 -17
- package/engine/js/effects.js +0 -97
- package/engine/js/i18n.js +0 -68
- package/engine/js/init.js +0 -107
- package/engine/js/media.js +0 -264
- package/engine/js/render.js +0 -282
- package/engine/js/router.js +0 -133
- package/engine/js/sparkle.js +0 -123
- package/engine/js/themes.js +0 -607
- package/engine/style.css +0 -2037
- package/index.js +0 -35
- package/scripts/admin.js +0 -67
- package/scripts/build.js +0 -142
- package/scripts/init.js +0 -237
- package/scripts/post-install.js +0 -16
- package/scripts/serve.js +0 -54
- package/templates/user-portfolio/.github/workflows/deploy.yml +0 -57
- package/templates/user-portfolio/config/app.json +0 -36
- package/templates/user-portfolio/config/categories.json +0 -241
- package/templates/user-portfolio/config/languages.json +0 -15
- package/templates/user-portfolio/config/media-types.json +0 -59
- package/templates/user-portfolio/data/painting.json +0 -3
- package/templates/user-portfolio/data/projects.json +0 -3
- package/templates/user-portfolio/lang/en.json +0 -114
- package/templates/user-portfolio/lang/fr.json +0 -114
package/bin/cli.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Retro Portfolio CLI
|
|
5
|
-
* Main command-line interface for the package
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const { Command } = require('commander');
|
|
9
|
-
const chalk = require('chalk');
|
|
10
|
-
const path = require('path');
|
|
11
|
-
const fs = require('fs-extra');
|
|
12
|
-
|
|
13
|
-
const program = new Command();
|
|
14
|
-
|
|
15
|
-
// Import scripts
|
|
16
|
-
const build = require('../scripts/build');
|
|
17
|
-
const serve = require('../scripts/serve');
|
|
18
|
-
const admin = require('../scripts/admin');
|
|
19
|
-
const init = require('../scripts/init');
|
|
20
|
-
|
|
21
|
-
program
|
|
22
|
-
.name('retro-portfolio')
|
|
23
|
-
.description('Retro Portfolio Site Engine')
|
|
24
|
-
.version(require('../package.json').version);
|
|
25
|
-
|
|
26
|
-
// Init command - Create new portfolio
|
|
27
|
-
program
|
|
28
|
-
.command('init [directory]')
|
|
29
|
-
.description('Initialize a new portfolio with data templates')
|
|
30
|
-
.option('-f, --force', 'Overwrite existing files')
|
|
31
|
-
.action(async (directory, options) => {
|
|
32
|
-
try {
|
|
33
|
-
await init(directory || '.', options);
|
|
34
|
-
} catch (error) {
|
|
35
|
-
console.error(chalk.red('Error:'), error.message);
|
|
36
|
-
process.exit(1);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
// Build command - Generate static site
|
|
41
|
-
program
|
|
42
|
-
.command('build')
|
|
43
|
-
.description('Build the static site from your data')
|
|
44
|
-
.option('-o, --output <dir>', 'Output directory', 'dist')
|
|
45
|
-
.option('-w, --watch', 'Watch for changes and rebuild')
|
|
46
|
-
.action(async (options) => {
|
|
47
|
-
try {
|
|
48
|
-
await build(options);
|
|
49
|
-
} catch (error) {
|
|
50
|
-
console.error(chalk.red('Error:'), error.message);
|
|
51
|
-
process.exit(1);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
// Serve command - Local development server
|
|
56
|
-
program
|
|
57
|
-
.command('dev')
|
|
58
|
-
.alias('serve')
|
|
59
|
-
.description('Start local development server')
|
|
60
|
-
.option('-p, --port <number>', 'Port number', '8000')
|
|
61
|
-
.option('-o, --open', 'Open browser automatically')
|
|
62
|
-
.action(async (options) => {
|
|
63
|
-
try {
|
|
64
|
-
await serve(options);
|
|
65
|
-
} catch (error) {
|
|
66
|
-
console.error(chalk.red('Error:'), error.message);
|
|
67
|
-
process.exit(1);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
// Admin command - Launch admin interface
|
|
72
|
-
program
|
|
73
|
-
.command('admin')
|
|
74
|
-
.description('Start admin interface for managing content')
|
|
75
|
-
.option('-p, --port <number>', 'Port number', '5001')
|
|
76
|
-
.option('-o, --open', 'Open browser automatically')
|
|
77
|
-
.action(async (options) => {
|
|
78
|
-
try {
|
|
79
|
-
await admin(options);
|
|
80
|
-
} catch (error) {
|
|
81
|
-
console.error(chalk.red('Error:'), error.message);
|
|
82
|
-
process.exit(1);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
// Deploy command - Deploy to GitHub Pages
|
|
87
|
-
program
|
|
88
|
-
.command('deploy')
|
|
89
|
-
.description('Deploy site to GitHub Pages')
|
|
90
|
-
.option('-b, --branch <name>', 'Deployment branch', 'gh-pages')
|
|
91
|
-
.option('-d, --dir <path>', 'Build directory', 'dist')
|
|
92
|
-
.action(async (options) => {
|
|
93
|
-
console.log(chalk.yellow('Deploy command coming soon!'));
|
|
94
|
-
console.log('For now, use GitHub Actions or push dist/ manually.');
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
// Parse arguments
|
|
98
|
-
program.parse(process.argv);
|
|
99
|
-
|
|
100
|
-
// Show help if no command provided
|
|
101
|
-
if (!process.argv.slice(2).length) {
|
|
102
|
-
program.outputHelp();
|
|
103
|
-
}
|