git commit -m "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 dev, strata build, strata g (generators)
- create-strata 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:
80
templates/strataconfig.ts
Normal file
80
templates/strataconfig.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
import { defineConfig } from 'strata';
|
||||
|
||||
export default defineConfig({
|
||||
// Application settings
|
||||
app: {
|
||||
title: 'My Strata App',
|
||||
description: 'Built with Strata Framework',
|
||||
baseUrl: '/',
|
||||
},
|
||||
|
||||
// Build configuration
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
assetsDir: 'assets',
|
||||
minify: true,
|
||||
sourcemap: process.env.NODE_ENV !== 'production',
|
||||
target: 'es2020',
|
||||
},
|
||||
|
||||
// Islands architecture
|
||||
islands: {
|
||||
hydration: 'visible', // 'load' | 'visible' | 'idle' | 'interaction'
|
||||
threshold: 0.1,
|
||||
},
|
||||
|
||||
// State management
|
||||
state: {
|
||||
devtools: process.env.NODE_ENV !== 'production',
|
||||
persist: true,
|
||||
encrypt: true, // Enable store encryption
|
||||
},
|
||||
|
||||
// API configuration
|
||||
api: {
|
||||
baseUrl: process.env.API_URL || 'http://localhost:8080',
|
||||
cache: {
|
||||
enabled: true,
|
||||
defaultTTL: '5m',
|
||||
maxSize: 100,
|
||||
},
|
||||
rateLimit: {
|
||||
maxRequests: 15000,
|
||||
perDay: true,
|
||||
strategy: 'queue',
|
||||
},
|
||||
},
|
||||
|
||||
// SCSS configuration
|
||||
scss: {
|
||||
includePaths: ['src/assets/styles'],
|
||||
additionalData: `
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
`,
|
||||
},
|
||||
|
||||
// Auto-detected aliases (can override here)
|
||||
aliases: {
|
||||
'@': './src',
|
||||
'@components': './src/components',
|
||||
'@pages': './src/pages',
|
||||
'@stores': './src/stores',
|
||||
'@utils': './src/utils',
|
||||
'@assets': './src/assets',
|
||||
},
|
||||
|
||||
// Microfrontends (optional)
|
||||
microfrontends: {
|
||||
enabled: false,
|
||||
shared: ['strata'],
|
||||
remotes: {},
|
||||
},
|
||||
|
||||
// Injected scripts (GTM, analytics, etc.)
|
||||
// Scripts are loaded from src/injectedscripts/*.js
|
||||
scripts: {
|
||||
// Override positions/priorities if needed
|
||||
// 'gtm': { position: 'head', priority: 1 },
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user