Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

46 changes: 0 additions & 46 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ tmpanalogapp*
vite.config.*.timestamp*
.vite-inspect
vitest.config.*.timestamp*
gradle.properties
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ pnpm-lock.yaml
/packages/create-analog/template-*
.vite-inspect
.all-contributorsrc
.cursor/rules/nx-rules.mdc
17 changes: 0 additions & 17 deletions apps/analog-app-e2e-cypress/.eslintrc.json

This file was deleted.

30 changes: 30 additions & 0 deletions apps/analog-app-e2e-cypress/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { FlatCompat } from '@eslint/eslintrc';
import { dirname } from 'path';
import { fileURLToPath } from 'url';
import js from '@eslint/js';
import baseConfig from '../../eslint.config.mjs';

const compat = new FlatCompat({
baseDirectory: dirname(fileURLToPath(import.meta.url)),
recommendedConfig: js.configs.recommended,
});

export default [
{
ignores: ['**/dist'],
},
...baseConfig,
...compat.extends('plugin:cypress/recommended'),
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
{
files: ['src/plugins/index.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'no-undef': 'off',
},
},
];
21 changes: 0 additions & 21 deletions apps/analog-app-e2e-playwright/.eslintrc.json

This file was deleted.

23 changes: 23 additions & 0 deletions apps/analog-app-e2e-playwright/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import baseConfig from '../../eslint.config.mjs';

