Skip to content

Commit

Permalink
Merge pull request #12 from pshihn/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
pshihn authored Jan 4, 2019
2 parents 429b694 + 2183103 commit c3b77e3
Show file tree
Hide file tree
Showing 19 changed files with 261 additions and 1,006 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Preet Shihn
Copyright (c) 2019 Preet Shihn

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* A really simple way to move a stand-alone <b>function/class to a worker thread</b>.
* Or, **expose an object or function in a worker** to the main thread.
* All calls are made asynchronous. Works great with async/await.
* Only 1.01kB gzipped.
* Only 1kB gzipped.

## Install

Expand Down Expand Up @@ -63,7 +63,7 @@ In this example, the function depends on moment.js

<b>worker.js</b>
```js
importScripts('https://cdn.jsdelivr.net/npm/[email protected]/moment.min.js', '../dist/workly.min.js');
importScripts('https://cdn.jsdelivr.net/npm/[email protected]/moment.min.js', '../dist/workly.js');
function friendlyTime(value) {
return moment(value).calendar(null, {
sameDay: function (now) {
Expand Down
2 changes: 2 additions & 0 deletions dist/workly.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export declare function proxy(obj: any): any;
export declare function expose(target: Object | Function): void;
134 changes: 1 addition & 133 deletions dist/workly.js

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

1 change: 1 addition & 0 deletions dist/workly.m.js

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

1 change: 0 additions & 1 deletion dist/workly.min.js

This file was deleted.

136 changes: 0 additions & 136 deletions dist/workly.umd.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/workly.umd.min.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/class.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<head>
<title>Workly class sample</title>
<script src="../dist/workly.min.js"></script>
<script src="../dist/workly.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion examples/function.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<head>
<title>Workly function sample</title>
<script src="../dist/workly.min.js"></script>
<script src="../dist/workly.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion examples/worker.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<head>
<title>Workly custom worker sample - function</title>
<script src="../dist/workly.min.js"></script>
<script src="../dist/workly.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion examples/worker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://cdn.jsdelivr.net/npm/[email protected]/moment.min.js', '../dist/workly.min.js');
importScripts('https://cdn.jsdelivr.net/npm/[email protected]/moment.min.js', '../dist/workly.js');

function friendlyTime(value) {
return moment(value).calendar(null, {
Expand Down
2 changes: 1 addition & 1 deletion examples/worker2.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<head>
<title>Workly custom worker sample - object</title>
<script src="../dist/workly.min.js"></script>
<script src="../dist/workly.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion examples/worker2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('../dist/workly.min.js');
importScripts('../dist/workly.js');

var obj = {
count: 1,
Expand Down
2 changes: 1 addition & 1 deletion examples/worker3.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<head>
<title>Workly custom worker sample - class</title>
<script src="../dist/workly.min.js"></script>
<script src="../dist/workly.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion examples/worker3.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://cdn.jsdelivr.net/npm/[email protected]/moment.min.js', '../dist/workly.min.js');
importScripts('https://cdn.jsdelivr.net/npm/[email protected]/moment.min.js', '../dist/workly.js');

class FriendlyTime {
constructor(name) {
Expand Down
Loading

0 comments on commit c3b77e3

Please sign in to comment.