3.1.4 • Published 3 years ago

@inkline/nuxt v3.1.4

Weekly downloads
140
License
ISC
Repository
github
Last release
3 years ago

Installation

1. Create a project

Create a new Nuxt.js application using the nuxi CLI command below or using the Nuxt.js guide, and follow the instructions provided by the installation wizard.

npx nuxi init my-nuxt-app

cd my-nuxt-app

npm install

2. Install Inkline and dependencies

Install and save Inkline and the Inkline Nuxt 3 Module as a project dependency.

npm install --save @inkline/inkline @inkline/nuxt

Inkline uses Sass to pre-process and compile its CSS files. You will need to install it as a development dependency in order to compile the stylesheets.

npm install --save-dev sass

3. Configure your project

Open your nuxt.config.ts or nuxt.config.js file and configure your application to use Inkline.

import { defineNuxtConfig } from 'nuxt';

export default defineNuxtConfig({
    modules: [
        '@inkline/nuxt'
    ],
    inkline: {
        // Plugin options (optional)
    }
});
PropertyTypeDescriptionDefault
inkline.cssBooleanEnable or disable adding Inkline's stylesheet automatically.true
inkline.sassVariablesString[]Paths to SCSS Variables to prepend before Inkline's stylesheet.[]
inkline.globalBooleanRegister components to be globally available. This disables tree-shaking.true

4. Configure your design

Next, open your app.vue file and add a style block with the content below. Learn more about the Design System.

<style lang="scss">
:root {
    --color--primary--h: 195deg;
    --color--primary--s: 77%;
    --color--primary--l: 39%;
}
</style>

5. Enjoy using Inkline

Awesome work! You can now start using all the features that Inkline has to offer.

Troubleshooting

  • No "exports" defined in ../my-nuxt-app/node_modules/@nuxt/kit/package.json

    Create a patch file called scripts/patch.js and run it.

    const fs = require('fs');
    const path = require('path');
    
    const target = path.resolve(__dirname, '../node_modules/@nuxt/kit/package.json');
    const contents = fs.readFileSync(target);
    const replaced = contents.toString().replace(
        '"import": "./lib/index.mjs"', 
        '"import": "./lib/index.mjs", "require": "./lib/index.mjs"'
    );
    
    fs.writeFileSync(target, replaced);
    node scripts/patch.js

    Optionally, add it to your package.json as a postinstall script.

  • Argument of type '{ inkline: {...}; }' is not assignable to parameter of type 'NuxtConfig'

    Create a file called nuxt-schema-shim.d.ts and add the following:

    import type { PluginConfig } from '@inkline/inkline';
    
    declare module '@nuxt/schema' {
      interface NuxtConfig {
        inkline?: PluginConfig;
      }
      interface NuxtOptions {
        inkline?: PluginConfig; 
      }
    }

Creator

Alex Grozav

If you use Inkline in your daily work and feel that it has made your life easier, please consider sponsoring me on Github Sponsors. 💖

Copyright and license

Code copyright 2017-2022 Inkline Authors. Code released under the MIT License.

3.1.4

3 years ago

3.1.3

3 years ago

3.1.2

3 years ago

3.1.1

3 years ago

3.1.0

3 years ago

3.0.7

3 years ago

3.0.6

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.5

3 years ago

3.0.0

3 years ago

2.3.6

4 years ago

2.3.5

5 years ago

2.3.4

5 years ago

2.3.3

5 years ago

2.3.2

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.2

5 years ago

2.1.4

5 years ago

2.1.3

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.22.3

5 years ago

1.22.2

5 years ago

1.22.1

5 years ago

1.22.0

5 years ago

1.21.4

5 years ago

1.21.3

5 years ago

1.21.2

5 years ago

1.21.1

5 years ago

1.21.0

5 years ago

1.0.0

5 years ago