-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
1,145 additions
and
1,026 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,34 @@ | ||
/* @flow */ | ||
|
||
module.exports = { | ||
'extends': './node_modules/@krakenjs/grumbler-scripts/config/.eslintrc-browser.js', | ||
extends: | ||
"./node_modules/@krakenjs/grumbler-scripts/config/.eslintrc-browser.js", | ||
|
||
'globals': { | ||
'Promise': false, | ||
'__PAYPAL_CHECKOUT__': true, | ||
'__paypal_checkout__': true, | ||
'__sdk__': true, | ||
'__LOCALE__': true, | ||
'__CLIENT_ID__': true, | ||
'__MERCHANT_ID__': true, | ||
'__INTENT__': true, | ||
'__COMMIT__': true, | ||
'__VAULT__': true, | ||
'__PORT__': true, | ||
'__STAGE_HOST__': true, | ||
'__HOST__': true, | ||
'__PATH__': true, | ||
'__COMPONENTS__': true | ||
}, | ||
globals: { | ||
Promise: false, | ||
__PAYPAL_CHECKOUT__: true, | ||
__paypal_checkout__: true, | ||
__sdk__: true, | ||
__LOCALE__: true, | ||
__CLIENT_ID__: true, | ||
__MERCHANT_ID__: true, | ||
__INTENT__: true, | ||
__COMMIT__: true, | ||
__VAULT__: true, | ||
__PORT__: true, | ||
__STAGE_HOST__: true, | ||
__HOST__: true, | ||
__PATH__: true, | ||
__COMPONENTS__: true, | ||
}, | ||
|
||
'rules': { | ||
'complexity': 'off', | ||
'max-nested-callbacks': [ 'error', 5 ], | ||
'react/prop-types': 'off', | ||
'react/style-prop-object': 'off', | ||
'react/display-name': 'off', | ||
'react/require-default-props': 'off', | ||
'react/forbid-component-props': 'off' | ||
} | ||
}; | ||
rules: { | ||
complexity: "off", | ||
"max-nested-callbacks": ["error", 5], | ||
"react/prop-types": "off", | ||
"react/style-prop-object": "off", | ||
"react/display-name": "off", | ||
"react/require-default-props": "off", | ||
"react/forbid-component-props": "off", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
build | ||
dist | ||
coverage | ||
flow-typed | ||
CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,9 @@ Feel free to raise a pull request to us. Our team would review your proposed mod | |
your changes into our code. Ideas and other comments are also welcome. | ||
|
||
## Getting Started | ||
|
||
1. Create your own [fork](https://help.github.com/articles/fork-a-repo) of this [repository](../../fork). | ||
|
||
```bash | ||
# Clone it | ||
$ git clone [email protected]:me/paypal-checkout.git | ||
|
@@ -28,10 +30,12 @@ $ npm test | |
``` | ||
|
||
## Making Changes | ||
|
||
1. Make sure that your changes adhere to the current coding conventions used throughout the project, indentation, accurate comments, etc. | ||
2. Ensure existing tests pass (`$ npm test`) and include test cases which fail without your change and succeed with it. | ||
|
||
## Submitting Changes | ||
|
||
1. Ensure that no errors are generated by ESLint (run during `$ npm test`). | ||
2. Commit your changes in logical chunks, i.e. keep your changes small per single commit. | ||
3. Locally merge (or rebase) the upstream branch into your topic branch: `$ git pull upstream && git merge`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
/* @flow */ | ||
/* eslint unicorn/filename-case: 0, import/unambiguous: 0, import/no-commonjs: 0 */ | ||
|
||
const globals = require('./globals'); | ||
const globals = require("./globals"); | ||
|
||
module.exports = { | ||
common: { | ||
automatic: true, | ||
entry: './src/interface', | ||
globals | ||
} | ||
common: { | ||
automatic: true, | ||
entry: "./src/interface", | ||
globals, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"extends": "@krakenjs/grumbler-scripts/config/.babelrc-node" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
/* eslint import/no-commonjs: off, flowtype/require-valid-file-annotation: off, flowtype/require-return-type: off */ | ||
|
||
const postRobotGlobals = require('@krakenjs/post-robot/globals'); | ||
const zoidGlobals = require('@krakenjs/zoid/globals'); | ||
const postRobotGlobals = require("@krakenjs/post-robot/globals"); | ||
const zoidGlobals = require("@krakenjs/zoid/globals"); | ||
|
||
module.exports = { | ||
__ZOID__: { | ||
...zoidGlobals.__ZOID__, | ||
__DEFAULT_CONTAINER__: true, | ||
__DEFAULT_PRERENDER__: true, | ||
__FRAMEWORK_SUPPORT__: true, | ||
}, | ||
|
||
__ZOID__: { | ||
...zoidGlobals.__ZOID__, | ||
__DEFAULT_CONTAINER__: true, | ||
__DEFAULT_PRERENDER__: true, | ||
__FRAMEWORK_SUPPORT__: true | ||
}, | ||
__POST_ROBOT__: { | ||
...postRobotGlobals.__POST_ROBOT__, | ||
__IE_POPUP_SUPPORT__: false, | ||
}, | ||
|
||
__POST_ROBOT__: { | ||
...postRobotGlobals.__POST_ROBOT__, | ||
__IE_POPUP_SUPPORT__: false | ||
}, | ||
|
||
__PAYPAL_CHECKOUT__: { | ||
__REMEMBERED_FUNDING__: [] | ||
} | ||
__PAYPAL_CHECKOUT__: { | ||
__REMEMBERED_FUNDING__: [], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
/* eslint import/no-commonjs: off, flowtype/require-valid-file-annotation: off */ | ||
|
||
module.exports = { | ||
|
||
}; | ||
module.exports = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,43 @@ | ||
/* @flow */ | ||
/* eslint import/no-default-export: off */ | ||
|
||
import { getKarmaConfig } from '@krakenjs/grumbler-scripts/config/karma.conf'; | ||
|
||
import { WEBPACK_CONFIG_TEST } from './webpack.config'; | ||
|
||
export default function configKarma(karma : Object) { | ||
|
||
const karmaConfig = getKarmaConfig(karma, { | ||
basePath: __dirname, | ||
testDir: 'test', | ||
windowDir: 'test/integration/windows', | ||
entry: 'test/integration/index.js', | ||
webpack: WEBPACK_CONFIG_TEST | ||
}); | ||
|
||
karma.set({ | ||
...karmaConfig, | ||
|
||
files: [ | ||
{ | ||
pattern: 'test/integration/globals.js', | ||
included: true, | ||
served: true | ||
}, | ||
|
||
{ | ||
pattern: 'test/paypal.js', | ||
included: true, | ||
served: true | ||
}, | ||
|
||
...karmaConfig.files | ||
], | ||
|
||
preprocessors: { | ||
...karmaConfig.preprocessors, | ||
|
||
'src/index.js': [ 'webpack', 'sourcemap' ], | ||
'src/**/*.js': [ 'sourcemap' ] | ||
} | ||
}); | ||
import { getKarmaConfig } from "@krakenjs/grumbler-scripts/config/karma.conf"; | ||
|
||
import { WEBPACK_CONFIG_TEST } from "./webpack.config"; | ||
|
||
export default function configKarma(karma: Object) { | ||
const karmaConfig = getKarmaConfig(karma, { | ||
basePath: __dirname, | ||
testDir: "test", | ||
windowDir: "test/integration/windows", | ||
entry: "test/integration/index.js", | ||
webpack: WEBPACK_CONFIG_TEST, | ||
}); | ||
|
||
karma.set({ | ||
...karmaConfig, | ||
|
||
files: [ | ||
{ | ||
pattern: "test/integration/globals.js", | ||
included: true, | ||
served: true, | ||
}, | ||
|
||
{ | ||
pattern: "test/paypal.js", | ||
included: true, | ||
served: true, | ||
}, | ||
|
||
...karmaConfig.files, | ||
], | ||
|
||
preprocessors: { | ||
...karmaConfig.preprocessors, | ||
|
||
"src/index.js": ["webpack", "sourcemap"], | ||
"src/**/*.js": ["sourcemap"], | ||
}, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.