Skip to content

Commit

Permalink
init snippet - only button components
Browse files Browse the repository at this point in the history
  • Loading branch information
emranweb committed Nov 19, 2023
0 parents commit 904c1d8
Show file tree
Hide file tree
Showing 10 changed files with 266 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Set default behavior to automatically normalize line endings.
* text=auto
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
*.vsix
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
4 changes: 4 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode/**
.vscode-test/**
.gitignore
vsc-extension-quickstart.md
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Change Log

All notable changes to the "daisyui-snippet" extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [Unreleased]

- Initial release
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# DaisyUI Snippet Extension for Visual Studio Code

![DaisyUI Snippet Extension Logo](icon.png)

## Overview

The DaisyUI Snippet extension for Visual Studio Code provides a collection of handy snippets for working with DaisyUI, a set of components and utilities for Tailwind CSS.

With this extension, you can quickly insert DaisyUI components and styles into your HTML, JavaScript, TypeScript, JSX, and JavaScript with JSX files, making your development process with Tailwind CSS and DaisyUI more efficient.

## Features

- **DaisyUI Button Snippets**: Easily insert DaisyUI button components with various styles and configurations into your code.

- `db` - DaisyUI Button
- `dbb` - DaisyUI Button Brand Neutral
- `dbp` - DaisyUI Button Primary
- `dbs` - DaisyUI Button Secondary
- `dba` - DaisyUI Button Accent
- `dbs` - DaisyUI Button Success
- `dbl` - DaisyUI Button Link
- `dbsl` - DaisyUI Button Size Large
- `dbsm` - DaisyUI Button Size Medium
- `dbsx` - DaisyUI Button Size Extra Small
- `dbg` - DaisyUI Button with Glass Effect
- `dbd` - DaisyUI Disabled Button
- `dbsq` - DaisyUI Button Style Square
- `dbso` - DaisyUI Button Style Outline
- `dbci` - DaisyUI Button Style Circle
- `dbco` - DaisyUI Button Style Circle Outline

## Installation

1. Open Visual Studio Code.
2. Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or press `Ctrl+Shift+X`.
3. Search for "DaisyUI Snippet" and click the Install button for the extension authored by [Your Name](https://github.com/emranweb/daisyui-snippet).

## Usage

To use a DaisyUI snippet, follow these steps:

1. Open a file in Visual Studio Code.
2. Start typing the prefix for the desired DaisyUI snippet.
3. IntelliSense will suggest the snippet. Press `Tab` to insert it.

For example, if you want to insert a DaisyUI Button, start typing `db` and select the snippet from the suggestions.

## License

This extension is released under the [Your License](LICENSE) License.

## Issues and Contributions

If you encounter any issues or have suggestions for improvements, please [report them on GitHub](https://github.com/emranweb/daisyui-snippet/issues). Contributions in the form of pull requests are welcome!

## About DaisyUI

DaisyUI is a UI framework built on top of Tailwind CSS, designed to improve your development workflow by providing a set of customizable components and utilities.

Learn more about DaisyUI on [GitHub](https://github.com/emranweb/daisyui-snippet).

## Acknowledgments

Enjoy coding with DaisyUI and Tailwind CSS!
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "daisyui-snippet",
"displayName": "daisyui-snippet",
"description": "a collection of daisyui-snippet",
"version": "0.0.1",
"engines": {
"vscode": "^1.84.0"
},
"publisher": "emranweb",
"author": {
"name": "emranweb",
"email": "[email protected]",
"url": "https://github.com/emranweb"
},
"icon": "icon.png",
"categories": [
"Snippets"
],
"keywords": [
"daisyui",
"tailwindcss",
"tailwind",
"snippet",
"snippets",
"daisyui-snippet"
],
"repository": {
"type": "git",
"url": "https://github.com/emranweb/daisyui-snippet.git"
},
"contributes": {
"snippets": [
{
"language": "javascript",
"path": "./snippets/snippets.code-snippets"
},
{
"language": "javascriptreact",
"path": "./snippets/snippets.code-snippets"
},
{
"language": "html",
"path": "./snippets/snippets.code-snippets"
},
{
"language": "typescript",
"path": "./snippets/snippets.code-snippets"
},
{
"language": "typescriptreact",
"path": "./snippets/snippets.code-snippets"
}
]
}
}
90 changes: 90 additions & 0 deletions snippets/snippets.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"daisyui": {
"prefix": "db",
"body": ["<button className='btn'>Button</button>"],
"description": "DaisyUI Button"
},
"daisyui:": {
"prefix": "dbb",
"body": ["<button className='btn btn-neutral'>Neutral</button>"],
"description": "DaisyUI button brand neutral"
},
"daisyui:": {
"prefix": "dbp",
"body": ["<button className='btn btn-primary'>Primary</button>"],
"description": "DaisyUI button primary"
},
"daisyui:": {
"prefix": "dbs",
"body": ["<button className='btn btn-secondary'>Secondary</button>"],
"description": "DaisyUI button secondary"
},
"daisyui:": {
"prefix": "dba",
"body": ["<button className='btn btn-accent'>Accent</button>"],
"description": "DaisyUI button accent"
},
"daisyui:": {
"prefix": "dbs",
"body": ["<button className='btn btn-success'>Success</button>"],
"description": "DaisyUI button success"
},
"daisyui:": {
"prefix": "dbl",
"body": ["<button className='btn btn-link'>Info</button>"],
"description": "DaisyUI button link"
},
"daisyui:": {
"prefix": "dbsl",
"body": ["<button className='btn btn-info'>Info</button>"],
"description": "DaisyUI button size large"
},
"daisyui:": {
"prefix": "dbsm",
"body": ["<button className='btn btn-sm'>Info</button>"],
"description": "DaisyUI button size medium"
},
"daisyui:": {
"prefix": "dbsx",
"body": ["<button className='btn btn-sm'>Tiny</button>"],
"description": "DaisyUI button size extra small"
},
"daisyui:": {
"prefix": "dbg",
"body": ["<button className='btn glass'>Button</button>"],
"description": "DaisyUI button glass effect"
},
"daisyui:": {
"prefix": "dbd",
"body": ["<button className='btn btn-disabled'>Button</button>"],
"description": "DaisyUI button disabled"
},
// btn square
"daisyui:": {
"prefix": "dbsq",
"body": ["<button className='btn btn-square'>Button</button>"],
"description": "DaisyUI Button style square"
},
// btn square outline
"daisyui:": {
"prefix": "dbso",
"body": [
"<button className='btn btn-square btn-outline'>Button</button>"
],
"description": "DaisyUI Button style outline"
},
// btn style circle
"daisyui:": {
"prefix": "dbci",
"body": ["<button className='btn btn-circle'>Button</button>"],
"description": "DaisyUI Button style circle"
},
// btn style circle outline
"daisyui:": {
"prefix": "dbco",
"body": [
"<button className='btn btn-circle btn-outline'>Button</button>"
],
"description": "DaisyUI Button style circle outline"
}
}
23 changes: 23 additions & 0 deletions vsc-extension-quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Welcome to your VS Code Extension

## What's in the folder

* This folder contains all of the files necessary for your extension.
* `package.json` - this is the manifest file that defines the location of the snippet file and specifies the language of the snippets.
* `snippets/snippets.code-snippets` - the file containing all snippets.

## Get up and running straight away

* Press `F5` to open a new window with your extension loaded.
* Create a new file with a file name suffix matching your language.
* Verify that your snippets are proposed on IntelliSense.

## Make changes

* You can relaunch the extension from the debug toolbar after making changes to the files listed above.
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.

## Install your extension

* To start using your extension with Visual Studio Code copy it into the `<user home>/.vscode/extensions` folder and restart Code.
* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.

0 comments on commit 904c1d8

Please sign in to comment.