Skip to content

Commit e94b6b2

Browse files
Webpack configured. (#5)
* Webpack configured.
1 parent c0978b6 commit e94b6b2

File tree

16 files changed

+84
-7317
lines changed

16 files changed

+84
-7317
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,4 @@ paket-files/
250250
# JetBrains Rider
251251
.idea/
252252
*.sln.iml
253+
yarn.lock

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"private": true,
44
"scripts": {},
55
"devDependencies": {
6-
"lerna": "2.0.0-rc.1"
6+
"lerna": "2.0.0-rc.1",
7+
"typescript": "2.3.0"
78
}
8-
}
9+
}

packages/simplr-forms-core/__tests__/tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
"pretty": true,
1212
"strict": true,
1313
"noEmit": true,
14-
"noUnusedLocals": true
14+
"noUnusedLocals": true,
15+
"lib": [
16+
"dom",
17+
"dom.iterable",
18+
"es6"
19+
]
1520
},
1621
"exclude": [
1722
"node_modules",

packages/simplr-forms-core/package.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
"version": "4.0.0-alpha",
44
"description": "Shared simplr-forms logic.",
55
"repository": "https://github.com/SimplrJS/simplr-forms",
6-
"main": "index.js",
6+
"main": "dist/simplr-forms-core.js",
7+
"types": "@types/index.d.ts",
78
"scripts": {
8-
"build": "tsc -p .",
9+
"build": "webpack && npm run tslint-test",
10+
"watch": "webpack -w",
11+
"tslint-test": "tslint --config ./tslint.json --project . --exclude __tests__/**/* && echo TsLint test successfully passed.",
12+
"uglifyjs": "uglifyjs ./dist/simplr-forms-core.js -o ./dist/simplr-forms-core.min.js --compress --mangle",
13+
"release": "npm run build && npm run uglifyjs",
914
"test": "jest",
1015
"test-watch": "jest --watchAll",
1116
"test-coverage": "npm test -- --coverage"
@@ -22,19 +27,19 @@
2227
"react-addons-test-utils": "^15.5.1",
2328
"sinon": "^2.1.0",
2429
"ts-jest": "^19.0.8",
30+
"ts-loader": "^2.0.3",
2531
"tslint": "^5.0.0",
26-
"typescript": "2.3.0"
32+
"typescript": "2.3.0",
33+
"uglify-js": "^2.8.22",
34+
"webpack": "^2.3.3"
2735
},
2836
"dependencies": {
29-
"@types/core-js": "0.9.35",
3037
"@types/fbemitter": "^2.0.32",
3138
"@types/flux": "^3.0.1",
3239
"@types/react": "^15.0.21",
3340
"@types/react-dom": "^0.14.23",
3441
"action-emitter": "^0.2.1",
35-
"core-js": "^2.4.1",
3642
"fbemitter": "^2.1.1",
37-
"flux": "^3.1.2",
3843
"immutable": "^3.8.1",
3944
"react": "15.4.2",
4045
"react-dom": "15.4.2",
@@ -52,4 +57,4 @@
5257
"js"
5358
]
5459
}
55-
}
60+
}

packages/simplr-forms-core/src/abstractions/base-field.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from "react";
2-
import * as fbemitter from "fbemitter";
2+
import * as actionEmitter from "action-emitter";
33

44
import {
55
FieldProps,
@@ -67,7 +67,7 @@ export abstract class BaseField<TProps extends FieldProps, TState extends BaseFi
6767
return this.context.FieldsGroupId;
6868
}
6969

70-
protected StoreEventSubscription: fbemitter.EventSubscription;
70+
protected StoreEventSubscription: actionEmitter.EventSubscription;
7171

7272
componentWillMount() {
7373
// props.name MUST have a proper value
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./base-field";
2+
export * from "./base-form";
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./form-store-actions";
2+
export * from "./form-stores-handler-actions";
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export * from "./error";
2+
export * from "./field";
3+
export * from "./fields-group";
4+
export * from "./form-store";
5+
export * from "./form";
6+
export * from "./value";
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import * as Abstractions from "./abstractions/index";
2+
import * as Actions from "./actions/index";
3+
import * as Contracts from "./contracts/index";
4+
import * as Stores from "./stores/index";
5+
6+
export {
7+
Abstractions,
8+
Actions,
9+
Contracts,
10+
Stores
11+
};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./form-store";
2+
export * from "./form-stores-handler";

0 commit comments

Comments
 (0)