All Projects → LXSMNSYC → babel-plugin-solid-labels

LXSMNSYC / babel-plugin-solid-labels

Licence: MIT license
Simple, reactive labels for SolidJS

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to babel-plugin-solid-labels

Babel Plugin Wildcard
Wildcard imports import a directories JS files
Stars: ✭ 170 (+33.86%)
Mutual labels:  babel-plugin
S2s
Coding time Compile. A tool to write code fastest.
Stars: ✭ 254 (+100%)
Mutual labels:  babel-plugin
solid-styled
Reactive stylesheets for SolidJS
Stars: ✭ 92 (-27.56%)
Mutual labels:  solid-js
Param.macro
Partial application syntax and lambda parameters for JavaScript, inspired by Scala's `_` & Kotlin's `it`
Stars: ✭ 170 (+33.86%)
Mutual labels:  babel-plugin
Eslint Import Resolver Babel Module
Custom eslint resolve for babel-plugin-module-resolver
Stars: ✭ 236 (+85.83%)
Mutual labels:  babel-plugin
babel-plugin-rewire-exports
Babel plugin for stubbing [ES6, ES2015] module exports
Stars: ✭ 62 (-51.18%)
Mutual labels:  babel-plugin
Babel Plugin Graphql Tag
Compiles GraphQL tagged template strings using graphql-tag.
Stars: ✭ 156 (+22.83%)
Mutual labels:  babel-plugin
babel-plugin-transform-for-of-as-array
Transform all for-of loops into the equivalent array for loop
Stars: ✭ 14 (-88.98%)
Mutual labels:  babel-plugin
Xwind
Tailwind CSS as a templating language in JS and CSS-in-JS
Stars: ✭ 249 (+96.06%)
Mutual labels:  babel-plugin
solid-tiny-router
Tiny routing library for SolidJS
Stars: ✭ 21 (-83.46%)
Mutual labels:  solid-js
Emotion
👩‍🎤 CSS-in-JS library designed for high performance style composition
Stars: ✭ 14,177 (+11062.99%)
Mutual labels:  babel-plugin
Babel Plugin React Intl Auto
i18n for the component age. Auto management react-intl ID.
Stars: ✭ 203 (+59.84%)
Mutual labels:  babel-plugin
babel-plugin-hyperscript-to-jsx
This plugin transforms react-hyperscript into JSX. Intended to be used as codemod.
Stars: ✭ 20 (-84.25%)
Mutual labels:  babel-plugin
Babel Plugin React Html Attrs
Babel plugin which transforms HTML and SVG attributes on JSX host elements into React-compatible attributes
Stars: ✭ 170 (+33.86%)
Mutual labels:  babel-plugin
penv.macro
A macro used with babel-plugin-macros to write configurations for multiple environments, and remove configurations are irrelevant with the specified environment from your codes finally.
Stars: ✭ 73 (-42.52%)
Mutual labels:  babel-plugin
Babel Plugin React Css Modules
Transforms styleName to className using compile time CSS module resolution.
Stars: ✭ 1,989 (+1466.14%)
Mutual labels:  babel-plugin
babel-plugin-tailwind-rn
Allows you to use className="w-full md:w-1/2" syntax in your react native projects.
Stars: ✭ 31 (-75.59%)
Mutual labels:  babel-plugin
babel-plugin-feature-flags
A babel transform for managing feature flags
Stars: ✭ 57 (-55.12%)
Mutual labels:  babel-plugin
idomizer
An HTML template parser compiling an incremental-dom render factory.
Stars: ✭ 15 (-88.19%)
Mutual labels:  babel-plugin
nornj
More exciting JS/JSX based on Template Engine, support control flow tags, custom directives, two-way binding, filters and custom operators.
Stars: ✭ 97 (-23.62%)
Mutual labels:  babel-plugin

banner

NPM JavaScript Style Guide

Example

Install

npm install babel-plugin-solid-labels
yarn add babel-plugin-solid-labels
pnpm add babel-plugin-solid-labels

Features

  • 🏷 Labels: Turn labels into SolidJS utility calls!
  • 💬 Comments: Turn comments into SolidJS utility calls, too!
  • Compile-time Functions: Use functions that are evaluated during compile-time!
  • 📦 Auto Imports: No need to import SolidJS utilities, explicitly!
  • 🤝 JS and TS Friendly!

Usage

Typescript

<any file>.d.ts

/// <reference types="babel-plugin-solid-labels" />

Babel

.babelrc

{
  "plugins": [
    ["babel-plugin-solid-labels", { "dev": false }]
  ]
}

Vite

vite-plugin-solid

// vite.config.js
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
import solidLabels from 'babel-plugin-solid-labels';

export default defineConfig({
  plugins: [
    solidPlugin({
      babel: {
        plugins: [
          [solidLabels, { dev: process.env.NODE_ENV !== 'production' }]
        ],
      },
    }),
  ],
});

solid-start

// vite.config.js
import { defineConfig } from 'vite';
import solidStart from 'solid-start';
import solidLabels from 'babel-plugin-solid-labels';

export default defineConfig({
  plugins: [
    solidStart({
      babel: {
        plugins: [
          [solidLabels, { dev: process.env.NODE_ENV !== 'production' }]
        ],
      },
    }),
  ],
});

Disabling features

You can disable some features by passing disabled option to the plugin options.

{
  disabled: {
    labels: {
      signal: true,
    },
    pragma: {
      '@signal': true,
    },
    ctf: {
      $signal: true,
    },
  }
}

Limitations

  • Detecting shadowed identifier for signal and memo.

License

MIT © lxsmnsyc

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].