Split Pouchtype into its own repo.

This commit is contained in:
Timothy Farrell 2019-08-21 20:58:51 -05:00
parent 7abf39fc81
commit a8bb208f3a
15 changed files with 8168 additions and 81 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
coverage
node_modules

8133
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

30
package.json Normal file
View File

@ -0,0 +1,30 @@
{
"name": "pouchtype",
"version": "1.0.2",
"description": "Document Management Layer for PouchDB",
"main": "src/index.js",
"files": [
"src"
],
"scripts": {
"test": "karmatic 'spec/*.spec.js'"
},
"author": "Timothy Farrell <tim@thecookiejar.me> (https://github.com/explorigin)",
"license": "Apache-2.0",
"devDependencies": {
"husky": "^3.0.1",
"karmatic": "^1.3.1",
"pouchdb": "^7.1.1",
"pouchdb-adapter-memory": "^7.1.1",
"pouchdb-find": "^7.1.1",
"webpack": "^4.37.0"
},
"dependencies": {
"reactimal": "git+https://gitea.thecookiejar.me/explorigin/reactimal.git"
},
"husky": {
"hooks": {
"pre-commit": "npm run test"
}
}
}

View File

@ -1,30 +0,0 @@
{
"name": "pouchtype",
"version": "1.0.2",
"description": "Document Management Layer for PouchDB",
"main": "src/index.js",
"files": [
"dist",
"lib",
"src"
],
"scripts": {
"test": "npm run build:test && mv dist/index.html ./.spec_runner.html && node ../../bin/runTests.js ./",
"pre-commit": "npm run test",
"build:test": "webpack --config webpack.test-config.js"
},
"author": "Timothy Farrell <tim@thecookiejar.me> (https://github.com/explorigin)",
"license": "Apache-2.0",
"dependencies": {
"frptools": "~3.2.1"
},
"devDependencies": {
"html-webpack-plugin": "~3.2.0",
"pouchdb": "~7.0.0",
"pouchdb-find": "~7.0.0",
"pouchdb-adapter-memory": "^7.0.0",
"script-ext-html-webpack-plugin": "^2.0.1",
"webpack": "~4.10.2",
"webpack-cli": "~2.1.5"
}
}

View File

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Jasmine Spec Runner v3.1.0</title>
<link rel="shortcut icon" type="image/png" href="/vendor/jasmine/jasmine_favicon.png">
<link rel="stylesheet" href="/vendor/jasmine/jasmine.css">
<script src="/vendor/jasmine/jasmine.js"></script>
<script src="/vendor/jasmine/jasmine-html.js"></script>
<script defer src="/vendor/jasmine/boot.js"></script>
</head><body></body>
</html>

View File

@ -1,33 +0,0 @@
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin');
module.exports = {
context: path.resolve(__dirname, './spec'),
mode: 'development',
entry: {
livearray: './livearray.spec.js',
typehandler: './typehandler.spec.js',
watcher: './watcher.spec.js'
},
output: {
path: path.resolve(__dirname, './dist'),
filename: '[name].bundle.js',
publicPath: '/packages/pouchtype/dist/'
},
devServer: {
contentBase: path.join(__dirname, 'dist')
},
module: {},
plugins: [
new webpack.DefinePlugin({ __DEV__: true }),
new HtmlWebpackPlugin({
template: 'index.html',
inject: 'body'
}),
new ScriptExtHtmlWebpackPlugin({
module: /.*/
})
]
};

View File

@ -143,8 +143,8 @@ describe('PouchType Handler', () => {
it('.filter() returns an array of matching instances.', async () => {
await db.bulkDocs(dataset);
const res = await Contact.filter({ last: { $regex: /^Smith.*/ } });
expect(res.length).toBe(2);
const res = await Contact.filter({ last: 'Smith' });
expect(res.length).toBe(1);
});
it('.filter() only returns records for its type.', async () => {

View File

@ -1,4 +1,4 @@
import { prop, computed, id } from 'frptools';
import { prop, computed, id } from 'reactimal';
import { Watcher } from './watcher.js';
import { pouchDocArrayHash } from './utils.js';