Skip to content

Commit

Permalink
Merge branch 'master' into add-delete-crud-cli-server-database
Browse files Browse the repository at this point in the history
# Conflicts:
#	tools/cli/module.js
#	yarn.lock
  • Loading branch information
lyzhovnik committed Sep 10, 2018
2 parents f77ccb8 + 9cce311 commit 7533456
Show file tree
Hide file tree
Showing 124 changed files with 4,556 additions and 4,371 deletions.
5 changes: 4 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
"transform-decorators-legacy",
"transform-class-properties",
["styled-components", { "ssr": true }],
["import", { "libraryName": "antd-mobile" }]
["import", { "libraryName": "antd-mobile-rn" }]
],
"only": ["*.jsx", "*.js"],
"env": {
"production": {
"compact": true,
"presets": [["minify", { "mangle": false }]]
},
"jest": {
"presets": ["react", "env", "stage-0"]
}
}
}
629 changes: 191 additions & 438 deletions README.md

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions config/engine.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
export default {
engineConfig: {
apiKey: '', // Set your Engine API key here
logging: {
level: 'DEBUG' // Engine Proxy logging level. DEBUG, INFO, WARN or ERROR
}
},
dumpTraffic: true // Debug configuration that logs traffic between Proxy and GraphQL server
apiKey: '', // Set your Engine API key here
logging: {
level: 'DEBUG' // Engine Proxy logging level. DEBUG, INFO, WARN or ERROR
}
};
1 change: 1 addition & 0 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export { default as analytics } from './analytics';
export { default as subscription } from './subscription';
export { default as i18n } from './i18n';
export { default as pagination } from './pagination';
export { default as upload } from './upload';
3 changes: 3 additions & 0 deletions config/upload.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
uploadDir: 'public'
};
2 changes: 1 addition & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
NODE_ENV=development yarn &&
(test -f prod-db.sqlite3 || yarn seed) &&
yarn build &&
node build/server
yarn start
'
ports:
- 8080:8080
86 changes: 82 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"clean": "lerna run clean --stream",
"exp": "yarn --cwd packages/mobile exp",
"start": "lerna run --scope=server start --stream",
"jest": "jest",
"tests": "lerna run tests --stream",
"tests:watch": "lerna run tests:watch --stream",
"test": "yarn tests && yarn lint",
Expand Down Expand Up @@ -74,26 +75,103 @@
"logo": "https://opencollective.com/opencollective/logo.txt"
},
"devDependencies": {
"awesome-typescript-loader": "^3.4.1",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.3",
"babel-plugin-import": "^1.7.0",
"babel-plugin-styled-components": "^1.3.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-react-remove-prop-types": "^0.4.12",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-flow": "^6.23.0",
"babel-preset-minify": "^0.5.0-alpha.a24dd066",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"cache-loader": "^1.2.2",
"css-loader": "^1.0.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-import-resolver-webpack": "^0.9.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-json": "^1.2.0",
"eslint-plugin-jsx-a11y": "6.0.3",
"eslint-plugin-mocha": "^5.0.0",
"eslint-plugin-prettier": "^2.4.0",
"eslint-plugin-react": "^7.5.1",
"file-loader": "^1.1.6",
"fork-ts-checker-webpack-plugin": "^0.4.9",
"heroku-babel-loader": "^7.1.2",
"html-webpack-plugin": "^3.2.0",
"http-proxy-middleware": "^0.18.0",
"husky": "^0.14.3",
"ignore-loader": "^0.1.2",
"isomorphic-style-loader": "^4.0.0",
"lerna": "^2.5.1",
"less": "^3.0.2",
"less-loader": "^4.1.0",
"lint-staged": "^7.1.2",
"mini-css-extract-plugin": "^0.4.1",
"node-sass": "^4.7.2",
"openurl": "^1.1.1",
"postcss-loader": "^3.0.0",
"prettier": "^1.9.2",
"qrcode-terminal": "^0.12.0",
"raw-loader": "^0.5.1",
"sass-loader": "^7.1.0",
"source-list-map": "^2.0.0",
"style-loader": "^0.21.0",
"ts-loader": "^4.5.0",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.5.0",
"tslint-plugin-prettier": "^1.3.0",
"typescript": "^2.9.2"
"typescript": "^2.9.2",
"url-loader": "^1.0.1",
"wait-on": "^2.0.2",
"webpack": "^4.17.1",
"webpack-dev-middleware": "^3.1.3",
"webpack-dev-server": "^3.1.5",
"webpack-hot-middleware": "^2.22.3",
"webpack-manifest-plugin": "^2.0.3",
"webpack-merge": "^4.1.4",
"webpack-node-externals": "^1.7.2",
"webpack-sources": "^1.1.0",
"webpack-virtual-modules": "^0.1.10"
},
"optionalDependencies": {
"dotenv": "^6.0.0",
"lodash": "^4.17.4"
},
"dependencies": {
"opencollective": "^1.0.3",
"spinjs": "^0.4.145"
"spinjs": "^0.4.159"
},
"resolutions": {
"graphql": "0.13.0",
"graphql": "0.13.2",
"iterall": "^1.2.2",
"upath": "^1.1.0"
},
"jest": {
"verbose": true,
"preset": "jest-expo",
"testPathIgnorePatterns": ["node_modules", ".history"],
"testRegex": "packages/mobile/src.*/__tests__/.*\\.(js|jsx|ts|tsx)$",
"moduleFileExtensions": ["ts", "tsx", "js", "jsx"],
"transform": {
"^.+\\.jsx?$": "babel-jest",
"^.+\\.tsx?$": "ts-jest"
},
"modulePathIgnorePatterns": [
"<rootDir>/node_modules/react-native/Libraries/react-native/",
"<rootDir>/node_modules/haul/",
"<rootDir>/packages/mobile/.expo/"
],
"globals": {
"__CLIENT__": true,
"__SERVER__": false,
"__TEST__": true,
"ts-jest": {
"tsConfigFile": "packages/mobile/tsconfig.jest.json"
}
}
}
}
75 changes: 11 additions & 64 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"scripts": {
"build": "cross-env NODE_ENV=production spin build",
"clean": "rimraf build .tmp",
"tests": "cross-env NODE_ENV=test PORT=7070 spin test -t 10000 --full-trace --exit \"src/**/*.spec.js\"",
"tests:watch": "cross-env NODE_ENV=test PORT=7070 spin test -t 10000 --full-trace --watch \"src/**/*.spec.js\"",
"tests": "cross-env NODE_ENV=test PORT=7070 spin test -t 10000 --full-trace --exit \"src/**/*.spec.*\"",
"tests:watch": "cross-env NODE_ENV=test PORT=7070 spin test -t 10000 --full-trace --watch \"src/**/*.spec.*\"",
"test": "yarn tests && yarn lint",
"eslint": "eslint --fix --ext js --ext jsx --ext json src",
"tslint": "tslint --fix -p tsconfig.json -c ../../tslint.json",
Expand Down Expand Up @@ -44,7 +44,7 @@
"@fortawesome/react-fontawesome": "0.0.18",
"antd": "^3.3.3",
"apollo-cache-inmemory": "^1.1.12",
"apollo-cache-router": "^1.1.2",
"apollo-cache-router": "^1.1.6",
"apollo-client": "^2.3.1",
"apollo-link": "^1.0.6",
"apollo-link-batch-http": "1.2.2",
Expand All @@ -58,8 +58,8 @@
"error-stack-parser": "^2.0.1",
"extract-files": "^3.1.0",
"filesize": "^3.5.11",
"formik": "^0.11.10",
"graphql": "0.13.0",
"formik": "^1.0.2",
"graphql": "^0.13.0",
"graphql-iso-date": "^3.3.0",
"graphql-tag": "^2.6.0",
"history": "^4.7.2",
Expand Down Expand Up @@ -109,88 +109,35 @@
"@types/webpack-env": "^1.13.6",
"apollo-utilities": "^1.0.3",
"autoprefixer": "^8.3.0",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.3",
"babel-plugin-styled-components": "^1.3.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-react-remove-prop-types": "^0.4.12",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
"babel-preset-flow": "^6.23.0",
"babel-preset-minify": "^0.5.0-alpha.a24dd066",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"babel-register": "^6.26.0",
"chai": "^4.1.2",
"chai-http": "^4.0.0",
"cross-env": "^5.1.1",
"css-loader": "^0.28.7",
"dom-testing-library": "^2.3.0",
"eslint": "^4.13.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-import-resolver-webpack": "^0.9.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-json": "^1.2.0",
"eslint-plugin-jsx-a11y": "6.0.3",
"eslint-plugin-mocha": "^5.0.0",
"eslint-plugin-prettier": "^2.4.0",
"eslint-plugin-react": "^7.5.1",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^1.1.6",
"graphql-tools": "^2.13.0",
"heroku-babel-loader": "^7.1.2",
"html-webpack-plugin": "^3.2.0",
"http-proxy-middleware": "^0.18.0",
"ignore-loader": "^0.1.2",
"ip": "^1.1.5",
"isomorphic-style-loader": "^4.0.0",
"jsdom": "^11.5.1",
"less": "^3.0.2",
"less-loader": "^4.1.0",
"mini-css-extract-plugin": "^0.4.0",
"mkdirp": "^0.5.1",
"mocha": "^5.1.1",
"mocha-steps": "^1.1.0",
"mocha-webpack": "^0.7.0",
"node-sass": "^4.7.2",
"openurl": "^1.1.1",
"postcss-loader": "^2.0.9",
"prettier": "^1.9.2",
"qrcode-terminal": "^0.12.0",
"raw-loader": "^0.5.1",
"react-addons-test-utils": "^16.0.0-alpha.3",
"react-test-renderer": "^16.2.0",
"react-testing-library": "^3.0.2",
"request": "^2.83.0",
"resolve-url-loader": "^2.2.1",
"rimraf": "^2.6.2",
"sass-loader": "^7.0.1",
"source-list-map": "^2.0.0",
"style-loader": "^0.21.0",
"url-loader": "^1.0.1",
"wait-on": "^2.0.2",
"webpack": "^3.10.0",
"webpack-dev-middleware": "^3.1.2",
"webpack-dev-server": "^2.9.7",
"webpack-hot-middleware": "^2.21.0",
"webpack-manifest-plugin": "^2.0.1",
"webpack-merge": "^4.1.1",
"webpack-node-externals": "^1.6.0",
"webpack-sources": "^1.1.0",
"webpack-virtual-modules": "^0.1.10"
"rimraf": "^2.6.2"
},
"optionalDependencies": {
"@expo/vector-icons": "^6.2.1",
"antd-mobile": "^2.1.2",
"antd-mobile-rn": "^2.2.1",
"expo": "^27.0.2",
"native-base": "^2.3.5",
"react-native": "0.55.3",
"react-native": "~0.55.4",
"react-native-keyboard-spacer": "^0.4.1",
"react-native-modal": "^5.4.0",
"react-native-simple-picker": "^2.0.0",
"react-navigation": "^2.0.0",
"react-navigation": "^2.0.0"
},
"peerDependencies": {
"spinjs": "^0.4.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
import React from 'react';
import PropTypes from 'prop-types';
import ADButton from 'antd-mobile/lib/button';
import { Button as ADButton } from 'antd-mobile-rn';
import { Text } from 'react-native';
import * as TYPES from '../../ButtonTypes';

const Button = ({ textStyle, children, onPress, onClick, type, style, ...props }) => {
const btnData = buttonTypes[type] || {};
const btnProps = {
...props,
type: btnData.type || 'default',
style: [btnData.styles, style]
};
class Button extends React.Component {
render() {
const { textStyle, children, onClick, onPress, type, style, ...props } = this.props;
const btnData = buttonTypes[type] || {};
const btnProps = {
...props,
type: btnData.type || 'default',
style: [btnData.styles, style]
};

return (
<ADButton onClick={onPress || onClick} {...btnProps}>
<Text style={textStyle} numberOfLines={1}>
{children}
</Text>
</ADButton>
);
};
return (
<ADButton onClick={onPress || onClick} {...btnProps}>
<Text style={textStyle} numberOfLines={1}>
{children}
</Text>
</ADButton>
);
}
}

Button.propTypes = {
children: PropTypes.node,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import ADCard from 'antd-mobile/lib/card';
import { Card as ADCard } from 'antd-mobile-rn';

const Card = ({ children, ...props }) => {
return <ADCard {...props}>{children}</ADCard>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Card } from 'antd-mobile/lib';
import { Card } from 'antd-mobile-rn';

const CardFooter = ({ ...props }) => {
return <Card.Footer {...props} />;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Card } from 'antd-mobile/lib';
import { Card } from 'antd-mobile-rn';

const CardHeader = ({ ...props }) => {
return <Card.Header {...props} />;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import ADCheckbox from 'antd-mobile/lib/checkbox';
import { Checkbox as ADCheckbox } from 'antd-mobile-rn';

const CheckBox = props => {
return <ADCheckbox onChange={props.onChange || props.onPress} {...props} />;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import Button from 'antd-mobile/lib/button';
import { Button } from 'antd-mobile-rn';
import { Feather } from '@expo/vector-icons';

const IconButton = ({ iconName, iconColor, iconSize, onPress }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import ADInputItem from 'antd-mobile/lib/input-item';
import { InputItem as ADInputItem } from 'antd-mobile-rn';
import { Text, View, StyleSheet } from 'react-native';
import InputItemStyles from '../styles/InputItem';

Expand Down
Loading

0 comments on commit 7533456

Please sign in to comment.