forked from chakra-ui/chakra-ui-vue
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(kiwi): rollup builds and lerna workspaces
- Loading branch information
1 parent
6b4b396
commit 6615655
Showing
59 changed files
with
7,625 additions
and
1,940 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"packages": [ | ||
"packages/*" | ||
], | ||
"npmClient": "yarn", | ||
"version": "independent", | ||
"useWorkspaces": true, | ||
"registry": "https://registry.npmjs.org/", | ||
"command": { | ||
"publish": { | ||
"conventionalCommits": true, | ||
"message": "chore(release): publish" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "@kiwi-ui/core", | ||
"version": "1.0.0", | ||
"description": "🥝 A Scalable, Accessible, High Performance, Vue.js UI component library", | ||
"author": "Jonathan Bakebwa <[email protected]>", | ||
"license": "MIT", | ||
"sideEffects": false, | ||
"private": false, | ||
"scripts": { | ||
"build": "rollup --c --watch" | ||
}, | ||
"dependencies": { | ||
"breadstick": "^0.1.17", | ||
"color": "^3.1.2", | ||
"lodash-es": "^4.17.15" | ||
}, | ||
"peerDependencies": { | ||
"velocity-animate": "^1.5.2", | ||
"vue": "^2.6.10", | ||
"vue-styled-components": "^1.4.14" | ||
}, | ||
"devDependencies": { | ||
"core-js": "^3.4.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
import babel from 'rollup-plugin-babel' | ||
import resolve from 'rollup-plugin-node-resolve' | ||
import cjs from 'rollup-plugin-commonjs' | ||
import { terser } from 'rollup-plugin-terser' | ||
import buble from 'rollup-plugin-buble' | ||
import vue from 'rollup-plugin-vue' | ||
import pkg from './package.json' | ||
|
||
const production = !process.env.ROLLUP_WATCH | ||
|
||
// Plugins | ||
const bubelConfig = buble({ | ||
objectAssign: 'Object.assign', | ||
transforms: { | ||
dangerousTaggedTemplateString: true, | ||
dangerousForOf: true | ||
} | ||
}) | ||
|
||
const babelConfig = babel({ | ||
exclude: /node_modules/, | ||
runtimeHelpers: true, | ||
babelrc: false, | ||
presets: [ | ||
[ | ||
'@babel/preset-env', { | ||
modules: false | ||
} | ||
] | ||
], | ||
plugins: [ | ||
'babel-plugin-transform-es2015-for-of' | ||
] | ||
}) | ||
|
||
const vueConfig = vue({ | ||
template: { | ||
isProduction: true | ||
} | ||
}) | ||
|
||
// Externals | ||
const externals = [ | ||
...Object.keys(pkg.peerDependencies || {}) | ||
] | ||
|
||
const commons = { | ||
external: externals, | ||
plugins: [ | ||
resolve(), | ||
bubelConfig, | ||
babelConfig, | ||
vueConfig, | ||
cjs({ | ||
include: /node_modules/ | ||
}), | ||
production && terser() | ||
] | ||
} | ||
|
||
/** | ||
* Configurations | ||
*/ | ||
export default [ | ||
{ | ||
input: 'src/index.js', | ||
output: [ | ||
{ | ||
file: `dist/index.esm.js`, | ||
format: 'esm' | ||
} | ||
], | ||
...commons | ||
}, | ||
{ | ||
input: 'src/index.js', | ||
output: [ | ||
{ | ||
name: 'KiwiUI', | ||
file: `dist/index.umd.js`, | ||
format: 'umd', | ||
exports: 'named' | ||
} | ||
], | ||
...commons | ||
}, | ||
{ | ||
input: 'src/index.js', | ||
output: [ | ||
{ | ||
name: 'KiwiUI', | ||
file: `dist/index.cjs.js`, | ||
format: 'cjs', | ||
exports: 'named' | ||
} | ||
], | ||
...commons | ||
} | ||
] |
Oops, something went wrong.