Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add standalone tailwindcss CLI #6506

Merged
merged 6 commits into from Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/build-cli.yml
@@ -0,0 +1,58 @@
name: Build Standalone CLI

on:
push:
tags:
- 'v*'

env:
CI: true

jobs:
build_cli:
runs-on: macos-11
steps:
- uses: actions/checkout@v2

- run: git fetch --tags

- name: Resolve version
id: vars
run: echo "::set-output name=tag_name::$(git describe --tags --abbrev=0)"

- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'

- name: Build tailwindcss
run: npm run prepublishOnly

- name: Install standalone cli dependencies
run: npm install
working-directory: standalone-cli

- name: Build standalone cli
run: npm run build
working-directory: standalone-cli

- name: Test
run: npm test
working-directory: standalone-cli

- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
tag_name: ${{ steps.vars.outputs.tag_name }}
body: |
* [Linux (x64)](https://github.com/tailwindlabs/tailwindcss/releases/download/${{ steps.vars.outputs.tag_name }}/tailwindcss-linux-x64)
* [macOS (arm64)](https://github.com/tailwindlabs/tailwindcss/releases/download/${{ steps.vars.outputs.tag_name }}/tailwindcss-macos-arm64)
* [macOS (x64)](https://github.com/tailwindlabs/tailwindcss/releases/download/${{ steps.vars.outputs.tag_name }}/tailwindcss-macos-x64)
* [Windows (x64)](https://github.com/tailwindlabs/tailwindcss/releases/download/${{ steps.vars.outputs.tag_name }}/tailwindcss-windows-x64.exe)
files: |
dist/tailwindcss-linux-x64
dist/tailwindcss-macos-arm64
dist/tailwindcss-macos-x64
dist/tailwindcss-windows-x64.exe
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -42,7 +42,7 @@ jobs:
CI: true

- name: Publish
run: npm publish --tag next
run: npm publish
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Warn about invalid globs in `content` ([#6449](https://github.com/tailwindlabs/tailwindcss/pull/6449))
- Add standalone tailwindcss CLI ([#6506](https://github.com/tailwindlabs/tailwindcss/pull/6506))

### Fixed

Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -101,7 +101,8 @@
],
"testPathIgnorePatterns": [
"/node_modules/",
"/integrations/"
"/integrations/",
"/standalone-cli/"
],
"transform": {
"\\.js$": "@swc/jest"
Expand Down
2 changes: 2 additions & 0 deletions standalone-cli/.gitignore
@@ -0,0 +1,2 @@
node_modules
/dist
15 changes: 15 additions & 0 deletions standalone-cli/README.md
@@ -0,0 +1,15 @@
# Tailwind Standalone CLI

> Standalone version of [Tailwind CLI](https://tailwindcss.com/docs/installation#using-tailwind-cli)

## Installation

Download the appropriate platform-specific version of the `tailwindcss` cli from the [latest release](https://github.com/tailwindlabs/tailwindcss/releases).

## Usage

```
./tailwindcss-macos -o tailwind.css
```

Check out the [Tailwind CLI documentation](https://tailwindcss.com/docs/installation#using-tailwind-cli) for details on the available options.