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

10 months ago

0.0.243

10 months ago

0.0.242

10 months ago

0.0.238

10 months ago

0.0.237

10 months ago

0.0.239

10 months ago

0.0.241

10 months ago

0.0.240

10 months ago

0.0.236

10 months ago

0.0.235

10 months ago

0.0.234

10 months ago

0.0.233

10 months ago

0.0.232

10 months ago

0.0.231

10 months ago

0.0.230

10 months ago

0.0.216

10 months ago

0.0.215

10 months ago

0.0.214

10 months ago

0.0.213

10 months ago

0.0.219

10 months ago

0.0.218

10 months ago

0.0.217

10 months ago

0.0.212

10 months ago

0.0.211

10 months ago

0.0.210

10 months ago

0.0.227

10 months ago

0.0.226

10 months ago

0.0.224

10 months ago

0.0.229

10 months ago

0.0.228

10 months ago

0.0.223

10 months ago

0.0.222

10 months ago

0.0.221

10 months ago

0.0.220

10 months ago

0.0.205

10 months ago

0.0.209

10 months ago

0.0.208

10 months ago

0.0.207

10 months ago

0.0.206

10 months ago

0.0.197

10 months ago

0.0.196

10 months ago

0.0.195

10 months ago

0.0.194

10 months ago

0.0.199

10 months ago

0.0.198

10 months ago

0.0.193

10 months ago

0.0.204

10 months ago

0.0.203

10 months ago

0.0.202

10 months ago

0.0.201

10 months ago

0.0.200

10 months ago

0.0.158

10 months ago

0.0.153

10 months ago

0.0.152

10 months ago

0.0.151

10 months ago

0.0.150

11 months ago

0.0.157

10 months ago

0.0.155

10 months ago

0.0.192

10 months ago

0.0.191

10 months ago

0.0.190

10 months ago

0.0.169

10 months ago

0.0.164

10 months ago

0.0.162

10 months ago

0.0.161

10 months ago

0.0.168

10 months ago

0.0.167

10 months ago

0.0.166

10 months ago

0.0.165

10 months ago

0.0.160

10 months ago

0.0.175

10 months ago

0.0.174

10 months ago

0.0.173

10 months ago

0.0.172

10 months ago

0.0.178

10 months ago

0.0.177

10 months ago

0.0.176

10 months ago

0.0.171

10 months ago

0.0.170

10 months ago

0.0.149

11 months ago

0.0.148

11 months ago

0.0.147

11 months ago

0.0.186

10 months ago

0.0.142

11 months ago

0.0.185

10 months ago

0.0.141

11 months ago

0.0.184

10 months ago

0.0.183

10 months ago

0.0.146

11 months ago

0.0.189

10 months ago

0.0.188

10 months ago

0.0.144

11 months ago

0.0.187

10 months ago

0.0.143

11 months ago

0.0.182

10 months ago

0.0.181

10 months ago

0.0.180

10 months ago

0.0.139

11 months ago

0.0.138

11 months ago

0.0.136

11 months ago

0.0.134

11 months ago