diff --git a/examples/webpack-example/README.md b/examples/webpack-example/README.md index 4aaa441d..b2a6ba49 100644 --- a/examples/webpack-example/README.md +++ b/examples/webpack-example/README.md @@ -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`): ``` diff --git a/examples/webpack-example/webpack.config.js b/examples/webpack-example/webpack.config.js index d8a3297d..9472dec6 100644 --- a/examples/webpack-example/webpack.config.js +++ b/examples/webpack-example/webpack.config.js @@ -6,7 +6,7 @@ module.exports = { }, module: { loaders: [ - { test: /\.json$/, loader: 'json-loader'}, + // { test: /\.json$/, loader: 'json-loader'}, ] }, } diff --git a/package.json b/package.json index f0d90083..98cef63f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "steem", - "version": "0.6.0", + "version": "0.6.1", "description": "Steem.js the JavaScript API for Steem blockchain", "main": "lib/index.js", "scripts": { diff --git a/src/api/methods.json b/src/api/methods.js similarity index 99% rename from src/api/methods.json rename to src/api/methods.js index 51f5bbaf..a93afed4 100644 --- a/src/api/methods.json +++ b/src/api/methods.js @@ -1,4 +1,4 @@ -[ +module.exports = [ { "api": "database_api", "method": "set_subscribe_callback", @@ -492,4 +492,4 @@ "method": "get_market_history_buckets", "params": [] } -] +]; diff --git a/src/broadcast/index.js b/src/broadcast/index.js index b19476e5..cbe625c6 100644 --- a/src/broadcast/index.js +++ b/src/broadcast/index.js @@ -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'; diff --git a/src/broadcast/operations.json b/src/broadcast/operations.js similarity index 99% rename from src/broadcast/operations.json rename to src/broadcast/operations.js index a94bae75..964893d2 100644 --- a/src/broadcast/operations.json +++ b/src/broadcast/operations.js @@ -1,4 +1,4 @@ -[ +module.exports = [ { "roles": ["posting"], "operation": "vote", @@ -493,4 +493,4 @@ "memo" ] } -] +];