feat: initial release of Strata framework v0.1.0
- Static compiler with STRC pattern (Static Template Resolution with
Compartmentalized Layers)
- Template syntax: { } interpolation, { s-for }, { s-if/s-elif/s-else
}
- File types: .strata, .compiler.sts, .service.sts, .api.sts, .sts,
.scss
- CLI tools: strata-compile dev, strata-compile build, strata-compile
g (generators)
- create-strata-compile scaffolding CLI with Pokemon API example
- Dev server with WebSocket HMR (Hot Module Replacement)
- Documentation: README, ARCHITECTURE, CHANGELOG, CONTRIBUTING,
LICENSE
This commit is contained in:
@@ -11,26 +11,26 @@ const template = templateArg ? templateArg.split('=')[1] : 'pokemon';
|
||||
|
||||
if (!projectName || projectName === '--help' || projectName === '-h') {
|
||||
console.log(`
|
||||
create-strata - Create a new Strata project
|
||||
create-strata-compile - Create a new Strata project
|
||||
|
||||
Usage:
|
||||
npx create-strata <project-name> [options]
|
||||
npx create-strata-compile <project-name> [options]
|
||||
|
||||
Options:
|
||||
--template=<name> Use a specific template (default: pokemon)
|
||||
Available: pokemon, minimal
|
||||
|
||||
Examples:
|
||||
npx create-strata my-app
|
||||
npx create-strata my-app --template=minimal
|
||||
npx create-strata-compile my-app
|
||||
npx create-strata-compile my-app --template=minimal
|
||||
|
||||
CLI Generator Commands (after project creation):
|
||||
strata g component <Name> Create component with all files
|
||||
strata g page <name> Create page with all files
|
||||
strata g service <name> Create service file
|
||||
strata g api <name> Create API contract file
|
||||
strata g util <name> Create utility file
|
||||
strata g store <name> Create store definition
|
||||
strata-compile g component <Name> Create component with all files
|
||||
strata-compile g page <name> Create page with all files
|
||||
strata-compile g service <name> Create service file
|
||||
strata-compile g api <name> Create API contract file
|
||||
strata-compile g util <name> Create utility file
|
||||
strata-compile g store <name> Create store definition
|
||||
|
||||
File Structure:
|
||||
.strata → Template (HTML structure only)
|
||||
@@ -93,9 +93,9 @@ const packageJson = {
|
||||
version: '0.1.0',
|
||||
private: true,
|
||||
scripts: {
|
||||
dev: '~/.strata/bin/strata dev',
|
||||
build: '~/.strata/bin/strata build',
|
||||
preview: '~/.strata/bin/strata preview',
|
||||
dev: '~/.strata/bin/strata-compile dev',
|
||||
build: '~/.strata/bin/strata-compile build',
|
||||
preview: '~/.strata/bin/strata-compile preview',
|
||||
},
|
||||
devDependencies: {
|
||||
typescript: '^5.3.0',
|
||||
@@ -1041,12 +1041,12 @@ src/
|
||||
### Generate Components
|
||||
|
||||
\`\`\`bash
|
||||
strata g component UserCard # Create component
|
||||
strata g page users # Create page
|
||||
strata g service user # Create service
|
||||
strata g api user # Create API contract
|
||||
strata g util format # Create utility
|
||||
strata g store user # Create store
|
||||
strata-compile g component UserCard # Create component
|
||||
strata-compile g page users # Create page
|
||||
strata-compile g service user # Create service
|
||||
strata-compile g api user # Create API contract
|
||||
strata-compile g util format # Create utility
|
||||
strata-compile g store user # Create store
|
||||
\`\`\`
|
||||
|
||||
## Template Syntax
|
||||
@@ -1114,11 +1114,11 @@ console.log(`
|
||||
npm run dev
|
||||
|
||||
CLI generator commands:
|
||||
strata g component <Name> - Create component
|
||||
strata g page <name> - Create page
|
||||
strata g service <name> - Create service
|
||||
strata g api <name> - Create API contract
|
||||
strata g util <name> - Create utility
|
||||
strata-compile g component <Name> - Create component
|
||||
strata-compile g page <name> - Create page
|
||||
strata-compile g service <name> - Create service
|
||||
strata-compile g api <name> - Create API contract
|
||||
strata-compile g util <name> - Create utility
|
||||
|
||||
Happy coding with Strata!
|
||||
`);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "create-strata",
|
||||
"name": "create-strata-compile",
|
||||
"version": "0.1.0",
|
||||
"description": "Create a new Strata project",
|
||||
"bin": {
|
||||
"create-strata": "./index.js"
|
||||
"create-strata-compile": "./index.js"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
@@ -14,10 +14,11 @@
|
||||
},
|
||||
"keywords": [
|
||||
"strata",
|
||||
"strata-compile",
|
||||
"create",
|
||||
"scaffold",
|
||||
"cli"
|
||||
],
|
||||
"author": "Strata Team",
|
||||
"author": "Carlos Gutierrez (CarGDev)",
|
||||
"license": "MIT"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user