* Generate types: do not intersect with Config theme type when generating DefaultTheme
* Merge default theme in ResolvedConfig
* UnwrapResolvables on theme.extend as well
* Apply extend to overrides and default theme
* Omit extend from DefaultTheme
* Relax generic constraints, better generic variable names
* Fall back to ThemeConfig if key not in DefaultTheme
* Split out ThemeConfigCustomizable to avoid anys in ThemeConfigResolved
* Allow custom theme properties
* handle TypeScript error
* apply prettier formatting
* update changelog
* change type name
---------
Co-authored-by: Nikita Gaidakov <ngaidakov@podfather.com>
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
* separate `stable` and `oxide` mode (package.json in this case)
* drop `install` script (we use a workspace now)
* change required engine to 16
* enable OXIDE by default
* ignore generated `oxide` files
* splitup package.json scripts into "public" and "private" scripts
Not ideal of course, but this should make it a tiny bit easier to know
which scripts _you_ as a developer / contributor have to run.
* drop `workspaces` from the `stable` engine
* drop `oxide` related build files from the `stable` engine
* drop `oxide` engine specific dependencies from the `stable` engine
* use the `oxide-node-api-shim` for the `stable` engine
* add little script to swap the engines
* drop `oxide:build` from `turbo` config
* configure `ci` for `stable` and `oxide` engines
- rename `nodejs.yml` -> `ci.yml`
- add `ci-stable.yml` (for stable mode and Node 12)
- ensure to use the `stable` engine in the `ci-stable.yml` workflow
- drop `oxide:___` specific scripts
* rename `release-insiders` to `release-insiders-stable`
This way we will be able to remove all files that contain `stable` once
we are ready.
* rename `release-insiders-oxide` to just `release-insiders`
* cleanup insider related workflows
* rename `release` -> `release-stable`
* rename `release-oxide` -> `release`
* change names of release workflows
* drop `oxide-` prefix from jobs
* inline node versions
* do not use `turbo` for the stable build
Can't use it because we don't have a workspace in the stable build.
* re-rename CI workflow
* encode default engine in relevant `package.json` files
* make Node 12 work
* increase `node-version` matrix
* make release workflows explicit (per engine)
* add `Oxide` to workflow name
* add integration tests for the `oxide` engine
* add integration tests for the `stable` engine
* run `oxide` integrations against node `18`
* run `stable` integration tests against node 18
We should test node 12 for tailwindcss, but integrations itself can run
against a newer version. In fact, we always ran them against node 16.
* use `localhost` instead of `0.0.0.0`
* ensure `webpack-4` works on Node 18
* run relese scripst directly
Instead of going via `npm`. It's a bit nicer and quicker!
* drop unused scripts
* sync package-lock.json
* ensure to generate the plugin list before running `jest`
We _could_ use an `npm run pretest`, but then you can't run `jest`
directly anymore (which is required for some tools like vscode
extensions).
* cleanup npm scripts
* drop pretend comments
* fix typo
* add `build:rust` as a pre-jest run script
* rename `build-cli.yml` to `prepare-release.yml`
In other repo's we will also have a `prepare-release` so this makes it a
bit more consistent.
* use common CONSTANT_CASE for environment variables
* use `strategy` for defining the node version
* add script to get the release notes
* add release notes to release draft
* use CONSTANT_CASE for environment variables
* improve consistency for relase related scripts
* calculate tag for the release
This is based on the name we use in the version e.g.: `3.2.0-beta.2`. If
no name can be found in the version, we will default to `latest`
* ignore node_modules caching for now
* add generate-types script
This script will generate the full list of core plugins, which will
allow you to get code completion for the `corePlugins` section.
It will also generate all the colors (and deprecated colors) which is
used in multiple places in the config.
* add types for the `tailwind.config.js` config file
* annotate stubs with a JSDoc pointing to the types
* add types to package.json
- Updated the files to make sure that the types are being published
- Add a `types` section in the `package.json`, otherwise your editor by
default will look for the `DefinitelyTyped` types which got me really
confused for a second.
- Added some scripts to make sure that the generation of types happens
when needed (before tests and before building). This way you never
ever have to think about generating them when working on Tailwind CSS
internals.
* re-export types top-level
Having a `colors.d.ts` next to the `colors.js` file allows us to type
the `colors.js` file and your editor will pickup the types from
`colors.d.ts`.
* also publish generated types
* update changelog
* enable TypeScript only when using `init --types` for now
* update tests to verify that `--types` works
* fix incorrect logic for validating content paths
* remove `includeRules` helper
* generate keyframes as part of the animate plugin
* add matchUtilities
* splitup `variantPlugins` and `corePlugins`
* use export default instead of named exports
I'm a little sad about this change, but it turns out that the order is
not guaranteed for named exports in ESM. It was the correct order in our
tests because of babel, but not in native ESM.
* update imports
* filter out `..Variant` plugins for the core-plugin-list
* inline all corePlugins
* move preflight css to `./src/css`
* remove individual plugins
* convert export default object to named exports
Note: Normally I would use export function ..., but since we also have
some export let xx = createUtilityPlugin in this file, it means that all
the `export function` declarations would be hoisted and therefore won't
have the correct order anymore.
To fix this, I used `export let xx = () => {}` instead of the usual
`export function xx() {}`
* drop unused `variants()` function
This was required for AOT mode.
* make a few plugins shorter
* make `jit` mode the default when no mode is specified
* unify JIT and AOT codepaths
* ensure `Object.entries` on undefined doesn't break
It could be that sometimes you don't have values in your config (e.g.: `presets: []`), this in turn will break some plugins where we assume we have a value.
* drop AOT specific tests
These tests are all covered by JIT mode already and were AOT specific.
* simplify tests, and add a few
Some of the tests were written for AOT specifically, some were missing. We also updated the way we write those tests, essentially making Tailwind a blackbox, by testing against the final output.
Now that JIT mode is the default, this is super fast because we only generate what is used, instead of partially testing in a 3MB file or building it all, then purging.
* add some todo's to make sure we warn in a few cases
* make `darkMode: 'media'`, the default
This also includes moving dark mode tests to its own dedicated file.
* remove PostCSS 7 compat mode
* update CLI to be JIT-first
* fix integration tests
This is not a _real_ fix, but it does solve the broken test for now.
* warn when using @responsive or @variants
* remove the JIT preview warning
* remove AOT-only code paths
* remove all `mode: 'jit'` blocks
Also remove `variants: {}` since they are not useful in `JIT` mode
anymore.
* drop unused dependencies
* rename `purge` to `content`
* remove static CDN builds
* mark `--purge` as deprecated in the CLI
This will still work, but a warning will be printed and it won't show up
in the `--help` output.
* cleanup nesting plugin
We don't have to duplicate it anymore since there is no PostCSS 7
version anymore.
* make sure integration tests run in band
* cleanup folder structure
* make sure nesting folder is available
* simplify resolving of purge/content information
* Generate plugin list file
Removes the importing of all plugins in src/util/resolveConfig to avoid importing CSS.
Import the built plugin list file instead.
* Use `process.cwd()` instead of `__dirname` to resolve path
Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>
* Import core plugin list in resolveConfig test
* Generate plugin list prebabelify and on install
* Move generation from install to postinstall
Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>
Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>
* add nesting plugin
* rename @tailwindcss/nesting to tailwindcss/nesting
* ignore the built `nesting` plugin
* add a postcss7 compat version
* include `nesting` plugin when publishing
* add `build-plugins` script
This will allow us to keep the plugins in their dedicated folders +
tests + postcss7 compatibility files. However, when we copy over the
plugins to the root. For example `plugins/nesting/` -> `nesting/` we
skip files like `.test.js` and `.postcss7.js`.
* build plugins when running `prepublishOnly`
* improve compat mode
We will use a glob so that we can move all *.postcss7.* files to just
*.* likewise we will also backup to *.* to *.postcss8.* for restoring
purposes.
Concrete example:
- Current state:
- index.js // PostCSS 8 implementation
- index.postcss7.js // PostCSS 7 implementation
- Run "compat"
- index.js // PostCSS 7 implementation
- index.postcss7.js // PostCSS 7 implementation
- index.postcss8.js // PostCSS 8 implementation (Backup of original)
- Run "compat:restore"
- index.js // PostCSS 8 implementation
- index.postcss7.js // PostCSS 7 implementation
- X index.postcss8.js // PostCSS 8 implementation (Removed)
* Update README.md
* ensure we `npm install` before publishing
Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
* ensure postcss 7 is dropped from dev dependencies as well
Drop incorrect "help" text
* ensure we are cloning nodes
This is an issue in postcss 7 and fixed in postcss 8. However the compat build still suffers form this issue.
* add integration test tools
* setup jest in the integrations folder
* add `test:integrations` script
The default `npm test` script will ignore all the tests in the
`integrations` folder.
* add integration tests with `webpack 5`
* add integration tests with `postcss-cli`
* add `npm run install:integrations` script
This script will run `npm install` in every integration, and in the
integrations folder itself (to setup Jest for example).
* add `toIncludeCss` custom matcher
* increate Jest timeout for integration tests
* add integration tests with `vite`
* add integration tests with `webpack 4`
* add isomorphic fetch
* add the ability to wait for specific stdout/stderr output
* write vite tests, assert using API calls
We will wait for the correct stdout/stderr output, once we know that we
can request the fresh css, we will fetch it and make assertions
accordingly.
Port is currently hardcoded, maybe we should use a packaage to ensure
that we use a free port.
* add integration tests with `rollup`
* add integration tests with `parcel`
* run all integration tests in band
* add .gitignore in integrations folder
* WIP
* WIP
* Finish combining JIT and AOT plugins
Still lots of clean up that can be done in some of the more complex ones, but at least it's one file per plugin now.
* Remove unused import
* Fix AOT generation bugs
* Move corePlugins/index.js to corePlugins.js
* Convert JIT files to ESM
* Move tests
* Reorder core plugins to match JIT order
* Update AOT apply tests
* Unify utils
* Combine plugin lists to one single source of truth
* Finish resolving merge conflicts, fix tests
Co-authored-by: Adam Wathan <adam.wathan@gmail.com>