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

Remove IntersectionObserver polyfill #2701

Merged
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/dist-lib
/test-reports
*.styles.ts
/libs/designsystem/src/lib/polyfills/*.min.js

# compiled core library output
/libs/core/loader
Expand Down
5 changes: 0 additions & 5 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@
"assets": [
"apps/cookbook/src/favicon.ico",
"apps/cookbook/src/assets",
{
"glob": "**/*.js",
"input": "libs/designsystem/src/lib/polyfills",
"output": "./kirby/polyfills"
},
{
"glob": "**/*",
"input": "src/assets",
Expand Down
1 change: 0 additions & 1 deletion apps/cookbook/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<script src="kirby/polyfills/intersection-observer-polyfill-loader.min.js"></script>
</head>
<body>
<cookbook-root></cookbook-root>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ElementRef, Injectable, NgZone, OnDestroy } from '@angular/core';
import { ElementRef, Injectable, OnDestroy } from '@angular/core';
import { ResizeObserverFactory } from './resize-observer.factory';

@Injectable({ providedIn: 'root' })
Expand Down

This file was deleted.

This file was deleted.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"start:flows:prod": "ng serve flows --configuration production",
"start:core": "npm run build:core -- --dev --watch --serve",
"build": "ng build designsystem",
"build-polyfills": "webpack --config webpack.polyfills.config.js",
"build:core": "stencil build --config=./libs/core/stencil.config.ts",
"build:core:watch": "npm run build:core -- --watch",
"build:flows": "ng build flows",
Expand Down Expand Up @@ -68,7 +67,7 @@
"dist:designsystem": "ng build designsystem",
"dist:core": "npm run build:core -- --docs",
"predist:designsystem": "npm run extract-scss-variables",
"postinstall": "npm run ngcc && npm run build-polyfills && npm run transpile:tools && npm run extract-scss-variables && npm run build:core && npm run transpile:generate-mocks && node ./decorate-angular-cli.js",
"postinstall": "npm run ngcc && npm run transpile:tools && npm run extract-scss-variables && npm run build:core && npm run transpile:generate-mocks && node ./decorate-angular-cli.js",
"transpile:tools": "tsc -b tools/sass-to-ts",
"transpile:generate-mocks": "tsc -b tools/generate-mocks",
"coverage-report": "cat ./coverage/lcov.info | coveralls",
Expand Down Expand Up @@ -166,7 +165,6 @@
"eslint-plugin-prettier": "^4.2.1",
"fs-extra": "^8.1.0",
"husky": "^3.0.9",
"intersection-observer": "0.7.0",
"is-ci": "^2.0.0",
"is-docker": "1.1.0",
"jasmine-core": "4.2.0",
Expand Down
18 changes: 0 additions & 18 deletions scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
//
// The created bundle contains:
// - Transpiled distribution bundle
// - Polyfills (required by kirby)
// - SCSS sources files (containing utilities exposed by kirby)
// - SVG Icons (icons provided / used by kirby)
// - README.md file
Expand Down Expand Up @@ -91,12 +90,6 @@ function buildPackage(npmBuildScript) {
});
}

function buildPolyfills(npmBuildScript) {
return npm(['run', npmBuildScript], {
onFailMessage: 'Unable to build polyfills',
});
}

function enhancePackageJson(distPackageJsonPath) {
return fs.readJson(distPackageJsonPath, 'utf-8').then((packageJson) => {
// Modify contents
Expand Down Expand Up @@ -162,15 +155,6 @@ function copyIcons(libSrcDir, distTarget) {
});
}

function copyPolyfills(libSrcDir, distTarget) {
console.log('Copying Polyfills...');
const onlyLoadersAndMinified = (input) =>
path.extname(input) === '' || input.endsWith('-loader.js') || input.endsWith('.min.js');
return fs.copy(`${libSrcDir}/polyfills`, `${distTarget}/polyfills`, {
filter: onlyLoadersAndMinified,
});
}

function copyCoreDistributionFiles(coreLibDir, distTarget) {
console.log('Copying core distribution files...');

Expand Down Expand Up @@ -228,13 +212,11 @@ if (doPublishDesignsystem) {
// Publish designsystem
console.log('--- Publishing designsystem ---');
cleanDistribution(distDesignsystemTarget)
.then(() => buildPolyfills('build-polyfills'))
.then(() => buildPackage('dist:designsystem'))
.then(() => enhancePackageJson(distDesignsystemPackageJsonPath))
.then(() => copyReadme(distDesignsystemTarget))
.then(() => createScssCoreForwardFiles(coreLibSrcDir, [`${distDesignsystemTarget}/scss`]))
.then(() => copyIcons(designsystemLibSrcDir, distDesignsystemTarget))
.then(() => copyPolyfills(designsystemLibSrcDir, distDesignsystemTarget))
.then(() => publish(distDesignsystemTarget, 'kirbydesign-designsystem'))
.catch((err) => console.warn('*** ERROR WHEN PUBLISHING DESIGNSYSTEM ***', err));
}
Expand Down
29 changes: 0 additions & 29 deletions webpack.polyfills.config.js

This file was deleted.