Skip to content

Commit

Permalink
feat: migrate to analogjs
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-ub committed Jul 24, 2024
1 parent 1118eb9 commit 32da88b
Show file tree
Hide file tree
Showing 57 changed files with 7,511 additions and 4,518 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ Thumbs.db

.nx/cache
.nx/workspace-data

apps/www/public/registry
36 changes: 36 additions & 0 deletions apps/www/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts"],
"extends": [
"plugin:@nx/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "Www",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "www",
"style": "kebab-case"
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@nx/nx/angular-template"],
"rules": {}
}
]
}
21 changes: 0 additions & 21 deletions apps/www/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions apps/www/.vscode/extensions.json

This file was deleted.

11 changes: 0 additions & 11 deletions apps/www/.vscode/launch.json

This file was deleted.

35 changes: 0 additions & 35 deletions apps/www/astro.config.mjs

This file was deleted.

41 changes: 41 additions & 0 deletions apps/www/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>shadcn-ng</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="stylesheet" href="/src/styles.css" />
<script>
if (localStorage.theme !== "default") {
if (document && document.body) {
document.body.classList.add("theme-" + localStorage.theme);
}
}
if (localStorage.darkMode === "dark") {
if (document && document.documentElement) {
document.documentElement.classList.add("dark");
}
} else if (localStorage.darkMode === "light") {
if (document && document.documentElement) {
document.documentElement.classList.remove("dark");
localStorage.setItem("darkMode", "light");
}
} else if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
localStorage.setItem("darkMode", "system");
if (document && document.documentElement) {
document.documentElement.classList.add("dark");
}
} else {
if (document && document.documentElement) {
document.documentElement.classList.remove("dark");
}
}
</script>
</head>
<body class="min-h-screen bg-background font-sans antialiased">
<www-root></www-root>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
46 changes: 1 addition & 45 deletions apps/www/package.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,3 @@
{
"name": "www",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@analogjs/astro-angular": "^1.6.3",
"@angular-devkit/build-angular": "^18.1.1",
"@angular/animations": "^18.1.1",
"@angular/cdk": "^18.1.1",
"@angular/common": "^18.1.1",
"@angular/compiler": "^18.1.1",
"@angular/compiler-cli": "^18.1.1",
"@angular/core": "^18.1.1",
"@angular/language-service": "^18.1.1",
"@angular/platform-browser": "^18.1.1",
"@angular/platform-browser-dynamic": "^18.1.1",
"@angular/platform-server": "^18.1.1",
"@astrojs/check": "^0.8.2",
"@astrojs/starlight": "^0.25.2",
"@astrojs/starlight-tailwind": "^2.0.3",
"@astrojs/tailwind": "^5.1.0",
"@radix-ng/primitives": "^0.8.2",
"astro": "^4.12.2",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lodash.template": "^4.5.0",
"lucide-angular": "^0.414.0",
"rxjs": "^7.8.1",
"sharp": "^0.32.5",
"tailwind-merge": "^2.4.0",
"tailwindcss": "^3.4.4",
"tslib": "^2.6.3",
"typescript": "^5.5.3",
"zone.js": "^0.14.8"
},
"devDependencies": {
"@types/lodash.template": "^4.5.1"
}
"type": "module"
}
10 changes: 10 additions & 0 deletions apps/www/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const { join } = require('node:path');

module.exports = {
plugins: {
tailwindcss: {
config: join(__dirname, 'tailwind.config.cjs')
},
autoprefixer: {}
}
};
63 changes: 63 additions & 0 deletions apps/www/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "www",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"targets": {
"build-registry": {
"executor": "nx:run-commands",
"options": {
"cwd": "apps/www",
"command": "tsx --tsconfig tsconfig.scripts.json scripts/build-registry.mts"
}
},
"build": {
"executor": "@analogjs/platform:vite",
"defaultConfiguration": "production",
"dependsOn": ["build-registry"],
"configurations": {
"development": {
"mode": "development"
},
"production": {
"sourcemap": false,
"mode": "production"
}
},
"outputs": [
"{options.outputPath}",
"{workspaceRoot}/dist/apps/www/.nitro",
"{workspaceRoot}/dist/apps/www/ssr",
"{workspaceRoot}/dist/apps/www/analog"
],
"options": {
"main": "apps/www/src/main.ts",
"configFile": "apps/www/vite.config.ts",
"outputPath": "dist/apps/www/client",
"tsConfig": "apps/www/tsconfig.app.json"
}
},
"serve": {
"executor": "@analogjs/platform:vite-dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "www:build",
"port": 4200
},
"configurations": {
"development": {
"buildTarget": "www:build:development",
"hmr": true
},
"production": {
"buildTarget": "www:build:production"
}
}
},
"test": {
"executor": "@analogjs/vitest-angular:test",
"outputs": ["{projectRoot}/coverage"]
}
},
"tags": [],
"sourceRoot": "apps/www/src"
}
Binary file added apps/www/public/favicon.ico
Binary file not shown.
47 changes: 0 additions & 47 deletions apps/www/public/schema.json

This file was deleted.

Loading

0 comments on commit 32da88b

Please sign in to comment.