Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set angular ts target to ES2015 #24

Merged
merged 3 commits into from
Nov 16, 2023
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 2 additions & 42 deletions angular/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,10 @@
"browser": "src/main.ts",
"outputPath": "dist/demo",
"scripts": [],
"styles": [
"src/global_styles.css"
],
"styles": ["src/global_styles.css"],
"tsConfig": "src/tsconfig.app.json"
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "demo:build"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"exclude": [
"**/node_modules/**"
],
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
]
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
Expand All @@ -66,26 +46,6 @@
}
},
"defaultConfiguration": "development"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"assets": [
"src/favicon.ico",
"src/assets"
],
"karmaConfig": "src/karma.conf.js",
"main": "src/test.ts",
"polyfills": [
"zone.js",
".zone.js/testing"
],
"scripts": [],
"styles": [
"styles.css"
],
"tsConfig": "src/tsconfig.spec.json"
}
}
},
"prefix": "app",
Expand All @@ -96,4 +56,4 @@
}
},
"version": 1
}
}
28 changes: 9 additions & 19 deletions angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
"build": "ng build"
},
"dependencies": {
"@angular/animations": "~17.0.1",
"@angular/common": "~17.0.1",
"@angular/compiler": "~17.0.1",
"@angular/core": "~17.0.1",
"@angular/forms": "~17.0.1",
"@angular/platform-browser": "~17.0.1",
"@angular/router": "~17.0.1",
"@angular/animations": "~17.0.3",
"@angular/common": "~17.0.3",
"@angular/compiler": "~17.0.3",
"@angular/core": "~17.0.3",
"@angular/forms": "~17.0.3",
"@angular/platform-browser": "~17.0.3",
"@angular/router": "~17.0.3",
"rxjs": "^7.8.1",
"tslib": "^2.5.0",
"zone.js": "~0.14.0"
Expand All @@ -25,13 +22,6 @@
"@angular-devkit/build-angular": "~17.0.0",
"@angular/cli": "~17.0.0",
"@angular/compiler-cli": "~17.0.1",
"@types/jasmine": "~4.3.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.2.0"
}
}
}
32 changes: 0 additions & 32 deletions angular/src/karma.conf.js

This file was deleted.

4 changes: 2 additions & 2 deletions angular/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import 'zone.js';
import {Component} from '@angular/core';
import {bootstrapApplication} from '@angular/platform-browser';

@Component({
selector: 'app-root',
Expand Down
9 changes: 0 additions & 9 deletions angular/src/tsconfig.spec.json

This file was deleted.

7 changes: 2 additions & 5 deletions angular/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "ES2022",
"target": "ES2015",
"module": "ES2022",
"useDefineForClassFields": false,
"lib": [
"ES2022",
"dom"
]
"lib": ["ES2022", "dom"]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down
14 changes: 7 additions & 7 deletions nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import './globals.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css';
import type { Metadata } from 'next';
import { Inter } from 'next/font/google';

const inter = Inter({ subsets: ['latin'] })
const inter = Inter({ subsets: ['latin'] });

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}
};

export default function RootLayout({
children,
}: {
children: React.ReactNode
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
)
);
}
4 changes: 2 additions & 2 deletions nextjs/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Image from 'next/image'
import Image from 'next/image';

export default function Home() {
return (
Expand Down Expand Up @@ -109,5 +109,5 @@ export default function Home() {
</a>
</div>
</main>
)
);
}
4 changes: 2 additions & 2 deletions nextjs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {};

module.exports = nextConfig
module.exports = nextConfig;
2 changes: 1 addition & 1 deletion nextjs/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ module.exports = {
tailwindcss: {},
autoprefixer: {},
},
}
};
6 changes: 3 additions & 3 deletions nextjs/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Config } from 'tailwindcss'
import type { Config } from 'tailwindcss';

const config: Config = {
content: [
Expand All @@ -16,5 +16,5 @@ const config: Config = {
},
},
plugins: [],
}
export default config
};
export default config;