Skip to content
Closed
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
Add feature flag setup
  • Loading branch information
philipp-spiess committed Feb 7, 2025
commit d2eb2f50393c99cd53d3bf7a925179994099be04
2 changes: 2 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ jobs:

- name: Build Tailwind CSS
run: pnpm run build
env:
FEATURES_ENV: stable

- name: Run pre-publish optimizations scripts
run: node ./scripts/pre-publish-optimizations.mjs
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ jobs:

- name: Build Tailwind CSS
run: pnpm run build
env:
FEATURES_ENV: stable

- name: Run pre-publish optimizations scripts
run: node ./scripts/pre-publish-optimizations.mjs
Expand Down
1 change: 1 addition & 0 deletions packages/tailwindcss/src/feature-flags.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const enableTableFooterGroup = process.env.FEATURES_ENV !== 'stable'
5 changes: 4 additions & 1 deletion packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from './ast'
import type { Candidate, CandidateModifier, NamedUtilityValue } from './candidate'
import type { DesignSystem } from './design-system'
import { enableTableFooterGroup } from './feature-flags'
import type { Theme, ThemeKey } from './theme'
import { compareBreakpoints } from './utils/compare-breakpoints'
import { DefaultMap } from './utils/default-map'
Expand Down Expand Up @@ -824,7 +825,9 @@ export function createUtilities(theme: Theme) {
staticUtility('table-cell', [['display', 'table-cell']])
staticUtility('table-column', [['display', 'table-column']])
staticUtility('table-column-group', [['display', 'table-column-group']])
staticUtility('table-footer-group', [['display', 'table-footer-group']])
if (enableTableFooterGroup) {
staticUtility('table-footer-group', [['display', 'table-footer-group']])
}
staticUtility('table-header-group', [['display', 'table-header-group']])
staticUtility('table-row-group', [['display', 'table-row-group']])
staticUtility('table-row', [['display', 'table-row']])
Expand Down
6 changes: 6 additions & 0 deletions packages/tailwindcss/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export default defineConfig([
'default-theme': 'src/compat/default-theme.ts',
'flatten-color-palette': 'src/compat/flatten-color-palette.ts',
},
define: {
'process.env.FEATURES_ENV': JSON.stringify(process.env.FEATURES_ENV ?? 'insiders'),
},
},
{
format: ['cjs'],
Expand All @@ -24,5 +27,8 @@ export default defineConfig([
'default-theme': 'src/compat/default-theme.cts',
'flatten-color-palette': 'src/compat/flatten-color-palette.cts',
},
define: {
'process.env.FEATURES_ENV': JSON.stringify(process.env.FEATURES_ENV ?? 'insiders'),
},
},
])
3 changes: 2 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
},
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**"]
"outputs": ["dist/**"],
"env": ["FEATURES_ENV"]
},
"lint": {},
"dev": {
Expand Down
Loading