Skip to content

Commit

Permalink
chore(app): v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenptrs authored Jul 24, 2018
2 parents 272c7e5 + 06de17e commit 1ead8e3
Show file tree
Hide file tree
Showing 19 changed files with 232 additions and 138 deletions.
56 changes: 56 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Javascript Node CircleCI 2.0 configuration file.
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
version: 2

references:
workspace: &workspace
~/repo

container_config: &container_config
docker:
- image: circleci/node:8.11.3
working_directory: *workspace
jobs:
build:
<<: *container_config
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: sudo yarn global add [email protected] greenkeeper-lockfile@1
- run: yarn install
- run: yarn build
- run: greenkeeper-lockfile-update
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: greenkeeper-lockfile-upload
test:
<<: *container_config
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: sudo apt-get -y update
- run: sudo apt-get -y install libgtk-3-0 libxss1 libgconf-2-4 libnss3 libasound2
- run: sudo yarn global add [email protected]
- run: yarn test
store_artifacts:
- path: artifacts
- destination: yarnpkg

workflows:
version: 2
build_test:
jobs:
- build
- test:
requires:
- build
38 changes: 23 additions & 15 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
<!--- Provide a general summary of the issue in the Title above -->

Your issue may already be reported!
Please search on the [issue track](../) before creating one.

## Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->
## Expected Behavior



## Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
## Current Behavior


## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->

## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
## Steps to Reproduce (for bugs)
1.
2.
3.
4.

## Context


<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->
## Possible Solution



<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
## Additional context



## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Version used:
* Environment name and version (e.g. node.js 9.6.1, yarn 1.6.1, npm 5.6.0):
## Your Environment
* nOS Client version used:
* Environment name and version
* Node version:
* NPM version:
* Yarn version:
* Operating System and version (desktop or mobile):
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Bug report
about: Create a report to help us improve the nOS Client

---

<!--- A clear and concise description of what you expected to happen. -->
## Expected Behavior



<!--- If describing a bug, tell us what happens instead of the expected behavior -->
## Current Behavior



<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
## Steps to Reproduce
1.
2.
3.
4.



<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->
## Possible Solution



<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
## Additional context



<!--- Include as many relevant details about the environment you experienced the bug in -->
## Your Environment
* nOS Client version used:
* Environment name and version
* Node version:
* NPM version:
* Yarn version:
* Operating System and version (desktop or mobile):
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for the nOS Client

---

<!-- A clear and concise description of feature you'd like to see and why. -->
## Describe the solution you'd like and the expected behavior



<!-- A clear and concise description of what the problem is. -->
## Is your feature request related to a problem? Please describe.



<!--- If you have an idea or reference of how to implement this, suggest it here -->
## Possible implementation / References



<!-- Add any other context or screenshots about the feature request here. -->
## Additional context
35 changes: 20 additions & 15 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
<!--- Provide a general summary of your changes in the Title above -->

<!-- Thanks for submitting a pull request! -->
<!-- Please provide enough information so that others can review your pull request -->
<!-- For more information, see the `CONTRIBUTING` guide. -->

## Description
<!--- Describe your changes in detail -->
## Description



## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- Describe the current and new situation/behavior --->
<!--- If it fixes an open issue, please link to the issue here. -->
## Motivation and Context



## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, tests ran to see how -->
<!--- your change affects other areas of the code, etc. -->
<!--- Include details of your testing environment -->
## How Has This Been Tested?



## Screenshots (if appropriate):

## Types of changes


<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
## Types of changes
- [ ] Chore (tests, refactors, and fixes)
- [ ] New feature (adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

## Checklist:


<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] The commit message follows our guidelines
## Checklist:
- [ ] I have read the **[CONTRIBUTING](./CONTRIBUTING.md)** guidelines and confirm that my code follows the code style of this project.
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] I have read the **CONTRIBUTING** document.

## Closing issues


<!-- Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such). -->
## Closing issues
Fixes #
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
CODE_OF_CONDUCT.md
.github/
.circleci/
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@
npm i --save @nosplatform/api-functions
yarn add @nosplatform/api-functions
```

## Usage in react
```
import { injectNOS, nosProps } from "@nosplatform/api-functions/lib/react";
```
2 changes: 1 addition & 1 deletion es6/bindings.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useFallback, executor, exists, nos } from "./lib";
import { executor } from "./lib";

// Wallet Actions

Expand Down
5 changes: 1 addition & 4 deletions es6/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @nos/api-functions
* @nosplatform/api-functions
* API bindings (with fallback) and types for nOS dApps
* @author Jeroen Peeters <[email protected]>
*/
Expand All @@ -14,7 +14,6 @@ import {
testInvoke
} from "./bindings";
import { exists } from "./lib";
import * as reactNamespace from "./react";

export default {
claimGas,
Expand All @@ -26,5 +25,3 @@ export default {
send,
testInvoke
};

export const react = reactNamespace;
2 changes: 1 addition & 1 deletion es6/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const executor = (func, fallback, config) =>
exists ? nos[func](config) : useFallback(fallback, config);

/**
* @function useFallback
* @function useFallback
* @param {function} fallback checks if fallback function exists, otherwise return nothing
* @param {object} args potential arguments that are passed along
*/
Expand Down
4 changes: 2 additions & 2 deletions es6/react/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import nosProps from "./props";
import { Consumer, injectNOS } from "./nosStore";
import { injectNOS } from "./inject";

export default { Consumer, injectNOS, nosProps };
export { injectNOS, nosProps };
9 changes: 9 additions & 0 deletions es6/react/inject.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from "react";

import nos from "../";

const injectNOS = Component => props => (
<Component nos={nos} {...props} />
);

export { injectNOS };
31 changes: 0 additions & 31 deletions es6/react/nosStore.js

This file was deleted.

12 changes: 3 additions & 9 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.react = exports.default = void 0;
exports.default = void 0;

var _bindings = require("./bindings");

var _lib = require("./lib");

var reactNamespace = _interopRequireWildcard(require("./react"));

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

/**
* @nos/api-functions
* @nosplatform/api-functions
* API bindings (with fallback) and types for nOS dApps
* @author Jeroen Peeters <[email protected]>
*/
Expand All @@ -28,6 +24,4 @@ var _default = {
send: _bindings.send,
testInvoke: _bindings.testInvoke
};
exports.default = _default;
var react = reactNamespace;
exports.react = react;
exports.default = _default;
2 changes: 1 addition & 1 deletion lib/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var executor = function executor(func, fallback, config) {
return exists ? nos[func](config) : useFallback(fallback, config);
};
/**
* @function useFallback
* @function useFallback
* @param {function} fallback checks if fallback function exists, otherwise return nothing
* @param {object} args potential arguments that are passed along
*/
Expand Down
Loading

0 comments on commit 1ead8e3

Please sign in to comment.