Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion config/rollup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import resolve from 'rollup-plugin-node-resolve'
import babel from 'rollup-plugin-babel'
import replace from 'rollup-plugin-replace'
import commonjs from 'rollup-plugin-commonjs'
import copy from 'rollup-plugin-cpy'
import { uglify } from 'rollup-plugin-uglify'

// eslint-disable-next-line
Expand All @@ -11,10 +12,20 @@ const babelConfig = require('../../.babelrc')
export const getRollupConfig = ({ pkg, pwd, buildName }) => {
const SOURCE_DIR = path.resolve(pwd, 'src')
const DIST_DIR = path.resolve(pwd, 'dist')
const CORE_DIR = path.resolve(pwd, '../shared/core');

const baseConfig = {
input: `${SOURCE_DIR}/index.js`,
plugins: [babel({ exclude: '**/node_modules/**', ...babelConfig })],
plugins: [
babel({
"exclude": "**/node_modules/**",
...babelConfig
}),
copy({
"files": `${CORE_DIR}/*.d.ts`,
"dest": DIST_DIR
})
],
}

const esConfig = Object.assign({}, baseConfig, {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"remark-external-links": "^3.0.0",
"rollup": "^0.66.6",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-cpy": "^1.1.0",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-replace": "^2.1.0",
Expand Down
1 change: 1 addition & 0 deletions packages/core-em/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"main": "dist/smooth-ui-core-em.cjs.js",
"module": "dist/smooth-ui-core-em.es.js",
"jsnext:main": "dist/smooth-ui-core-em.es.js",
"types": "dist/index.d.ts",
"author": "Greg Bergé <berge.greg@gmail.com>",
"license": "MIT",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions packages/core-sc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"main": "dist/smooth-ui-core-sc.cjs.js",
"module": "dist/smooth-ui-core-sc.es.js",
"jsnext:main": "dist/smooth-ui-core-sc.es.js",
"types": "dist/index.d.ts",
"author": "Greg Bergé <berge.greg@gmail.com>",
"license": "MIT",
"scripts": {
Expand Down
Loading