Skip to content

Commit

Permalink
fix: added config files (without re-formatting) to /dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
MildTomato committed Jan 22, 2022
1 parent 5cf8995 commit ed26cb2
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 13 deletions.
78 changes: 78 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"react-transition-group": "^4.4.1",
"remark-gfm": "^1.0.0",
"rollup": "^2.28.2",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-node-externals": "^2.2.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
Expand Down
23 changes: 12 additions & 11 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import typescript from 'rollup-plugin-typescript2'
// remove when JS files have been removed
import nodeResolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import copy from 'rollup-plugin-copy'

import icons from './internals/icons'

Expand Down Expand Up @@ -115,17 +116,17 @@ export default [
extensions,
}),
del({ targets: ['dist/*'] }),
copy({
targets: [
{ src: 'ui.config.js', dest: 'dist/config' },
{ src: 'default-colors.js', dest: 'dist/config' },
{
src: 'src/lib/theme/defaultTheme.ts',
dest: 'dist/config',
rename: () => 'default-theme.js',
},
],
}),
],
},
// add the ui config file to root of dist
{
input: {
'ui.config': 'ui.config.js',
'brand-colors': 'default-colors.js',
},
output: {
dir: 'dist',
format: 'es',
},
},
]
4 changes: 2 additions & 2 deletions ui.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const deepMerge = require('deepmerge')
const forms = require('@tailwindcss/forms')
const plugin = require('tailwindcss/plugin')
const radixUiColors = require('@radix-ui/colors')
const brandColors = require('./brand-colors')
const brandColors = require('./default-colors')

// console.log(Object.keys(radixUiColors))

Expand Down Expand Up @@ -58,7 +58,7 @@ function generateColorClasses() {
return x.indexOf(v) >= 0
})
) {
console.log(x)
// console.log(x)
mappedColors[`${x}-fixed`][
step * 100
] = `var(--colors-fixed-${x}${step})`
Expand Down

0 comments on commit ed26cb2

Please sign in to comment.