Skip to content

Commit

Permalink
feat(lib): export tailwind config (#201)
Browse files Browse the repository at this point in the history
* feat(lib): export tailwind config

* feat(lib): export tailwind config

* feat(lib): export tailwind config
  • Loading branch information
LouisMazel committed Mar 7, 2022
1 parent 65f12ef commit 94fddb9
Show file tree
Hide file tree
Showing 19 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/docs/docs/guide/dark-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To enable the dark you have just to add `dark` class to the `<html />` of your p
</template>
<script lang="ts" setup>
const { onMounted } from 'vue'
import { onMounted } from 'vue'
onMounted(() => {
autoSetDarkMode()
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/docs/plugins/toaster.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ import { installToaster, ToasterOptions } from 'maz-ui'
const app = createApp(App)

// DEFAULT OPTIONS
const defaultOptions: ToasterOptions = {
const toasterOptions: ToasterOptions = {
position: 'bottom-right',
timeout: 10_000,
persistent: false,
Expand Down
5 changes: 2 additions & 3 deletions packages/lib/build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ if (!argv.format || argv.format === 'esm') {
dir: 'modules',
format: 'esm',
exports: 'named',
sourcemap: true,
// compact: true,
compact: true,
},
plugins: [
peerDepsExternal(),
Expand Down Expand Up @@ -200,7 +199,7 @@ if (!argv.format || argv.format === 'components') {
dir: 'components',
exports: 'named',
format: 'esm',
sourcemap: true,
compact: true,
},
plugins: [
peerDepsExternal(),
Expand Down
5 changes: 3 additions & 2 deletions packages/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"components",
"modules",
"css",
"maz-ui.d.ts"
"maz-ui.d.ts",
"tailwindcss"
],
"scripts": {
"test": "jest",
Expand All @@ -27,7 +28,7 @@
"build:copy-comp-types": "node build/copy-components-types.js",
"build:gen-components-entry": "cross-env NODE_ENV=production node build/generate-components-entry",
"build:components-entry": "cross-env NODE_ENV=production node build/build-components-entry.js",
"build:css": "NODE_ENV=production tailwindcss -i ./package/tailwindcss/css/tailwind.css -o css/main.css --config ./tailwind.config.js --postcss",
"build:css": "NODE_ENV=production tailwindcss -i ./tailwindcss/css/tailwind.css -o css/main.css --config ./tailwind.config.js --postcss",
"build:cjs": "npm run build:lib -- --format cjs",
"build:esm": "npm run build:lib -- --format esm",
"pre-commit": "lint-staged"
Expand Down
10 changes: 7 additions & 3 deletions packages/lib/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
const path = require('path')

module.exports = {
presets: [
require(path.join(__dirname, './package/tailwindcss/tailwind.config')),
],
mode: 'build',
presets: [require(path.join(__dirname, './tailwindcss/tailwind.config'))],
purge: ['./package/**/*'],
prefix: 'maz-',
corePlugins: {
preflight: false,
container: false,
},
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ const Z_INDEXES = require('./variables/z-indexes')
const { colors } = require('./utils/colors')

module.exports = {
mode: 'build',
darkMode: 'class',
prefix: 'maz-',
theme: {
extend: {
fontSize: {
Expand Down Expand Up @@ -66,10 +64,6 @@ module.exports = {
addUtilities(UTILITIES)
}),
],
corePlugins: {
preflight: false,
container: false,
},
}

/* eslint-enable @typescript-eslint/no-var-requires */
File renamed without changes.
1 change: 0 additions & 1 deletion packages/testing/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
v-model="dateValue"
style="width: 400px"
label="Select date"
color="secondary"
:disabled-dates="['1990-02-04', '1990-02-20']"
:disabled-hours="[0, 1, 2, 3, 4, 5, 6, 20, 21, 22, 23]"
hour12
Expand Down
10 changes: 6 additions & 4 deletions packages/testing/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
const path = require('path')

module.exports = {
mode: 'jit',
prefix: 'maz-',
presets: [
require(path.join(
__dirname,
'./../lib/package/tailwindcss/tailwind.config',
)),
require(path.join(__dirname, './../lib/tailwindcss/tailwind.config')),
],
purge: ['./src/**/*'],
corePlugins: {
container: false,
},
}

0 comments on commit 94fddb9

Please sign in to comment.