0.0.284 • Published 10 months ago

@kira-dancer/nuxt-common v0.0.284

Weekly downloads
-
License
MIT
Repository
-
Last release
10 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

10 months ago

0.0.274

10 months ago

0.0.273

10 months ago

0.0.272

10 months ago

0.0.271

10 months ago

0.0.278

10 months ago

0.0.276

10 months ago

0.0.275

10 months ago

0.0.270

10 months ago

0.0.284

10 months ago

0.0.282

10 months ago

0.0.281

10 months ago

0.0.280

10 months ago

0.0.247

10 months ago

0.0.245

10 months ago

0.0.258

10 months ago

0.0.257

10 months ago

0.0.256

10 months ago

0.0.255

10 months ago

0.0.254

10 months ago

0.0.253

10 months ago

0.0.269

10 months ago

0.0.268

10 months ago

0.0.263

10 months ago

0.0.262

10 months ago

0.0.261

10 months ago

0.0.260

10 months ago

0.0.266

10 months ago

0.0.265

10 months ago

0.0.264

10 months ago

0.0.244

11 months ago

0.0.243

11 months ago

0.0.242

11 months ago

0.0.238

11 months ago

0.0.237

11 months ago

0.0.239

11 months ago

0.0.241

11 months ago

0.0.240

11 months ago

0.0.236

11 months ago

0.0.235

11 months ago

0.0.234

11 months ago

0.0.233

11 months ago

0.0.232

11 months ago

0.0.231

11 months ago

0.0.230

11 months ago

0.0.216

11 months ago

0.0.215

11 months ago

0.0.214

11 months ago

0.0.213

11 months ago

0.0.219

11 months ago

0.0.218

11 months ago

0.0.217

11 months ago

0.0.212

11 months ago

0.0.211

11 months ago

0.0.210

11 months ago

0.0.227

11 months ago

0.0.226

11 months ago

0.0.224

11 months ago

0.0.229

11 months ago

0.0.228

11 months ago

0.0.223

11 months ago

0.0.222

11 months ago

0.0.221

11 months ago

0.0.220

11 months ago

0.0.205

11 months ago

0.0.209

11 months ago

0.0.208

11 months ago

0.0.207

11 months ago

0.0.206

11 months ago

0.0.197

11 months ago

0.0.196

11 months ago

0.0.195

11 months ago

0.0.194

11 months ago

0.0.199

11 months ago

0.0.198

11 months ago

0.0.193

11 months ago

0.0.204

11 months ago

0.0.203

11 months ago

0.0.202

11 months ago

0.0.201

11 months ago

0.0.200

11 months ago

0.0.158

11 months ago

0.0.153

11 months ago

0.0.152

11 months ago

0.0.151

11 months ago

0.0.150

11 months ago

0.0.157

11 months ago

0.0.155

11 months ago

0.0.192

11 months ago

0.0.191

11 months ago

0.0.190

11 months ago

0.0.169

11 months ago

0.0.164

11 months ago

0.0.162

11 months ago

0.0.161

11 months ago

0.0.168

11 months ago

0.0.167

11 months ago

0.0.166

11 months ago

0.0.165

11 months ago

0.0.160

11 months ago

0.0.175

11 months ago

0.0.174

11 months ago

0.0.173

11 months ago

0.0.172

11 months ago

0.0.178

11 months ago

0.0.177

11 months ago

0.0.176

11 months ago

0.0.171

11 months ago

0.0.170

11 months ago

0.0.149

11 months ago

0.0.148

11 months ago

0.0.147

11 months ago

0.0.186

11 months ago

0.0.142

12 months ago

0.0.185

11 months ago

0.0.141

12 months ago

0.0.184

11 months ago

0.0.183

11 months ago

0.0.146

12 months ago

0.0.189

11 months ago

0.0.188

11 months ago

0.0.144

12 months ago

0.0.187

11 months ago

0.0.143

12 months ago

0.0.182

11 months ago

0.0.181

11 months ago

0.0.180

11 months ago

0.0.139

12 months ago

0.0.138

12 months ago

0.0.136

12 months ago

0.0.134

12 months ago