File tree Expand file tree Collapse file tree 3 files changed +41
-4
lines changed
packages/simplr-validation Expand file tree Collapse file tree 3 files changed +41
-4
lines changed Original file line number Diff line number Diff line change 10
10
"scripts" : {
11
11
"test" : " jest" ,
12
12
"test-watch" : " jest --watchAll" ,
13
- "test-coverage" : " npm test -- --coverage"
13
+ "test-coverage" : " npm test -- --coverage" ,
14
+ "build" : " webpack && npm run tslint" ,
15
+ "watch" : " webpack -w" ,
16
+ "release" : " npm run build && npm run uglifyjs" ,
17
+ "tslint" : " tslint --config ./tslint.json --project . --exclude __tests__/**/* && echo TsLint test successfully passed." ,
18
+ "uglifyjs" : " uglifyjs ./dist/simplr-forms-core.js -o ./dist/simplr-forms-core.min.js --compress --mangle"
14
19
},
15
20
"license" : " AGPL-3.0" ,
16
21
"files" : [
30
35
"react-test-renderer" : " ^15.5.4" ,
31
36
"sinon" : " ^2.1.0" ,
32
37
"ts-jest" : " ^19.0.8" ,
38
+ "ts-loader" : " ^2.0.3" ,
33
39
"tslint" : " ^5.0.0" ,
34
- "typescript" : " 2.3.0"
40
+ "typescript" : " 2.3.0" ,
41
+ "uglifyjs" : " ^2.4.10" ,
42
+ "webpack" : " ^2.4.1"
35
43
},
36
44
"dependencies" : {
37
45
"@types/react" : " ^15.0.21" ,
55
63
" js"
56
64
]
57
65
}
58
- }
66
+ }
Original file line number Diff line number Diff line change 1
- import * as React from "React " ;
1
+ import * as React from "react " ;
2
2
import { Stores , Actions , Contracts as FormsCoreContracts } from "simplr-forms-core" ;
3
3
import * as ActionEmitter from "action-emitter" ;
4
4
Original file line number Diff line number Diff line change
1
+ const packageJson = require ( "./package.json" ) ;
2
+
3
+ let externals = { } ;
4
+
5
+ for ( let key in packageJson . dependencies ) {
6
+ externals [ key ] = key ;
7
+ }
8
+
9
+ module . exports = {
10
+ entry : "./src/index.ts" ,
11
+ output : {
12
+ filename : "./dist/simplr-validation.js" ,
13
+ libraryTarget : "umd"
14
+ } ,
15
+ module : {
16
+ rules : [
17
+ {
18
+ test : / \. t s x ? $ / ,
19
+ loader : "ts-loader" ,
20
+ options : {
21
+ }
22
+ }
23
+ ]
24
+ } ,
25
+ resolve : {
26
+ extensions : [ ".ts" , ".tsx" ]
27
+ } ,
28
+ externals : externals
29
+ } ;
You can’t perform that action at this time.
0 commit comments