Coder Social home page Coder Social logo

vue-3-options-preset's Introduction

Vite + Vue 3 Options API preset

CI/CD Coverage npm version package size license last commit

This package update the default Vite + Vue 3 scaffolding installation:

  • replacing the use of the Composition API with the Options API
  • replacing style.css with styles/general.scss
  • adding SASS dependency
  • optional: adding Bootstrap dependencies

Installation

To install this package, run the following command in the terminal:

npm install --save-dev vue-3-options-preset

Usage

After the installation, run the following command:

npx preset-options-api

To add Bootstrap along all the other options, add -b at the end of the command:

npx preset-options-api -b

As last step run both:

npm i

npm run dev

NOTE

Use this package only on new projects, right after Vite finished the scaffolding process!

Credits

Badges from shields.io

vue-3-options-preset's People

Contributors

donnierich avatar

Stargazers

Diego Cavenati avatar

Watchers

 avatar

Forkers

fabiopacifici

vue-3-options-preset's Issues

New stubs scaffolding

The scaffolding structure for the stub files should be more organized, with the default files inside a default directory and the bootstrap files inside a bootstrap directory.

Example:

stubs
|
| - default
    | - App.vue
    | - main,js
| - bootstrap
    | - App.vue
    | - main,js

Missing styles import inside main.js

Hey Donny, I think there is a missing import in the main.js file.

Context:

After you install the package running the following command
npm install --save-dev vue-3-options-preset
and then scaffold the preset with the boostrap option
npx preset-options-api -b

Expected result:
I would expect to be able to use bootstrap out of the box

Actual result:
Bootstrap is not available.
I need to add the import in the main.js file to be able to use boostrap.
import './styles/general.scss'

The import should be added to the main.js stub file

Missing bootstrap JS import in main.js

In the main.js file the import of Bootstrap JS is missing

// Import all of Bootstrap's JS
import * as bootstrap from 'bootstrap'

There should be two versions of main.js:

  • without bootstrap imports
  • with bootstrap imports

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.