From 8c0c777c656a5daa067920f64bfa5f11698d0c49 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Fri, 13 Aug 2021 12:46:40 +0100 Subject: [PATCH] update language server package --- .../tailwindcss-language-server/README.md | 25 +++++++++++++++++++ .../tailwindcss-language-server/package.json | 12 ++++++--- .../scripts/hashbang.mjs | 8 ++++++ 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 packages/tailwindcss-language-server/README.md create mode 100644 packages/tailwindcss-language-server/scripts/hashbang.mjs diff --git a/packages/tailwindcss-language-server/README.md b/packages/tailwindcss-language-server/README.md new file mode 100644 index 0000000..b560187 --- /dev/null +++ b/packages/tailwindcss-language-server/README.md @@ -0,0 +1,25 @@ +# Tailwind CSS Language Server + +[Language Server Protocol](https://github.com/Microsoft/language-server-protocol) implementation for [Tailwind CSS](https://tailwindcss.com), used by [Tailwind CSS IntelliSense for VS Code](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss). + +## Install + +```bash +npm install -g @tailwindcss/language-server +``` + +## Run + +```bash +tailwindcss-language-server --stdio +``` + +``` +Usage: tailwindcss-language-server [options] + +Options: + + --stdio use stdio + --node-ipc use node-ipc + --socket= use socket +``` diff --git a/packages/tailwindcss-language-server/package.json b/packages/tailwindcss-language-server/package.json index d52031e..46bc2c6 100644 --- a/packages/tailwindcss-language-server/package.json +++ b/packages/tailwindcss-language-server/package.json @@ -1,13 +1,14 @@ { - "name": "tailwindcss-language-server", + "name": "@tailwindcss/language-server", "description": "Tailwind CSS Language Server", "license": "MIT", - "version": "0.0.1", + "version": "0.0.2", "scripts": { "build": "npm run clean && ncc build src/server.ts -o bin --minify && mv bin/index.js bin/tailwindcss-language-server && npm run hashbang", "clean": "rimraf dist", - "hashbang": "echo \"#!/usr/bin/env node\n$(cat bin/tailwindcss-language-server)\" > bin/tailwindcss-language-server", - "create-notices-file": "node scripts/createNoticesFile.mjs" + "hashbang": "node scripts/hashbang.mjs", + "create-notices-file": "node scripts/createNoticesFile.mjs", + "prepublishOnly": "npm run build" }, "bin": { "tailwindcss-language-server": "./bin/tailwindcss-language-server" @@ -16,6 +17,9 @@ "bin", "ThirdPartyNotices.txt" ], + "publishConfig": { + "access": "public" + }, "devDependencies": { "@ctrl/tinycolor": "3.1.4", "@parcel/watcher": "2.0.0-alpha.10", diff --git a/packages/tailwindcss-language-server/scripts/hashbang.mjs b/packages/tailwindcss-language-server/scripts/hashbang.mjs new file mode 100644 index 0000000..7e86bc0 --- /dev/null +++ b/packages/tailwindcss-language-server/scripts/hashbang.mjs @@ -0,0 +1,8 @@ +import { readFileSync, writeFileSync } from 'fs' +import { dirname, resolve } from 'path' +import { fileURLToPath } from 'url' + +let __dirname = dirname(fileURLToPath(import.meta.url)) +let file = resolve(__dirname, '../bin/tailwindcss-language-server') + +writeFileSync(file, '#!/usr/bin/env node\n' + readFileSync(file, 'utf-8'), 'utf-8')