File tree 5 files changed +122
-5683
lines changed
5 files changed +122
-5683
lines changed Original file line number Diff line number Diff line change
1
+ version : 2
2
+
3
+ jobs :
4
+ build :
5
+ docker :
6
+ - image : circleci/node:latest
7
+ steps :
8
+ - checkout
9
+ - run :
10
+ name : Update npm
11
+ command : ' sudo npm install -g npm@latest'
12
+ - restore_cache :
13
+ key : dependency-cache-{{ checksum "package.json" }}
14
+ - run :
15
+ name : NPM Install
16
+ command : npm install
17
+ - run :
18
+ name : NPM Build
19
+ command : npm run build
20
+ - save_cache :
21
+ key : dependency-cache-{{ checksum "package.json" }}
22
+ paths :
23
+ - node_modules
24
+ - dist
25
+ test :
26
+ docker :
27
+ - image : circleci/node:latest
28
+ steps :
29
+ - checkout
30
+ - restore_cache :
31
+ key : dependency-cache-{{ checksum "package.json" }}
32
+ - run :
33
+ name : Lint
34
+ command : npm run lint
35
+ - run :
36
+ name : Test
37
+ command : npm test
38
+ publish-dev :
39
+ docker :
40
+ - image : circleci/node:latest
41
+ steps :
42
+ - checkout
43
+ - restore_cache :
44
+ key : dependency-cache-{{ checksum "package.json" }}
45
+ - run :
46
+ name : Set Develop Version
47
+ command : git rev-parse develop | cut -c1-10 | xargs -I[] ./node_modules/package-tagger/index.js dev.[]
48
+ - run :
49
+ name : Authenticate with registry
50
+ command : echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > .npmrc
51
+ - run :
52
+ name : Publish package
53
+ command : npm publish --tag develop
54
+
55
+ workflows :
56
+ version : 2
57
+ build_and_test :
58
+ jobs :
59
+ - build
60
+ - test :
61
+ requires :
62
+ - build
63
+ - publish-dev :
64
+ requires :
65
+ - build
66
+ - test
67
+ filters :
68
+ branches :
69
+ only : develop
70
+
Original file line number Diff line number Diff line change 1
1
node_modules /
2
2
dist /
3
+ package-lock.json
Original file line number Diff line number Diff line change 1
- # xdr-js-serialize
2
- Javascript XDR Codec
1
+ # XDR JS Serialize
2
+
3
+ [ ![ CircleCI] ( https://circleci.com/gh/kochavalabs/xdr-js-serialize.svg?style=svg )] ( https://circleci.com/gh/kochavalabs/xdr-js-serialize )
4
+
5
+ Xdr-js-serialize is a library for facilitating (de)serialization between the
6
+ [ XDR] ( https://en.wikipedia.org/wiki/External_Data_Representation ) format and
7
+ Javascript Dictionaries.
8
+
9
+ This repository is best used in tandom with [ xdr-codegen] ( https://github.com/kochavalabs/xdr-codegen )
10
+ for anything beyond basic xdr manipulation.
11
+
12
+ ## Installation
13
+
14
+ This library can be added to your project by using npm to install the
15
+ xdr-js-serialize package.
16
+
17
+ ``` bash
18
+ npm install xdr-js-serialize
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ``` js
24
+ import types from ' xdr-js-serialize'
25
+
26
+ const string = new types.Str (' asdf' )
27
+
28
+ console .log (string .toJSON ())
29
+ console .log (string .toXDR (' hex' ))
30
+
31
+ // console:
32
+ // asdf
33
+ // 0000000461736466
34
+ ```
35
+
36
+ ## License
37
+
38
+ [ MIT] ( https://choosealicense.com/licenses/mit/ )
39
+
40
+ ## Notes
41
+
42
+ - The XDR Quad type is currently not supported
You can’t perform that action at this time.
0 commit comments