Skip to content

Commit

Permalink
[Makefile][skyapi-fetch] refs #11 Added support typescript fetch to 0…
Browse files Browse the repository at this point in the history
….27.0
  • Loading branch information
Maykel Arias Torres committed Aug 8, 2019
1 parent 27bb1b7 commit f8a1caa
Show file tree
Hide file tree
Showing 57 changed files with 6,494 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ tests/node/node_modules
lib/node/node_modules
tests/axios/npm-debug.log
tests/node/npm-debug.log
tests/fetch/npm-debug.log
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ JS_INCLUDE= -I/usr/include/nodejs/src
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

install: build-node-client build-node-tester build-axios-client build-axios-tester ; ## Build all libraries and tester
install: build-node-client build-node-tester build-axios-client build-axios-tester build-fetch-client build-fetch-tester; ## Build all libraries and tester

test: test-node-client test-axios-client ; ## Test all clients
test: test-node-client test-axios-client test-fetch-client; ## Test all clients

test-node-client: ## Test node client
export HOST='https://staging.node.skycoin.net' && \
Expand All @@ -47,12 +47,21 @@ test-axios-client: ## Test axios client
export HOST='https://node.skycoin.net' && \
(cd ./tests/axios/ && npm run test )

test-fetch-client: ## Test axios client
export HOST='https://staging.node.skycoin.net' && \
(cd ./tests/fetch/ && npm run test ) && \
export HOST='https://node.skycoin.net' && \
(cd ./tests/fetch/ && npm run test )

build-axios-client: ## Build axios client
(cd $(JS_CLIENT_DIR)/axios/ && npm install && npm run build)

build-node-client: ## Build node client
(cd './lib/skyapi/node/' && npm install && npm run build)

build-fetch-client: ## Build fetch client
(cd './lib/skyapi/fetch/' && npm install && npm run build)

build-node-tester: ## Build node client tester
(cd './tests/node/' && npm install)

Expand Down
4 changes: 4 additions & 0 deletions lib/skyapi/fetch/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
wwwroot/*.js
node_modules
typings
dist
23 changes: 23 additions & 0 deletions lib/skyapi/fetch/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
1 change: 1 addition & 0 deletions lib/skyapi/fetch/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.0.3
45 changes: 45 additions & 0 deletions lib/skyapi/fetch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## @simelo/skyapi-fetch@0.27.0

This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:

Environment
* Node.js
* Webpack
* Browserify

Language level
* ES5 - you must have a Promises/A+ library installed
* ES6

Module system
* CommonJS
* ES6 module system

It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html))

### Building

To build and compile the typescript sources to javascript use:
```
npm install
npm run build
```

### Publishing

First build the package then run ```npm publish```

### Consuming

navigate to the folder of your consuming project and run one of the following commands.

_published:_

```
npm install @simelo/[email protected] --save
```

_unPublished (not recommended):_

```
npm install @simelo/[email protected] --save
Loading

0 comments on commit f8a1caa

Please sign in to comment.