export default [
{
ignores: ['**/dist'],
},
...baseConfig,
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
{
files: ['src/plugins/index.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'no-undef': 'off',
},
},
{
ignores: ['**/vite.config.*.timestamp*', '**/vitest.config.*.timestamp*'],
},
];
15 changes: 12 additions & 3 deletions apps/analog-app-e2e-playwright/tests/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,17 @@ afterEach(async () => {
describe('My Store', () => {
test(`Given the user has navigated to the home page
Then the app title is visible`, async () => {
await expect(
page.locator('role=heading[level=1] >> text=My Store'),
).toContain(/My Store/i);
// Wait for the page to be fully loaded and Angular to be ready
await page.waitForLoadState('networkidle');

// Wait for the Angular app to be fully rendered
await page.waitForSelector('analogjs-root');

// Wait for the top bar component to be rendered
await page.waitForSelector('analogjs-top-bar');

// Now check for the heading - use a simpler selector that should work
const heading = page.locator('h1:has-text("My Store")');
await expect(await heading.textContent()).toContain('My Store');
});
});
22 changes: 22 additions & 0 deletions apps/analog-app-e2e-playwright/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"sourceMap": false,
"outDir": "../../dist/out-tsc",
"allowJs": true,
"types": ["node", "vitest/globals"],
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"include": ["tests/**/*.ts", "src/**/*.js"],
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
1 change: 1 addition & 0 deletions apps/analog-app-e2e-playwright/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default defineConfig(({ mode }) => {
globals: true,
environment: 'node',
include: ['**/*.spec.ts'],
testTimeout: 30000, // Increase timeout to 30 seconds for e2e tests
cache: {
dir: `../../node_modules/.vitest`,
},
Expand Down
42 changes: 0 additions & 42 deletions apps/analog-app/.eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions apps/analog-app/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { StorybookConfig } from '@analogjs/storybook-angular';
import type { StorybookConfig } from '@benpsnyder/analogjs-esm-storybook-angular';

const config: StorybookConfig = {
stories: ['../src/**/*.@(mdx|stories.@(js|jsx|ts|tsx))'],
addons: ['@storybook/addon-links', '@storybook/addon-docs'],
framework: {
name: '@analogjs/storybook-angular',
name: '@benpsnyder/analogjs-esm-storybook-angular',
options: {},
},
};
Expand Down
5 changes: 4 additions & 1 deletion apps/analog-app/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import 'zone.js';

import { applicationConfig, type Preview } from '@analogjs/storybook-angular';
import {
applicationConfig,
type Preview,
} from '@benpsnyder/analogjs-esm-storybook-angular';
import { provideNoopAnimations } from '@angular/platform-browser/animations';

// compodoc configuration
Expand Down
4 changes: 2 additions & 2 deletions apps/analog-app/documentation.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"deprecated": false,
"deprecationMessage": "",
"type": "StorybookConfig",
"defaultValue": "{\n stories: ['../src/**/*.@(mdx|stories.@(js|jsx|ts|tsx))'],\n addons: [],\n framework: {\n name: '@analogjs/storybook-angular',\n options: {},\n },\n}"
"defaultValue": "{\n stories: ['../src/**/*.@(mdx|stories.@(js|jsx|ts|tsx))'],\n addons: [],\n framework: {\n name: '@benpsnyder/analogjs-esm-storybook-angular',\n options: {},\n },\n}"
},
{
"name": "Large",
Expand Down Expand Up @@ -188,7 +188,7 @@
"deprecated": false,
"deprecationMessage": "",
"type": "StorybookConfig",
"defaultValue": "{\n stories: ['../src/**/*.@(mdx|stories.@(js|jsx|ts|tsx))'],\n addons: [],\n framework: {\n name: '@analogjs/storybook-angular',\n options: {},\n },\n}"
"defaultValue": "{\n stories: ['../src/**/*.@(mdx|stories.@(js|jsx|ts|tsx))'],\n addons: [],\n framework: {\n name: '@benpsnyder/analogjs-esm-storybook-angular',\n options: {},\n },\n}"
}
],
"apps/analog-app/src/stories/button.stories.ts": [
Expand Down
66 changes: 66 additions & 0 deletions apps/analog-app/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { FlatCompat } from '@eslint/eslintrc';
import { dirname } from 'path';
import { fileURLToPath } from 'url';
import js from '@eslint/js';
import baseConfig from '../../eslint.config.mjs';

const compat = new FlatCompat({
baseDirectory: dirname(fileURLToPath(import.meta.url)),
recommendedConfig: js.configs.recommended,
});

export default [
{
ignores: ['**/dist'],
},
...baseConfig,
...compat
.config({
extends: [
'plugin:@nx/angular',
'plugin:@angular-eslint/template/process-inline-templates',
],
})
.map((config) => ({
...config,
files: ['**/*.ts'],
rules: {
...config.rules,
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'analogjs',
style: 'camelCase',
},
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'analogjs',
style: 'kebab-case',
},
],
'@angular-eslint/prefer-standalone': 'off',
},
})),
...compat
.config({
extends: ['plugin:@nx/angular-template'],
})
.map((config) => ({
...config,
files: ['**/*.html'],
rules: {
...config.rules,
},
})),
{
ignores: [
'**/vite.config.*.timestamp*',
'**/vitest.config.*.timestamp*',
'storybook-static',
],
},
];
6 changes: 3 additions & 3 deletions apps/analog-app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"projectType": "application",
"sourceRoot": "apps/analog-app/src",
"prefix": "analogjs",
"implicitDependencies": ["vitest-angular", "storybook-angular"],
"tags": [],
"implicitDependencies": ["vitest-angular", "storybook-angular"],
"targets": {
"build": {
"executor": "@nx/vite:build",
Expand Down Expand Up @@ -70,7 +70,7 @@
"dependsOn": ["^build"]
},
"storybook": {
"executor": "@analogjs/storybook-angular:start-storybook",
"executor": "@benpsnyder/analogjs-esm-storybook-angular:start-storybook",
"dependsOn": ["^build"],
"options": {
"configDir": "apps/analog-app/.storybook",
Expand All @@ -80,7 +80,7 @@
}
},
"build-storybook": {
"executor": "@analogjs/storybook-angular:build-storybook",
"executor": "@benpsnyder/analogjs-esm-storybook-angular:build-storybook",
"options": {
"configDir": "apps/analog-app/.storybook",
"compodoc": false,
Expand Down
2 changes: 1 addition & 1 deletion apps/analog-app/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
import { TopBarComponent } from '@analogjs/top-bar';
import { TopBarComponent } from '@benpsnyder/analogjs-esm-top-bar';

describe('AppComponent', () => {
beforeEach(async () => {
Expand Down
Loading
Loading