Skip to content

Commit

Permalink
Merge pull request #249 from multiversx/rebranding-03
Browse files Browse the repository at this point in the history
Rename package: sdk-core (instead of erdjs)
  • Loading branch information
andreibancioiu authored Jan 11, 2023
2 parents 049e82c + 6c8acf6 commit e13ad27
Show file tree
Hide file tree
Showing 24 changed files with 234 additions and 229 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/erdjs.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Build and Test erdjs
name: Build and Test

on:
pull_request:
branches: [ main, development ]
workflow_dispatch:

jobs:
build-erdjs:
build:

runs-on: ubuntu-latest

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish erdjs (not main)
name: Publish (not main)

on:
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish erdjs
name: Publish

on:
workflow_dispatch:
Expand Down
27 changes: 9 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,22 @@
.PHONY: clean browser-tests

browser-tests: out-browser-tests/erdjs-tests-unit.js out-browser-tests/erdjs-tests-unit-min.js out-browser-tests/erdjs-tests-localnet.js out-browser-tests/erdjs-tests-devnet.js out-browser-tests/erdjs-tests-testnet.js
browser-tests: out-browser-tests/tests-unit.js out-browser-tests/tests-localnet.js out-browser-tests/tests-devnet.js out-browser-tests/tests-testnet.js

out-browser-tests/erdjs-tests-unit.js: out-tests
npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.net.spec.*') --require buffer/:buffer -o out-browser-tests/erdjs-tests-unit.js --standalone erdjs-tests -p esmify
out-browser-tests/tests-unit.js: out-tests
npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.net.spec.*') --require buffer/:buffer -o out-browser-tests/tests-unit.js --standalone tests -p esmify

out-browser-tests/erdjs-tests-unit-min.js: out-tests
npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.net.spec.*') --require buffer/:buffer -o out-browser-tests/erdjs-tests-unit-min.js --standalone erdjs-tests -p esmify -p tinyify
out-browser-tests/tests-localnet.js: out-tests
npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.spec.*') $(shell find out-tests -type f -name '*.local.net.spec.js') --require buffer/:buffer -o out-browser-tests/tests-localnet.js --standalone tests -p esmify

out-browser-tests/erdjs-tests-localnet.js: out-tests
npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.spec.*') $(shell find out-tests -type f -name '*.local.net.spec.js') --require buffer/:buffer -o out-browser-tests/erdjs-tests-localnet.js --standalone erdjs-tests -p esmify
out-browser-tests/tests-devnet.js: out-tests
npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.spec.*') $(shell find out-tests -type f -name '*.dev.net.spec.js') --require buffer/:buffer -o out-browser-tests/tests-devnet.js --standalone tests -p esmify

out-browser-tests/erdjs-tests-devnet.js: out-tests
npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.spec.*') $(shell find out-tests -type f -name '*.dev.net.spec.js') --require buffer/:buffer -o out-browser-tests/erdjs-tests-devnet.js --standalone erdjs-tests -p esmify

out-browser-tests/erdjs-tests-testnet.js: out-tests
npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.spec.*') $(shell find out-tests -type f -name '*.test.net.spec.js') --require buffer/:buffer -o out-browser-tests/erdjs-tests-testnet.js --standalone erdjs-tests -p esmify
out-browser-tests/tests-testnet.js: out-tests
npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.spec.*') $(shell find out-tests -type f -name '*.test.net.spec.js') --require buffer/:buffer -o out-browser-tests/tests-testnet.js --standalone tests -p esmify

out-tests:
npx tsc -p tsconfig.tests.json

publish-erdjs-beta:
npm publish --tag=beta --access=public

publish-erdjs:
npm publish --access=public

clean:
rm -rf out-tests
rm -rf out-browser-tests
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ MultiversX SDK for JavaScript and TypeScript (written in TypeScript).

## Distribution

[npm](https://www.npmjs.com/package/@multiversx/erdjs)
[npm](https://www.npmjs.com/package/@multiversx/sdk-core)

## Installation

`erdjs` is delivered via **npm** and it can be installed as follows:
`sdk-core` is delivered via **npm** and it can be installed as follows:

```
npm install @multiversx/erdjs
npm install @multiversx/sdk-core
```

## Development
Expand All @@ -24,15 +24,15 @@ Feel free to skip this section if you are not a contributor.

### Prerequisites

`browserify` is required to compile the browser-friendly versions of `erdjs`. It can be installed as follows:
`browserify` is required to compile the browser-friendly versions of `sdk-core`. It can be installed as follows:

```
npm install --global browserify
```

### Building the library

In order to compile `erdjs`, run the following:
In order to compile the library, run the following:

```
npm install
Expand Down
15 changes: 5 additions & 10 deletions browser-tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<base href="../" />
<meta charset="utf-8">
<title>Run erdjs Tests in the Browser</title>
<title>Run Tests in the Browser</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="/node_modules/mocha/mocha.css">
</head>
Expand All @@ -14,27 +14,22 @@
<div class="col-sm-12">
<ul id="TestChoices" class="list-group">
<li class="list-group-item">
<button class="btn btn-link" onclick="runTests('/out-browser-tests/erdjs-tests-unit.js')">
<button class="btn btn-link" onclick="runTests('/out-browser-tests/tests-unit.js')">
Unit tests
</button>
</li>
<li class="list-group-item">
<button class="btn btn-link" onclick="runTests('/out-browser-tests/erdjs-tests-unit-min.js')">
Unit tests (minified code)
</button>
</li>
<li class="list-group-item">
<button class="btn btn-link" onclick="runTests('/out-browser-tests/erdjs-tests-localnet.js')">
<button class="btn btn-link" onclick="runTests('/out-browser-tests/tests-localnet.js')">
Integration tests - local testnet
</button>
</li>
<li class="list-group-item">
<button class="btn btn-link" onclick="runTests('/out-browser-tests/erdjs-tests-devnet.js')">
<button class="btn btn-link" onclick="runTests('/out-browser-tests/tests-devnet.js')">
Integration tests - devnet
</button>
</li>
<li class="list-group-item">
<button class="btn btn-link" onclick="runTests('/out-browser-tests/erdjs-tests-testnet.js')">
<button class="btn btn-link" onclick="runTests('/out-browser-tests/tests-testnet.js')">
Integration tests - testnet
</button>
</li>
Expand Down
Loading

0 comments on commit e13ad27

Please sign in to comment.