@squeditor/squeditor-framework 1.0.0 → 1.0.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/README.md +6 -11
- package/package.json +2 -2
- package/scripts/scaffold.js +15 -3
package/README.md
CHANGED
|
@@ -45,21 +45,16 @@ Every project includes an automatically generated `style-guide.php` page that re
|
|
|
45
45
|
|
|
46
46
|
## 🏁 Getting Started
|
|
47
47
|
|
|
48
|
-
### 1.
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
git clone https://github.com/unistudioco/squeditor-framework.git
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### 2. Scaffold a New Project
|
|
55
|
-
Squeditor includes a robust CLI scaffolding tool. It generates a completely clean, minimalist `project-template/` instance next to the core framework, fully pre-configured to utilize the advanced GSAP and UIKit engines without demo bloat.
|
|
48
|
+
### 1. Scaffold a New Project
|
|
49
|
+
Squeditor includes a robust CLI scaffolding tool. It generates a completely clean, minimalist project instance fully pre-configured to utilize the advanced GSAP and UIKit engines without demo bloat.
|
|
56
50
|
|
|
57
|
-
To scaffold your new project
|
|
51
|
+
To scaffold your new project, simply run the following command in your terminal:
|
|
58
52
|
```bash
|
|
59
|
-
npx squeditor-framework your-project-name
|
|
53
|
+
npx @squeditor/squeditor-framework your-project-name
|
|
60
54
|
```
|
|
55
|
+
*(Replace `your-project-name` with your desired folder name).*
|
|
61
56
|
|
|
62
|
-
###
|
|
57
|
+
### 2. Development
|
|
63
58
|
Navigate into your newly generated project folder, install its dependencies, and start the development server:
|
|
64
59
|
```bash
|
|
65
60
|
cd your-project-name
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squeditor/squeditor-framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Squeditor Framework is a high-performance, developer-first framework for building lightning-fast, static websites. It combines the power of PHP-style templating with the modern performance of Tailwind CSS, the interactivity of UIKit 3, and the speed of Vite.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/unistudioco/squeditor-framework#readme",
|
|
33
33
|
"bin": {
|
|
34
|
-
"squeditor": "./scripts/scaffold.js"
|
|
34
|
+
"@squeditor/squeditor-framework": "./scripts/scaffold.js"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/scripts/scaffold.js
CHANGED
|
@@ -26,17 +26,17 @@ if (fs.existsSync(targetDir)) {
|
|
|
26
26
|
process.exit(1);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function copyDirectory(src, dest) {
|
|
29
|
+
function copyDirectory(src, dest, ignoreList = []) {
|
|
30
30
|
fs.mkdirSync(dest, { recursive: true });
|
|
31
31
|
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
32
32
|
|
|
33
33
|
for (const entry of entries) {
|
|
34
|
-
if (entry.name === '.DS_Store') continue;
|
|
34
|
+
if (entry.name === '.DS_Store' || ignoreList.includes(entry.name)) continue;
|
|
35
35
|
const srcPath = path.join(src, entry.name);
|
|
36
36
|
const destPath = path.join(dest, entry.name);
|
|
37
37
|
|
|
38
38
|
if (entry.isDirectory()) {
|
|
39
|
-
copyDirectory(srcPath, destPath);
|
|
39
|
+
copyDirectory(srcPath, destPath, ignoreList);
|
|
40
40
|
} else {
|
|
41
41
|
// Must use copyFileSync to preserve binary data (fonts, images)
|
|
42
42
|
fs.copyFileSync(srcPath, destPath);
|
|
@@ -45,6 +45,18 @@ function copyDirectory(src, dest) {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
console.log(`[Squeditor] Scaffolding new project: ${projectName}...`);
|
|
48
|
+
|
|
49
|
+
// 1. Copy the framework core
|
|
50
|
+
const frameworkSourceDir = path.join(__dirname, '..');
|
|
51
|
+
const frameworkTargetDir = path.resolve(process.cwd(), 'squeditor-framework');
|
|
52
|
+
|
|
53
|
+
if (!fs.existsSync(frameworkTargetDir)) {
|
|
54
|
+
console.log(`[Squeditor] Installing local framework core at ./squeditor-framework...`);
|
|
55
|
+
const ignoreCoreList = ['project-template', 'showcase', 'node_modules', '.git', '.github'];
|
|
56
|
+
copyDirectory(frameworkSourceDir, frameworkTargetDir, ignoreCoreList);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// 2. Copy the project template
|
|
48
60
|
copyDirectory(sourceDir, targetDir);
|
|
49
61
|
|
|
50
62
|
// Update package.json name
|