0.0.284 • Published 8 months ago

@kira-dancer/nuxt-common v0.0.284

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

@nevel-group/nuxt-am-common-library

@nevel-group/nuxt-am-common-library is a nuxt3 layer for nuxt applications, providing useful utilities for authentication, socket, play games and other functionalities. This README will guide you through the steps to set up and use this library in your project.

Prerequisites

Ensure you have the necessary tools installed:

  • Node.js
  • pnpm or yarn

Installation

Step 1: Create .npmrc file

Create a .npmrc file in the root directory of your project and add the following line of code:

//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
@nevel-group:registry=https://npm.pkg.github.com
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
registry=https://registry.npmjs.org/

Step 2: Install the Library

Before installing the library, you need to set the GITHUB_TOKEN environment variable. You can do this by running the following command in your terminal:

export GITHUB_TOKEN=${YOUR_GITHUB_TOKEN}
export NPM_TOKEN=${YOUR_NPM_TOKEN}
yarn add @nevel-group/nuxt-am-common-library @kira-dancer/nadal

You can use either pnpm or yarn to install.

Step 3: Install Pina & other libraries

You can do this by running the following command in your terminal:

yarn add dayjs lodash @nuxtjs/device @vueuse/core @vueuse/nuxt @gtm-support/vue-gtm pinia @pinia/nuxt @pinia-plugin-persistedstate/nuxt

You can use either pnpm or yarn to install.

Step 4: Add nuxt config

Copy the code below to your nuxt.config.ts

const isProd = process.env.NODE_ENV === 'production'
const transpile = ['@nevel-group/nuxt-am-common-library', '@kira-dancer/nadal'] // add transpile

if (isProd) {
  transpile.push('property-expr')
}

export default defineNuxtConfig({
  devtools: { enabled: !isProd },
  extends: ['@nevel-group/nuxt-am-common-library'], // Extends layer
  modules: [
    '@vueuse/nuxt',
    '@nuxt/devtools',
    '@nuxtjs/device',
    '@pinia/nuxt',
    '@pinia-plugin-persistedstate/nuxt',
  ],
  imports: {
    autoImport: true, // Auto import must be true
    dirs: ['@nevel-group/nuxt-am-common-library/types'],
  },
  build: {
    transpile, // Add transpile
  },
  alias: {
    'dayjs/plugin': '/node_modules/dayjs/plugin',
    dayjs: '/node_modules/dayjs/esm/index.js',
    lodash: '/node_modules/lodash',
    yup: '/node_modules/yup/index.esm.js', // Add alias
    'socket.io-client': '/node_modules/socket.io-client/lib/index.js', // Add alias
    '#lib': '/node_modules/@nevel-group/nuxt-am-common-library', // Add alias
  },
  runtimeConfig: {
    public: {
      // your public env
    },
  },
})

Step 5: Add .env file

More detail of ENV variables

Step 6: Discover more composables documentation

Learn more about how to use other composables

APIs

For detailed information about the APIs provided by @nevel-group/nuxt-am-common-library, please refer to the JSDocs Index Page.

0.0.279

8 months ago

0.0.274

8 months ago

0.0.273

9 months ago

0.0.272

9 months ago

0.0.271

9 months ago

0.0.278

8 months ago

0.0.276

8 months ago

0.0.275

8 months ago

0.0.270

9 months ago

0.0.284

8 months ago

0.0.282

8 months ago

0.0.281

8 months ago

0.0.280

8 months ago

0.0.247

9 months ago

0.0.245

9 months ago

0.0.258

9 months ago

0.0.257

9 months ago

0.0.256

9 months ago

0.0.255

9 months ago

0.0.254

9 months ago

0.0.253

9 months ago

0.0.269

9 months ago

0.0.268

9 months ago

0.0.263

9 months ago

0.0.262

9 months ago

0.0.261

9 months ago

0.0.260

9 months ago

0.0.266

9 months ago

0.0.265

9 months ago

0.0.264

9 months ago

0.0.244

9 months ago

0.0.243

9 months ago

0.0.242

9 months ago

0.0.238

9 months ago

0.0.237

9 months ago

0.0.239

9 months ago

0.0.241

9 months ago

0.0.240

9 months ago

0.0.236

9 months ago

0.0.235

9 months ago

0.0.234

9 months ago

0.0.233

9 months ago

0.0.232

9 months ago

0.0.231

9 months ago

0.0.230

9 months ago

0.0.216

9 months ago

0.0.215

9 months ago

0.0.214

9 months ago

0.0.213

9 months ago

0.0.219

9 months ago

0.0.218

9 months ago

0.0.217

9 months ago

0.0.212

9 months ago

0.0.211

9 months ago

0.0.210

9 months ago

0.0.227

9 months ago

0.0.226

9 months ago

0.0.224

9 months ago

0.0.229

9 months ago

0.0.228

9 months ago

0.0.223

9 months ago

0.0.222

9 months ago

0.0.221

9 months ago

0.0.220

9 months ago

0.0.205

9 months ago

0.0.209

9 months ago

0.0.208

9 months ago

0.0.207

9 months ago

0.0.206

9 months ago

0.0.197

9 months ago

0.0.196

9 months ago

0.0.195

9 months ago

0.0.194

9 months ago

0.0.199

9 months ago

0.0.198

9 months ago

0.0.193

9 months ago

0.0.204

9 months ago

0.0.203

9 months ago

0.0.202

9 months ago

0.0.201

9 months ago

0.0.200

9 months ago

0.0.158

9 months ago

0.0.153

9 months ago

0.0.152

9 months ago

0.0.151

9 months ago

0.0.150

9 months ago

0.0.157

9 months ago

0.0.155

9 months ago

0.0.192

9 months ago

0.0.191

9 months ago

0.0.190

9 months ago

0.0.169

9 months ago

0.0.164

9 months ago

0.0.162

9 months ago

0.0.161

9 months ago

0.0.168

9 months ago

0.0.167

9 months ago

0.0.166

9 months ago

0.0.165

9 months ago

0.0.160

9 months ago

0.0.175

9 months ago

0.0.174

9 months ago

0.0.173

9 months ago

0.0.172

9 months ago

0.0.178

9 months ago

0.0.177

9 months ago

0.0.176

9 months ago

0.0.171

9 months ago

0.0.170

9 months ago

0.0.149

9 months ago

0.0.148

9 months ago

0.0.147

9 months ago

0.0.186

9 months ago

0.0.142

10 months ago

0.0.185

9 months ago

0.0.141

10 months ago

0.0.184

9 months ago

0.0.183

9 months ago

0.0.146

10 months ago

0.0.189

9 months ago

0.0.188

9 months ago

0.0.144

10 months ago

0.0.187

9 months ago

0.0.143

10 months ago

0.0.182

9 months ago

0.0.181

9 months ago

0.0.180

9 months ago

0.0.139

10 months ago

0.0.138

10 months ago

0.0.136

10 months ago

0.0.134

10 months ago