Skip to content

Commit 9e63a50

Browse files
committed
2.0.3
1 parent ba85d57 commit 9e63a50

File tree

9 files changed

+18
-19
lines changed

9 files changed

+18
-19
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package-lock.json
44
.idea
55
yarn.lock
66
build
7+
lib
78
examples/*.ttf
89
examples/*.svg
910
examples/*.eot

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Changelog
2+
- 2.0.3
3+
- Fixed import
24
- 2.0.2
35
- Fix for TS
46
- 2.0.1

CONFIG.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ const myConfig = {
194194
[source,javascript]
195195
----
196196
import en_US from 'antd/lib/locale-provider/en_US';
197-
import AntdWidgets from 'react-awesome-query-builder/components/widgets/antd';
197+
import AntdWidgets from 'react-awesome-query-builder/lib/components/widgets/antd';
198198
import {Widgets} from 'react-awesome-query-builder';
199199
const { VanillaFieldSelect } = Widgets;
200200
const { FieldCascader, FieldDropdown } = AntdWidgets;
@@ -448,7 +448,7 @@ See https://github.com/ukrbublik/react-awesome-query-builder/tree/master/example
448448
[source,javascript]
449449
----
450450
import {Widgets} from 'react-awesome-query-builder';
451-
import AntdWidgets from 'react-awesome-query-builder/components/widgets/antd';
451+
import AntdWidgets from 'react-awesome-query-builder/lib/components/widgets/antd';
452452
const {
453453
TextWidget,
454454
NumberWidget,

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ Also see [`examples/demo`](https://github.com/ukrbublik/react-awesome-query-buil
4646
**v2 Migration:**
4747
From v2.0 antd is now optional (peer) dependency.
4848
If you want to use AntDesign widgets, please use `AntdConfig` as base for your config:
49-
`import AntdConfig from 'react-awesome-query-builder/config/antd';`
49+
`import AntdConfig from 'react-awesome-query-builder/lib/config/antd';`
5050
If you want to use another UI, don't import `config/antd` and `css/antd.less`.
5151
You can use `BasicConfig` for simple UI.
5252

5353
```javascript
5454
import React, {Component} from 'react';
5555
import {Query, Builder, BasicConfig, Utils as QbUtils} from 'react-awesome-query-builder';
56-
import AntdConfig from 'react-awesome-query-builder/config/antd';
56+
import AntdConfig from 'react-awesome-query-builder/lib/config/antd';
5757
import 'react-awesome-query-builder/css/antd.less';
5858
// or import "antd/dist/antd.css";
5959
import 'react-awesome-query-builder/css/styles.scss';
@@ -228,7 +228,7 @@ Then open localhost:3001 in a browser.
228228
Scripts:
229229
- `npm run examples` - Builds with webpack the examples and runs a dev-server on localhost:3001.
230230
- `npm run build-examples` - Builds with webpack the examples. Output path: `examples`
231-
- `npm run build-npm` - Builds a npm module. Output path: `build/npm`
231+
- `npm run build-npm` - Builds a npm module. Output path: `lib`
232232

233233
The repo sticks in general to the [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript).
234234

examples/demo/config.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
Operators, Widgets, Fields, Config, Types, Conjunctions, Settings, LocaleSettings, OperatorProximity, Funcs,
77
} from 'react-awesome-query-builder';
88

9-
import AntdConfig from 'react-awesome-query-builder/config/antd';
10-
import AntdWidgets from 'react-awesome-query-builder/components/widgets/antd';
9+
import AntdConfig from 'react-awesome-query-builder/lib/config/antd';
10+
import AntdWidgets from 'react-awesome-query-builder/lib/components/widgets/antd';
1111
const {
1212
FieldSelect,
1313
FieldDropdown,

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-awesome-query-builder",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "User-friendly query builder for React. Demo: https://ukrbublik.github.io/react-awesome-query-builder",
55
"keywords": [
66
"reactjs",
@@ -12,7 +12,7 @@
1212
"antdesign"
1313
],
1414
"main1": "modules",
15-
"main": "build/npm/lib",
15+
"main": "lib",
1616
"types": "modules/index.d.ts",
1717
"browserify1": {
1818
"transform": [

sandbox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"dependencies": {
2020
"react": "^16.4.1",
2121
"react-dom": "^16.4.1",
22-
"react-awesome-query-builder": "^2.0.2",
22+
"react-awesome-query-builder": "^2.0.3",
2323
"react-scripts": "3.0.1",
2424
"antd": "^4.1.2"
2525
},

sandbox/src/demo/config.js renamed to sandbox/src/demo/config.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import merge from 'lodash/merge';
33
import { Widgets, Operators, BasicConfig } from 'react-awesome-query-builder';
44
import en_US from 'antd/lib/locale-provider/en_US';
55
import ru_RU from 'antd/lib/locale-provider/ru_RU';
6-
import AntdConfig from 'react-awesome-query-builder/config/antd';
7-
import AntdWidgets from 'react-awesome-query-builder/components/widgets/antd';
6+
import AntdConfig from 'react-awesome-query-builder/lib/config/antd';
7+
import AntdWidgets from 'react-awesome-query-builder/lib/components/widgets/antd';
88
const {
99
FieldSelect,
1010
FieldDropdown,

scripts/build-npm.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
rm -rf build/npm
2-
babel -d build/npm/lib ./modules
3-
cp README.md build/npm
4-
cp CONFIG.adoc build/npm
5-
find build/npm/lib -type d -name __tests__ | xargs rm -rf
6-
node -p 'p=require("./package");p.main="lib";p.scripts=p.devDependencies=undefined;JSON.stringify(p,null,2)' > build/npm/package.json
7-
1+
rm -rf lib
2+
babel -d lib ./modules
3+
find lib -type d -name __tests__ | xargs rm -rf

0 commit comments

Comments
 (0)