This repository was archived by the owner on Jun 20, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +886
-1
lines changed Expand file tree Collapse file tree 6 files changed +886
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import resolve from 'rollup-plugin-node-resolve'
33import babel from 'rollup-plugin-babel'
44import replace from 'rollup-plugin-replace'
55import commonjs from 'rollup-plugin-commonjs'
6+ import copy from 'rollup-plugin-cpy'
67import { uglify } from 'rollup-plugin-uglify'
78
89// eslint-disable-next-line
@@ -11,10 +12,20 @@ const babelConfig = require('../../.babelrc')
1112export const getRollupConfig = ( { pkg, pwd, buildName } ) => {
1213 const SOURCE_DIR = path . resolve ( pwd , 'src' )
1314 const DIST_DIR = path . resolve ( pwd , 'dist' )
15+ const CORE_DIR = path . resolve ( pwd , '../shared/core' ) ;
1416
1517 const baseConfig = {
1618 input : `${ SOURCE_DIR } /index.js` ,
17- plugins : [ babel ( { exclude : '**/node_modules/**' , ...babelConfig } ) ] ,
19+ plugins : [
20+ babel ( {
21+ "exclude" : "**/node_modules/**" ,
22+ ...babelConfig
23+ } ) ,
24+ copy ( {
25+ "files" : `${ CORE_DIR } /*.d.ts` ,
26+ "dest" : DIST_DIR
27+ } )
28+ ] ,
1829 }
1930
2031 const esConfig = Object . assign ( { } , baseConfig , {
Original file line number Diff line number Diff line change 6666 "remark-external-links" : " ^3.0.0" ,
6767 "rollup" : " ^0.66.6" ,
6868 "rollup-plugin-babel" : " ^4.0.3" ,
69+ "rollup-plugin-cpy" : " ^1.1.0" ,
6970 "rollup-plugin-commonjs" : " ^9.2.0" ,
7071 "rollup-plugin-node-resolve" : " ^3.4.0" ,
7172 "rollup-plugin-replace" : " ^2.1.0" ,
Original file line number Diff line number Diff line change 1515 "main" : " dist/smooth-ui-core-em.cjs.js" ,
1616 "module" : " dist/smooth-ui-core-em.es.js" ,
1717 "jsnext:main" : " dist/smooth-ui-core-em.es.js" ,
18+ "types" : " dist/index.d.ts" ,
1819 "author" : " Greg Bergé <berge.greg@gmail.com>" ,
1920 "license" : " MIT" ,
2021 "scripts" : {
Original file line number Diff line number Diff line change 1414 "main" : " dist/smooth-ui-core-sc.cjs.js" ,
1515 "module" : " dist/smooth-ui-core-sc.es.js" ,
1616 "jsnext:main" : " dist/smooth-ui-core-sc.es.js" ,
17+ "types" : " dist/index.d.ts" ,
1718 "author" : " Greg Bergé <berge.greg@gmail.com>" ,
1819 "license" : " MIT" ,
1920 "scripts" : {
You can’t perform that action at this time.
0 commit comments