0.0.284 • Published 11 months ago

@kira-dancer/nuxt-common v0.0.284

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

11 months ago

0.0.274

11 months ago

0.0.273

11 months ago

0.0.272

11 months ago

0.0.271

11 months ago

0.0.278

11 months ago

0.0.276

11 months ago

0.0.275

11 months ago

0.0.270

11 months ago

0.0.284

11 months ago

0.0.282

11 months ago

0.0.281

11 months ago

0.0.280

11 months ago

0.0.247

11 months ago

0.0.245

11 months ago

0.0.258

11 months ago

0.0.257

11 months ago

0.0.256

11 months ago

0.0.255

11 months ago

0.0.254

11 months ago

0.0.253

11 months ago

0.0.269

11 months ago

0.0.268

11 months ago

0.0.263

11 months ago

0.0.262

11 months ago

0.0.261

11 months ago

0.0.260

11 months ago

0.0.266

11 months ago

0.0.265

11 months ago

0.0.264

11 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

12 months ago

0.0.215

12 months ago

0.0.214

12 months ago

0.0.213

12 months ago

0.0.219

11 months ago

0.0.218

12 months ago

0.0.217

12 months ago

0.0.212

12 months ago

0.0.211

12 months ago

0.0.210

12 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

12 months ago

0.0.209

12 months ago

0.0.208

12 months ago

0.0.207

12 months ago

0.0.206

12 months ago

0.0.197

12 months ago

0.0.196

12 months ago

0.0.195

12 months ago

0.0.194

12 months ago

0.0.199

12 months ago

0.0.198

12 months ago

0.0.193

12 months ago

0.0.204

12 months ago

0.0.203

12 months ago

0.0.202

12 months ago

0.0.201

12 months ago

0.0.200

12 months ago

0.0.158

12 months ago

0.0.153

12 months ago

0.0.152

12 months ago

0.0.151

12 months ago

0.0.150

12 months ago

0.0.157

12 months ago

0.0.155

12 months ago

0.0.192

12 months ago

0.0.191

12 months ago

0.0.190

12 months ago

0.0.169

12 months ago

0.0.164

12 months ago

0.0.162

12 months ago

0.0.161

12 months ago

0.0.168

12 months ago

0.0.167

12 months ago

0.0.166

12 months ago

0.0.165

12 months ago

0.0.160

12 months ago

0.0.175

12 months ago

0.0.174

12 months ago

0.0.173

12 months ago

0.0.172

12 months ago

0.0.178

12 months ago

0.0.177

12 months ago

0.0.176

12 months ago

0.0.171

12 months ago

0.0.170

12 months ago

0.0.149

12 months ago

0.0.148

12 months ago

0.0.147

12 months ago

0.0.186

12 months ago

0.0.142

1 year ago

0.0.185

12 months ago

0.0.141

1 year ago

0.0.184

12 months ago

0.0.183

12 months ago

0.0.146

1 year ago

0.0.189

12 months ago

0.0.188

12 months ago

0.0.144

1 year ago

0.0.187

12 months ago

0.0.143

1 year ago

0.0.182

12 months ago

0.0.181

12 months ago

0.0.180

12 months ago

0.0.139

1 year ago

0.0.138

1 year ago

0.0.136

1 year ago

0.0.134

1 year ago