Skip to content

Commit

Permalink
Merge pull request #83 from ReadAlongs/dev.fix-unpkg
Browse files Browse the repository at this point in the history
Fix unpkg bundle
  • Loading branch information
dhdaines authored Feb 8, 2023
2 parents cb05e77 + 0fab797 commit afee282
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/studio-web/src/app/b64.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { Segment } from "soundswallower";
})
export class B64Service {
JS_BUNDLE_URL =
"https://unpkg.com/@roedoejet/readalong@^0.1.6/dist/bundle.js";
"https://unpkg.com/@readalongs/web-component@^0.2.1/dist/bundle.js";
FONTS_BUNDLE_URL =
"https://unpkg.com/@roedoejet/readalong@^0.1.6/dist/fonts.b64.css";
"https://unpkg.com/@readalongs/web-component@^0.2.1/dist/fonts.b64.css";
constructor(private http: HttpClient, private fileService: FileService) {}
getBundle$(): Observable<any[]> {
return forkJoin([
Expand Down
6 changes: 3 additions & 3 deletions packages/web-component/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@readalongs/web-component",
"version": "0.2.0",
"version": "0.2.1",
"description": "ReadAlong Web Component",
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"es2015": "dist/esm/index.mjs",
"es2017": "dist/esm/index.mjs",
"es2015": "dist/esm/index.js",
"es2017": "dist/esm/index.js",
"types": "dist/types/components.d.ts",
"collection": "dist/collection/collection-manifest.json",
"collection:main": "dist/collection/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/web-component/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ You can either modify the `/src/index.html` or after running `npm start` you can
the following script import in your own `index.html` page:

```html
<script type="module" src="https://unpkg.com/@roedoejet/readalong@^0.1.6/dist/read-along/web-component.esm.js"></script>
<script nomodule src="https://unpkg.com/@roedoejet/readalong@^0.1.6/dist/read-along/read-along.js"></script>
<script type="module" src="https://unpkg.com/@readalongs/web-component@^0.2.1/dist/read-along/web-component.esm.js"></script>
<script nomodule src="https://unpkg.com/@readalongs/web-component@^0.2.1/dist/read-along/read-along.js"></script>
```

Then, you can add as many read-along components to your page as you like simply by adding `<read-along></read-along>`
Expand All @@ -63,7 +63,7 @@ using _________ service located here: ____________.

## Loading as a single file

By default, Stencil (the tool used to build this web component) uses lazy loading. However, some use cases for this web component might involve running the component as a single file, without access to the internet. A single-file script of this web component is therefore made available at https://unpkg.com/@roedoejet/readalong@^0.1.6/dist/bundle.js although we recommend using the default imports using the unpkg content delivery network (cdn) described above.
By default, Stencil (the tool used to build this web component) uses lazy loading. However, some use cases for this web component might involve running the component as a single file, without access to the internet. A single-file script of this web component is therefore made available at https://unpkg.com/@readalongs/web-component@^0.2.1/dist/bundle.js although we recommend using the default imports using the unpkg content delivery network (cdn) described above.

## Theming

Expand Down
4 changes: 2 additions & 2 deletions packages/web-component/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const TerserPlugin = require("terser-webpack-plugin");
const webpack = require('webpack');

module.exports = {
entry: '../../dist/packages/web-component/dist/esm/index.js',
entry: '../../dist/packages/web-component/dist/esm/web-component.js',
output: {
filename: 'bundle.js',
path: path.resolve('../../dist/packages/web-component/dist'),
Expand All @@ -24,4 +24,4 @@ module.exports = {
plugins: [new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1
})]
};
};

0 comments on commit afee282

Please sign in to comment.