Skip to content

Commit

Permalink
feat(angular): partial ivy build (#4834)
Browse files Browse the repository at this point in the history
* feat(angular): partial ivy build

* fix(angular): imports
  • Loading branch information
vltansky committed Aug 18, 2021
1 parent e641fd2 commit e86b2b3
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion playground/angular/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import SwiperCore, {
Autoplay,
Thumbs,
Controller,
} from '../../../../../build/core';
} from 'swiper';

SwiperCore.use([
Navigation,
Expand Down
19 changes: 14 additions & 5 deletions src/angular/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,25 @@ module.exports = function (config) {
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-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
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage/angular'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true,
jasmineHtmlReporter: {
suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, '../../coverage/swiper'),
subdir: '.',
reporters: [{ type: 'html' }, { type: 'text-summary' }],
},
reporters: ['progress', 'kjhtml'],
port: 9876,
Expand Down
7 changes: 4 additions & 3 deletions src/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "swiper_angular",
"version": "0.0.1",
"private": "true",
"peerDependencies": {
"@angular/common": "^10.1.6",
"@angular/core": "^10.1.6"
"@angular/common": "^12.2.0",
"@angular/core": "^12.2.0"
},
"dependencies": {
"tslib": "^2.0.0"
"tslib": "^2.3.0"
}
}
5 changes: 0 additions & 5 deletions src/angular/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,5 @@
"types": [],
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
2 changes: 1 addition & 1 deletion src/angular/tsconfig.lib.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}
7 changes: 0 additions & 7 deletions src/angular/tslint.json

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"module": "es2020",
"lib": ["es2018", "dom"],
"paths": {
"swiper": ["src"],
"swiper": ["src", "build", "build/swiper.esm.js"],
"swiper/*": ["src/*"]
}
}
Expand Down

0 comments on commit e86b2b3

Please sign in to comment.