Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
hive
hive-js
Commits
53f503e7
Commit
53f503e7
authored
Jul 17, 2017
by
Fabien
Committed by
GitHub
Jul 17, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #211 from steemit/change/use-a-js-file-for-methods
Remove usage of JSON files in steem-js
parents
5077121e
d52e5394
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
24 deletions
+7
-24
examples/webpack-example/README.md
examples/webpack-example/README.md
+0
-17
examples/webpack-example/webpack.config.js
examples/webpack-example/webpack.config.js
+1
-1
package.json
package.json
+1
-1
src/api/methods.js
src/api/methods.js
+2
-2
src/broadcast/index.js
src/broadcast/index.js
+1
-1
src/broadcast/operations.js
src/broadcast/operations.js
+2
-2
No files found.
examples/webpack-example/README.md
View file @
53f503e7
...
...
@@ -2,23 +2,6 @@
This is a demo of
`steem-js`
and webpack usage targetting both the Web and
Node.js platforms.
## Minimal configuration
`steem-js`
requires JSON files internally, so you need JSON loader configured:
```
json
{
...
module:
{
loaders:
[
{
test:
/\.json$/
,
loader:
'json-loader'
},
]
}
...
}
```
Make sure
`resolve.extensions`
and
`json-loader`
's
`module.loaders[...].exclude`
do not exclude
`.json`
files or
`node_modules`
from resolving.
## Compiling the example
Compiling for the web (
`bundle.js`
, which you can test with
`open index.html`
):
```
...
...
examples/webpack-example/webpack.config.js
View file @
53f503e7
...
...
@@ -6,7 +6,7 @@ module.exports = {
},
module
:
{
loaders
:
[
{
test
:
/
\.
json$/
,
loader
:
'
json-loader
'
},
//
{ test: /\.json$/, loader: 'json-loader'},
]
},
}
package.json
View file @
53f503e7
{
"name"
:
"steem"
,
"version"
:
"0.6.
0
"
,
"version"
:
"0.6.
1
"
,
"description"
:
"Steem.js the JavaScript API for Steem blockchain"
,
"main"
:
"lib/index.js"
,
"scripts"
:
{
...
...
src/api/methods.js
on
→
src/api/methods.js
View file @
53f503e7
[
module
.
exports
=
[
{
"
api
"
:
"
database_api
"
,
"
method
"
:
"
set_subscribe_callback
"
,
...
...
@@ -492,4 +492,4 @@
"
method
"
:
"
get_market_history_buckets
"
,
"
params
"
:
[]
}
]
]
;
src/broadcast/index.js
View file @
53f503e7
...
...
@@ -3,7 +3,7 @@ import newDebug from 'debug';
import
broadcastHelpers
from
'
./helpers
'
;
import
formatterFactory
from
'
../formatter
'
;
import
operations
from
'
./operations
.json
'
;
import
operations
from
'
./operations
'
;
import
steemApi
from
'
../api
'
;
import
steemAuth
from
'
../auth
'
;
import
{
camelCase
}
from
'
../utils
'
;
...
...
src/broadcast/operations.js
on
→
src/broadcast/operations.js
View file @
53f503e7
[
module
.
exports
=
[
{
"
roles
"
:
[
"
posting
"
],
"
operation
"
:
"
vote
"
,
...
...
@@ -493,4 +493,4 @@
"
memo
"
]
}
]
]
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment