generated from esm-bundle/autopublish-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from esm-bundle/ng13
Upgrade to Angular 13
- Loading branch information
Showing
11 changed files
with
662 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,7 +105,5 @@ dist | |
|
||
esm | ||
system | ||
|
||
# fake stuff | ||
.my-git-credentials | ||
.my-git-credentials-backup | ||
es2015 | ||
es2020 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,5 @@ karma.conf.cjs | |
.nvmrc | ||
.husky | ||
pnpm-lock.yaml | ||
es2015 | ||
es2020 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,77 @@ | ||
# autopublish-template | ||
# angular-service-worker | ||
|
||
[![npm version](https://img.shields.io/npm/v/@esm-bundle/autopublish-template.svg?style=flat)](https://www.npmjs.com/package/@esm-bundle/autopublish-template) [![build status](https://travis-ci.com/esm-bundle/autopublish-template.svg?branch=master)](https://travis-ci.com/esm-bundle/autopublish-template) [![](https://data.jsdelivr.com/v1/package/npm/@esm-bundle/autopublish-template/badge)](https://www.jsdelivr.com/package/npm/@esm-bundle/autopublish-template) | ||
[![npm version](https://img.shields.io/npm/v/@esm-bundle/angular__service-worker.svg?style=flat)](https://www.npmjs.com/package/@esm-bundle/angular__service-worker) [![build status](https://travis-ci.com/esm-bundle/angular__service-worker.svg?branch=master)](https://travis-ci.com/esm-bundle/angular__service-worker) [![](https://data.jsdelivr.com/v1/package/npm/@esm-bundle/angular__service-worker/badge)](https://www.jsdelivr.com/package/npm/@esm-bundle/angular__service-worker) | ||
|
||
["What is this" blog post](https://medium.com/@joeldenning/an-esm-bundle-for-any-npm-package-5f850db0e04d) | ||
|
||
[Instructions for creating a new esm-bundle repo](https://github.com/esm-bundle/new-repo-instructions) | ||
|
||
A repo that tests automatic detection of upstream publishes and the publishing of `@esm-bundle` versions of them. | ||
|
||
Upstream repo at https://github.com/joeldenning/autopublish-template. | ||
## Latest Version | ||
|
||
## JS Delivr | ||
### @angular/service-worker | ||
|
||
https://cdn.jsdelivr.net/npm/@esm-bundle/autopublish-template/esm/index.js | ||
#### ES2015 | ||
|
||
https://cdn.jsdelivr.net/npm/@esm-bundle/autopublish-template/system/index.js | ||
https://cdn.jsdelivr.net/npm/@esm-bundle/angular__service-worker/system/es2015/ivy/angular-service-worker.js | ||
|
||
## Unpkg | ||
https://cdn.jsdelivr.net/npm/@esm-bundle/angular__service-worker/system/es2015/ivy/angular-service-worker.min.js | ||
|
||
https://unpkg.com/@esm-bundle/autopublish-template/esm/index.js | ||
https://unpkg.com/@esm-bundle/angular__service-worker/system/es2015/ivy/angular-service-worker.js | ||
|
||
https://unpkg.com/@esm-bundle/autopublish-template/system/index.js | ||
https://unpkg.com/@esm-bundle/angular__service-worker/system/es2015/ivy/angular-service-worker.min.js | ||
|
||
#### ES2020 | ||
|
||
https://cdn.jsdelivr.net/npm/@esm-bundle/angular__service-worker/system/es2020/ivy/angular-service-worker.js | ||
|
||
https://cdn.jsdelivr.net/npm/@esm-bundle/angular__service-worker/system/es2020/ivy/angular-service-worker.min.js | ||
|
||
https://unpkg.com/@esm-bundle/angular__service-worker/system/es2020/ivy/angular-service-worker.js | ||
|
||
https://unpkg.com/@esm-bundle/angular__service-worker/system/es2020/ivy/angular-service-worker.min.js | ||
|
||
### @angular/service-worker/config | ||
|
||
#### ES2015 | ||
|
||
https://cdn.jsdelivr.net/npm/@esm-bundle/angular__service-worker/system/es2015/ivy/angular-config.js | ||
|
||
https://cdn.jsdelivr.net/npm/@esm-bundle/angular__service-worker/system/es2015/ivy/angular-config.min.js | ||
|
||
https://unpkg.com/@esm-bundle/angular__service-worker/system/es2015/ivy/angular-config.js | ||
|
||
https://unpkg.com/@esm-bundle/angular__service-worker/system/es2015/ivy/angular-config.min.js | ||
|
||
#### ES2020 | ||
|
||
https://cdn.jsdelivr.net/npm/@esm-bundle/angular__service-worker/system/es2020/ivy/angular-config.js | ||
|
||
https://cdn.jsdelivr.net/npm/@esm-bundle/angular__service-worker/system/es2020/ivy/angular-config.min.js | ||
|
||
https://unpkg.com/@esm-bundle/angular__service-worker/system/es2020/ivy/angular-config.js | ||
|
||
https://unpkg.com/@esm-bundle/angular__service-worker/system/es2020/ivy/angular-config.min.js | ||
|
||
## Specific Version | ||
|
||
https://cdn.jsdelivr.net/npm/@esm-bundle/[email protected]/system/es2015/ivy/angular-service-worker.js | ||
|
||
https://cdn.jsdelivr.net/npm/@esm-bundle/[email protected]/system/es2015/ivy/angular-service-worker.min.js | ||
|
||
https://unpkg.com/@esm-bundle/[email protected]/system/es2015/ivy/angular-service-worker.js | ||
|
||
https://unpkg.com/@esm-bundle/[email protected]/system/es2015/ivy/angular-service-worker.min.js | ||
|
||
## Npm | ||
|
||
```sh | ||
npm install --save autopublish-template@npm:@esm-bundle/autopublish-template | ||
npm install --save angular__service-worker@npm:@esm-bundle/angular__service-worker | ||
``` | ||
|
||
## Yarn | ||
|
||
```sh | ||
yarn add autopublish-template@npm:@esm-bundle/autopublish-template | ||
yarn add angular__service-worker@npm:@esm-bundle/angular__service-worker | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
document.head.appendChild( | ||
Object.assign(document.createElement("script"), { | ||
type: "systemjs-importmap", | ||
textContent: ` | ||
{ | ||
"imports": { | ||
"rxjs": "https://cdn.jsdelivr.net/npm/@esm-bundle/rxjs/system/es2015/rxjs.min.js", | ||
"rxjs/operators": "https://cdn.jsdelivr.net/npm/@esm-bundle/rxjs/system/es2015/rxjs-operators.min.js", | ||
"@angular/core": "https://cdn.jsdelivr.net/npm/@esm-bundle/angular__core/system/es2015/ivy/angular-core.min.js", | ||
"@angular/common": "https://cdn.jsdelivr.net/npm/@esm-bundle/angular__common/system/es2015/ivy/angular-common.min.js" | ||
} | ||
}`, | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,37 @@ | ||
describe("@esm-bundle/autopublish-template", () => { | ||
it("can load the ESM bundle", () => { | ||
return import("/base/esm/index.js"); | ||
describe("@esm-bundle/angular__service-worker", () => { | ||
describe("@angular/service-worker", () => { | ||
["es2015", "es2020"].forEach((ecma) => { | ||
it(`can load the System.register ${ecma} bundle`, async () => { | ||
const m = await System.import( | ||
`/base/system/${ecma}/ivy/angular-service-worker.js` | ||
); | ||
expect(m.ServiceWorkerModule).toBeDefined(); | ||
}); | ||
|
||
it(`can load the System.register ${ecma} prod bundle`, async () => { | ||
const m = await System.import( | ||
`/base/system/${ecma}/ivy/angular-service-worker.min.js` | ||
); | ||
expect(m.ServiceWorkerModule).toBeDefined(); | ||
}); | ||
}); | ||
}); | ||
|
||
it("can load the System.register bundle", () => { | ||
return System.import("/base/system/index.js"); | ||
describe("@angular/service-worker/config", () => { | ||
["es2015", "es2020"].forEach((ecma) => { | ||
it(`can load the System.register ${ecma} bundle`, async () => { | ||
const m = await System.import( | ||
`/base/system/${ecma}/ivy/angular-config.js` | ||
); | ||
expect(m.Generator).toBeDefined(); | ||
}); | ||
|
||
it(`can load the System.register ${ecma} prod bundle`, async () => { | ||
const m = await System.import( | ||
`/base/system/${ecma}/ivy/angular-config.min.js` | ||
); | ||
expect(m.Generator).toBeDefined(); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,9 @@ module.exports = function(config) { | |
|
||
// list of files / patterns to load in the browser | ||
files: [ | ||
"https://cdn.jsdelivr.net/npm/systemjs/dist/system.js", | ||
{ pattern: "browser-test/**/*.js", watched: true, type: "module" }, | ||
"https://cdn.jsdelivr.net/npm/[email protected]/dist/system.js", | ||
"browser-test/systemjs-setup.js", | ||
{ pattern: "browser-test/test.js", watched: true, type: "module" }, | ||
{ pattern: "./**/*.*", watched: true, included: false, served: true } | ||
], | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,72 @@ | ||
{ | ||
"name": "@esm-bundle/autopublish-template", | ||
"name": "@esm-bundle/angular__service-worker", | ||
"version": "20.0.20", | ||
"description": "Repo to test esm-bundle's automatic publishing", | ||
"main": "index.js", | ||
"module": "esm/index.js", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./service-worker.d.ts", | ||
"es2015": "./es2015/ivy/angular-service-worker.js", | ||
"es2020": "./es2020/ivy/angular-service-worker.js", | ||
"default": "./es2020/ivy/angular-service-worker.js" | ||
}, | ||
"./config": { | ||
"es2015": "./es2015/ivy/angular-config.js", | ||
"es2020": "./es2020/ivy/angular-config.js", | ||
"default": "./es2020/ivy/angular-config.js" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "pnpm run build && concurrently -n w: 'pnpm:test:*'", | ||
"test:browser": "karma start karma.conf.cjs --single-run", | ||
"debug:test:browser": "karma start karma.conf.cjs", | ||
"test:unit": "mocha -r chai/register-expect 'node-test/**/*.*'", | ||
"test:formatting": "prettier --check .", | ||
"build": "rollup -c", | ||
"build": "rimraf system es2015 es2020 && rollup -c", | ||
"format": "prettier --write .", | ||
"release": "release-it", | ||
"prepublishOnly": "pnpm run build && pinst --disable", | ||
"postinstall": "husky install", | ||
"postpublish": "pinst --enable" | ||
}, | ||
"files": [ | ||
"esm", | ||
"es2015", | ||
"es2020", | ||
"system" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/esm-bundle/autopublish-template.git" | ||
"url": "git+https://github.com/esm-bundle/angular__service-worker.git" | ||
}, | ||
"author": "", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/esm-bundle/autopublish-template/issues" | ||
"url": "https://github.com/esm-bundle/angular__service-worker/issues" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"homepage": "https://github.com/esm-bundle/autopublish-template#readme", | ||
"homepage": "https://github.com/esm-bundle/angular__service-worker#readme", | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "21.0.3", | ||
"@angular/compiler": "13.3.1", | ||
"@angular/compiler-cli": "13.3.1", | ||
"@angular/core": "13.3.1", | ||
"@angular/service-worker": "13.3.1", | ||
"@rollup/plugin-babel": "5.3.1", | ||
"@rollup/plugin-node-resolve": "13.1.3", | ||
"autopublish-template": "20.0.20", | ||
"chai": "4.3.4", | ||
"concurrently": "7.0.0", | ||
"husky": "7.0.4", | ||
"karma": "6.3.17", | ||
"karma-firefox-launcher": "2.1.2", | ||
"karma-jasmine": "4.0.2", | ||
"mocha": "9.2.2", | ||
"pinst": "3.0.0", | ||
"prettier": "2.6.1", | ||
"pretty-quick": "3.1.3", | ||
"release-it": "14.13.1", | ||
"release-it-plugin-esm-bundle": "2.1.0", | ||
"rimraf": "3.0.2", | ||
"rollup": "2.70.1", | ||
"rollup-plugin-terser": "7.0.2" | ||
"rollup-plugin-terser": "7.0.2", | ||
"rxjs": "7.5.5", | ||
"typescript": "4.6.3" | ||
} | ||
} |
Oops, something went wrong.