nuxt-bemm
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Bemm for Nuxt

Version License Types

💡 About

Bemm auto-import module for Nuxt.

📦 Install

  1. Install nuxt-bemm as development dependency:
npm install nuxt-lodash --save-dev
  1. Add it to the modules section of your nuxt.config:
export default defineNuxtConfig({
  modules: ["nuxt-bemm"],
});

Example

Use Bemm in all components in your Nuxt app.

<script setup>
  const bemm = createBemm("my-component");
</script>

<template>
  <div :class="bemm('something')">Test</div>
  <!-- <div class="my-component__something">Test</div>-->
</template>

Configuration

Name Default Description
prefix '' String to prepend before each Lodash function (false to disable)
prefixSkip [] Functions that starts with keywords in this array will be skipped by prefix
exclude [] Array of Bemm functions to exclude from auto-imports
alias [] Array of array pairs to rename specific Lodash functions (prefix is still added)

Example

export default defineNuxtConfig({
  modules: ["nuxt-bemm"],
  bemm: {
    prefix: "_",
    prefixSkip: ["createMultiBemm"],
    exclude: [],
    alias: [["createBemm", "myBemm"]],
  },
});

License

MIT License © 2022 - Sil van Diepen

Package Sidebar

Install

npm i nuxt-bemm

Homepage

bemm.sil.mt

Weekly Downloads

4

Version

0.0.1

License

MIT

Unpacked Size

7.41 kB

Total Files

8

Last publish

Collaborators

  • silvandiepen