@@ -8,27 +8,41 @@ import gzip from 'rollup-plugin-gzip'
88
99const configs = [ ]
1010
11- for ( const format of [ 'umd' , 'cjs' , 'amd' , 'esm' ] ) {
12- for ( const productive of [ false , true ] ) {
13- configs . push ( createConfig ( format , productive ) )
11+ for ( const pkg of [ 'core' , 'validators' ] ) {
12+ for ( const format of [ 'umd' , 'cjs' , 'amd' , 'esm' ] ) {
13+ for ( const productive of [ false , true ] ) {
14+ configs . push ( createConfig ( pkg , format , productive ) )
15+ }
1416 }
1517}
1618
1719export default configs
1820
1921// --- locals -------------------------------------------------------
2022
21- function createConfig ( moduleFormat , productive ) {
23+ function createConfig ( pkg , moduleFormat , productive ) {
24+ let file
25+
26+ if ( pkg === 'core' ) {
27+ file = productive
28+ ? `dist/js-spec.${ moduleFormat } .production.js`
29+ : `dist/js-spec.${ moduleFormat } .development.js`
30+ } else if ( pkg === 'validators' ) {
31+ file = productive
32+ ? `dist/js-spec.validators.${ moduleFormat } .production.js`
33+ : `dist/js-spec.validators.${ moduleFormat } .development.js`
34+ }
35+
2236 return {
23- input : 'src/main/js-spec.ts' ,
37+ input :
38+ pkg === 'core'
39+ ? 'src/main/js-spec.ts'
40+ : 'src/main/api/validators.ts' ,
2441
2542 output : {
26- file : productive
27- ? `dist/js-spec.${ moduleFormat } .production.js`
28- : `dist/js-spec.${ moduleFormat } .development.js` ,
29-
43+ file,
3044 format : moduleFormat ,
31- name : ' jsSpec',
45+ name : pkg === 'core' ? ' jsSpec' : 'jsSpec.validators ',
3246 sourcemap : productive ? false : 'inline' ,
3347
3448 globals : {
@@ -39,11 +53,7 @@ function createConfig(moduleFormat, productive) {
3953 external : [ ] ,
4054
4155 plugins : [
42- resolve ( {
43- jsnext : true ,
44- main : true ,
45- browser : true ,
46- } ) ,
56+ resolve ( ) ,
4757 // tslint({
4858 //}),
4959 replace ( {
0 commit comments