Skip to content

Commit

Permalink
Merge pull request #35 from ng-turkey/feature/ivy-support
Browse files Browse the repository at this point in the history
Ivy support
  • Loading branch information
mehmet-erim authored Nov 3, 2021
2 parents 2d8d7bd + af23cf3 commit 81005b1
Show file tree
Hide file tree
Showing 56 changed files with 6,081 additions and 4,712 deletions.
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100
}
153 changes: 139 additions & 14 deletions angular.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,159 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": {
"analytics": false
},
"version": 1,
"newProjectRoot": "",
"newProjectRoot": "projects",
"projects": {

"ngx-context": {
"root": "",
"sourceRoot": "src",
"projectType": "library",
"root": "projects/ngx-context",
"sourceRoot": "projects/ngx-context/src",
"prefix": "context",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "src/tsconfig.lib.json",
"project": "src/ng-package.json"
}
"project": "projects/ngx-context/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/ngx-context/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/ngx-context/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js"
"main": "projects/ngx-context/src/test.ts",
"tsConfig": "projects/ngx-context/tsconfig.spec.json",
"karmaConfig": "projects/ngx-context/karma.conf.js"
}
}
}
},
"demo-app": {
"projectType": "application",
"schematics": {
"@schematics/angular:class": {
"skipTests": true
},
"@schematics/angular:component": {
"skipTests": true
},
"@schematics/angular:directive": {
"skipTests": true
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"@schematics/angular:guard": {
"skipTests": true
},
"@schematics/angular:interceptor": {
"skipTests": true
},
"@schematics/angular:pipe": {
"skipTests": true
},
"@schematics/angular:service": {
"skipTests": true
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "projects/demo-app",
"sourceRoot": "projects/demo-app/src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/demo-app",
"index": "projects/demo-app/src/index.html",
"main": "projects/demo-app/src/main.ts",
"polyfills": "projects/demo-app/src/polyfills.ts",
"tsConfig": "projects/demo-app/tsconfig.app.json",
"assets": [
"projects/demo-app/src/favicon.ico",
"projects/demo-app/src/assets"
],
"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.min.css",
"projects/demo-app/src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "projects/demo-app/src/environments/environment.ts",
"with": "projects/demo-app/src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "demo-app:build:production"
},
"development": {
"browserTarget": "demo-app:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "demo-app:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": ["src/tsconfig.lib.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
"main": "projects/demo-app/src/test.ts",
"polyfills": "projects/demo-app/src/polyfills.ts",
"tsConfig": "projects/demo-app/tsconfig.spec.json",
"karmaConfig": "projects/demo-app/karma.conf.js",
"assets": [
"projects/demo-app/src/favicon.ico",
"projects/demo-app/src/assets"
],
"styles": [
"projects/demo-app/src/styles.css"
],
"scripts": []
}
}
}
Expand Down
74 changes: 37 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,58 @@
"version": "1.1.2",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"start": "ng serve demo-app",
"build": "ng build ngx-context --configuration production",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"ci-test": "ng test --code-coverage --watch=false",
"release": "cp README.md dist/ngx-context/README.md && cd dist/ngx-context && npm publish && cd ../..",
"verdaccio": "cd dist/ngx-context && npm publish --registry http://localhost:4873 && cd ../..",
"unverdaccio": "cd dist/ngx-context && npm unpublish --registry http://localhost:4873 --force && cd ../.."
"ci-test": "ng test ngx-context --code-coverage --watch=false",
"release": "yarn build && cp README.md dist/ngx-context/README.md && cd dist/ngx-context && npm publish && cd ../..",
"verdaccio": "yarn build && cd dist/ngx-context && npm publish --registry http://localhost:4873 && cd ../..",
"unverdaccio": "cd dist/ngx-context && npm unpublish --registry http://localhost:4873 --force && cd ../..",
"compile:ivy": "yarn ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points --tsconfig './tsconfig.prod.json' --source node_modules",
"postinstall": "yarn compile:ivy"
},
"private": true,
"dependencies": {
"@angular/animations": "~7.2.0",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "~7.2.0",
"@angular/animations": "~12.2.4",
"@angular/common": "~12.2.4",
"@angular/compiler": "~12.2.4",
"@angular/core": "~12.2.4",
"@angular/forms": "~12.2.4",
"@angular/platform-browser": "~12.2.4",
"@angular/platform-browser-dynamic": "~12.2.4",
"@angular/router": "~12.2.4",
"core-js": "^2.5.4",
"rxjs": "~6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
"rxjs": "~7.3.0",
"tslib": "^2.3.1",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.0",
"@angular-devkit/build-ng-packagr": "~0.13.0",
"@angular/cli": "~7.3.1",
"@angular/compiler-cli": "~7.2.0",
"@angular/language-service": "~7.2.0",
"@angular-devkit/build-angular": "~12.2.4",
"@angular-devkit/build-ng-packagr": "~0.1002.0",
"@angular/cli": "~12.2.4",
"@angular/compiler-cli": "~12.2.4",
"@angular/language-service": "~12.2.4",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"bootstrap": "^4.6.0",
"codecov": "^3.7.1",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"ng-packagr": "^4.2.0",
"protractor": "~5.4.0",
"jasmine-core": "~3.7.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^12.2.1",
"ngx-bootstrap": "^7.0.0",
"prettier": "^2.3.2",
"protractor": "~7.0.0",
"ts-node": "~7.0.0",
"tsickle": ">=0.34.0",
"tslib": "^1.9.0",
"tslint": "~5.11.0",
"typescript": "~3.2.2"
},
"resolutions": {
"fstream": "^1.0.12"
"tslint": "~6.1.3",
"typescript": "~4.3.5"
}
}
17 changes: 17 additions & 0 deletions projects/demo-app/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
44 changes: 44 additions & 0 deletions projects/demo-app/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, '../../coverage/demo-app'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};
10 changes: 10 additions & 0 deletions projects/demo-app/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

const routes: Routes = [];

@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
Loading

0 comments on commit 81005b1

Please sign in to comment.