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 210fcf1
Show file tree
Hide file tree
Showing 63 changed files with 8,181 additions and 4,283 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
35 changes: 35 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
}
]
}
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

.angular
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/.nx/cache
/.nx/workspace-data
.angular
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
5 changes: 1 addition & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"recommendations": [

"nrwl.angular-console"
]
"recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode"]
}
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": {}
}
]
}
55 changes: 40 additions & 15 deletions apps/www/.gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,46 @@
# build output
dist/
# generated types
.astro/
# See http://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
node_modules/
# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# environment variables
.env
.env.production
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# macOS-specific files
# Miscellaneous
/.angular/cache
/.nx/cache
/.nx/workspace-data
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db

public/registry
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>
72 changes: 39 additions & 33 deletions apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,51 @@
"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",
"@analogjs/content": "^1.6.3",
"@analogjs/router": "^1.6.3",
"@angular/animations": "^18.0.0",
"@angular/cdk": "^18.1.2",
"@angular/common": "^18.0.0",
"@angular/compiler": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/forms": "^18.0.0",
"@angular/platform-browser": "^18.0.0",
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/platform-server": "^18.0.0",
"@angular/router": "^18.0.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"front-matter": "^4.0.2",
"lodash.template": "^4.5.0",
"lucide-angular": "^0.414.0",
"rxjs": "^7.8.1",
"sharp": "^0.32.5",
"marked": "^7.0.0",
"marked-gfm-heading-id": "^3.1.0",
"marked-mangle": "^1.1.7",
"marked-shiki": "^1.1.0",
"rimraf": "^6.0.1",
"rxjs": "~7.5.6",
"shiki": "^1.6.1",
"tailwind-merge": "^2.4.0",
"tailwindcss": "^3.4.4",
"tslib": "^2.6.3",
"typescript": "^5.5.3",
"zone.js": "^0.14.8"
"tailwindcss-animate": "^1.0.7",
"tslib": "^2.4.0",
"zod": "^3.20.2",
"zone.js": "~0.14.0"
},
"devDependencies": {
"@types/lodash.template": "^4.5.1"
"@analogjs/platform": "^1.6.3",
"@analogjs/vite-plugin-angular": "^1.6.3",
"@analogjs/vitest-angular": "^1.6.3",
"@angular-devkit/build-angular": "^18.0.0",
"@angular/cli": "^18.0.0",
"@angular/compiler-cli": "^18.0.0",
"@types/lodash.template": "^4.5.1",
"@types/node": "^20.14.12",
"autoprefixer": "^10.4.14",
"jsdom": "^22.1.0",
"postcss": "^8.4.21",
"tailwindcss": "^3.3.1",
"typescript": "~5.4.2",
"vite": "^5.0.0",
"vitest": "^1.3.1"
}
}
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: {},
},
};
Loading

0 comments on commit 210fcf1

Please sign in to comment.