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-cli build for Windows Arm64 platform #10001

Merged
merged 4 commits into from
Dec 5, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,4 @@ jobs:
standalone-cli/dist/tailwindcss-macos-arm64
standalone-cli/dist/tailwindcss-macos-x64
standalone-cli/dist/tailwindcss-windows-x64.exe
standalone-cli/dist/tailwindcss-windows-arm64.exe
3 changes: 2 additions & 1 deletion standalone-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"build": "pkg . --compress Brotli --no-bytecode --public-packages \"*\" --public",
"prebuild": "rimraf dist",
"postbuild": "move-file dist/tailwindcss-standalone-macos-x64 dist/tailwindcss-macos-x64 && move-file dist/tailwindcss-standalone-macos-arm64 dist/tailwindcss-macos-arm64 && move-file dist/tailwindcss-standalone-win-x64.exe dist/tailwindcss-windows-x64.exe && move-file dist/tailwindcss-standalone-linuxstatic-x64 dist/tailwindcss-linux-x64 && move-file dist/tailwindcss-standalone-linuxstatic-arm64 dist/tailwindcss-linux-arm64 && move-file dist/tailwindcss-standalone-linuxstatic-armv7 dist/tailwindcss-linux-armv7",
"postbuild": "move-file dist/tailwindcss-standalone-macos-x64 dist/tailwindcss-macos-x64 && move-file dist/tailwindcss-standalone-macos-arm64 dist/tailwindcss-macos-arm64 && move-file dist/tailwindcss-standalone-win-x64.exe dist/tailwindcss-windows-x64.exe && move-file dist/tailwindcss-standalone-win-arm64.exe dist/tailwindcss-windows-arm64.exe && move-file dist/tailwindcss-standalone-linuxstatic-x64 dist/tailwindcss-linux-x64 && move-file dist/tailwindcss-standalone-linuxstatic-arm64 dist/tailwindcss-linux-arm64 && move-file dist/tailwindcss-standalone-linuxstatic-armv7 dist/tailwindcss-linux-armv7",
"test": "jest"
},
"devDependencies": {
Expand All @@ -27,6 +27,7 @@
"node16-macos-x64",
"node16-macos-arm64",
"node16-win-x64",
"node16-win-arm64",
"node16-linuxstatic-x64",
"node16-linuxstatic-arm64",
"node16-linuxstatic-armv7"
Expand Down
10 changes: 4 additions & 6 deletions standalone-cli/tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ const os = require('os')
const fs = require('fs-extra')

const platformMap = {
darwin: 'macos',
win32: 'windows',
linux: 'linux',
darwin: `./dist/tailwindcss-macos-${process.arch}`,
linux: `./dist/tailwindcss-linux-${process.arch}`,
win32: `.\\dist\\tailwindcss-windows-${process.arch}`,
}

function exec(args) {
return execSync(
`./dist/tailwindcss-${platformMap[process.platform]}-${process.arch} ${args}`
).toString()
return execSync(`${platformMap[process.platform]} ${args}`).toString()
}

it('works', () => {
Expand Down