Split Pouchtype into its own repo.
This commit is contained in:
parent
7abf39fc81
commit
a8bb208f3a
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
coverage
|
||||
node_modules
|
||||
8133
package-lock.json
generated
Normal file
8133
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
30
package.json
Normal file
30
package.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
@ -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>
|
||||
|
||||
@ -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: /.*/
|
||||
})
|
||||
]
|
||||
};
|
||||
@ -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 () => {
|
||||
@ -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';
|
||||
Reference in New Issue
Block a user