Skip to content

Commit 53f503e

Browse files
authored
Merge pull request #211 from steemit/change/use-a-js-file-for-methods
Remove usage of JSON files in steem-js
2 parents 5077121 + d52e539 commit 53f503e

6 files changed

Lines changed: 7 additions & 24 deletions

File tree

examples/webpack-example/README.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,6 @@
22
This is a demo of `steem-js` and webpack usage targetting both the Web and
33
Node.js platforms.
44

5-
## Minimal configuration
6-
`steem-js` requires JSON files internally, so you need JSON loader configured:
7-
```json
8-
{
9-
...
10-
module: {
11-
loaders: [
12-
{ test: /\.json$/, loader: 'json-loader'},
13-
]
14-
}
15-
...
16-
}
17-
```
18-
19-
Make sure `resolve.extensions` and `json-loader`'s `module.loaders[...].exclude`
20-
do not exclude `.json` files or `node_modules` from resolving.
21-
225
## Compiling the example
236
Compiling for the web (`bundle.js`, which you can test with `open index.html`):
247
```

examples/webpack-example/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
},
77
module: {
88
loaders: [
9-
{ test: /\.json$/, loader: 'json-loader'},
9+
// { test: /\.json$/, loader: 'json-loader'},
1010
]
1111
},
1212
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "steem",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "Steem.js the JavaScript API for Steem blockchain",
55
"main": "lib/index.js",
66
"scripts": {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[
1+
module.exports = [
22
{
33
"api": "database_api",
44
"method": "set_subscribe_callback",
@@ -492,4 +492,4 @@
492492
"method": "get_market_history_buckets",
493493
"params": []
494494
}
495-
]
495+
];

src/broadcast/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import newDebug from 'debug';
33

44
import broadcastHelpers from './helpers';
55
import formatterFactory from '../formatter';
6-
import operations from './operations.json';
6+
import operations from './operations';
77
import steemApi from '../api';
88
import steemAuth from '../auth';
99
import { camelCase } from '../utils';
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[
1+
module.exports = [
22
{
33
"roles": ["posting"],
44
"operation": "vote",
@@ -493,4 +493,4 @@
493493
"memo"
494494
]
495495
}
496-
]
496+
];

0 commit comments

Comments
 (0)