Skip to content

Commit

Permalink
Release alpha.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhduong committed Apr 30, 2018
1 parent 95a86f1 commit 699b485
Show file tree
Hide file tree
Showing 13 changed files with 101 additions and 15 deletions.
44 changes: 40 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ npm install linq-fns --save

> This version just alpha so if have any problem, don't hesitate to let me know. 👋
### Basic exampl
Browser client files at [Release](https://github.com/jinhduong/linq-fns/tree/master/release) folder.

### Basic example
#### Node or browser
```ts
// ES6
Expand Down Expand Up @@ -73,6 +75,40 @@ postsQuery.commitChanges();

```

#### localStogare
```js

// Node
const LocalStorageQueryable = require('linq-fns').LocalStorageQueryable;

const postsQuery = new LocalStorageQueryable("posts");

postsQuery.add(item);
postsQuery.remove(item);
postsQuery.update(item);

// Call this to execute 3 above methods
postsQuery.commitChanges();
```

#### gist file
```js

//Node
const GistQueryable = require('linq-fns').GistQueryable;

const postsQuery = new GistQueryable(
"6d183b7f997819cd5a8354f35c1e471f", // gist file
"259f97b96762c9d3a155630de8dcfe1cfaf253ff", // access token
"posts") // table name

postsQuery.add(item);
postsQuery.remove(item);
postsQuery.update(item);
postsQuery.commitChanges();

```

### Process
#### 1.Methods
- [x] from
Expand Down Expand Up @@ -114,9 +150,9 @@ postsQuery.commitChanges();
- [x] toList : `Promise<T[]>`

#### 2. Drivers
- [x] Firebase
- [ ] Localstorage
- [ ] Gists Github
- [x] Firebase : `Node`
- [x] Localstorage : `Node` & `Browser`
- [x] Gists Github : `Node` & `Browser`
- [ ] ...

### License
Expand Down
23 changes: 23 additions & 0 deletions release/linq-fns-gist.min.js

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions release/linq-fns-localStorage.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion release/linq-fns.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion release/linq-fns.ru.js

This file was deleted.

3 changes: 3 additions & 0 deletions src/browser/linq-fns.gist.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { GistQueryable } from "../drivers";

window['GistQueryable'] = GistQueryable;
3 changes: 3 additions & 0 deletions src/browser/linq-fns.localStorage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { LocalStorageQueryable } from "../drivers";

window['LocalStorageQueryable'] = LocalStorageQueryable;
5 changes: 0 additions & 5 deletions src/browser/linq-fns.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
import { Queryable } from '../implements/index';
import { LocalStorageQueryable } from '../drivers/linq-fns.localStogare';
import { GistQueryable } from '../drivers/linq-fns.gits';

window['Queryable'] = Queryable
window['LocalStorageQueryable'] = LocalStorageQueryable;
window['GistQueryable'] = GistQueryable;
4 changes: 3 additions & 1 deletion src/drivers/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export * from './linq-fns-firebase';
export * from './linq-fns.firebase';
export * from './linq-fns.gits';
export * from './linq-fns.localStogare';
File renamed without changes.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { Queryable } from './implements/queryable';
export { FireBaseQueryale } from './drivers';
export { Queryable } from './implements';
export { FireBaseQueryale, GistQueryable, LocalStorageQueryable } from './drivers';
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
]
},
"baseUrl": "./",
// "declaration": true,
"declaration": true,
},
"exclude": [
"demo",
Expand Down
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
module.exports = {
entry: {
'linq-fns': './dist/browser/linq-fns.js',
// 'linq-fns-localStorage': './dist/browser/linq-fns.localStorage.js',
// 'linq-fns-gist': './dist/browser/linq-fns.gist.js'
},
plugins: [
new HTMLWebpackPlugin({
Expand Down

0 comments on commit 699b485

Please sign in to comment.