Git Product home page Git Product logo

boilerplate-vue's Introduction

Vue.js Project Boilerplate

Index

Library used

  • Vue.js v2.6
  • Vuex
  • Vue Router
  • Sass
  • Jest /w vue-test-utils
  • Webpack & Babel
  • Storybook v6

Directory Structure

/
|- .storybook     : Configuration files for Storybook
|- configs/       : Configuration files for compile, build
  |- env/         : Environment variables (User-defined `.env` file goes here)
|- src/
  |- components/  : Re-usable Vue component codes
  |- directives/  : Custom directives for elements
  |- mixins/      : Re-usable Vue logics
  |- pages/       : Page codes which composes a single view
  |- router/      : Vue Router logics
  |- store/       : Vuex store logics
  |- index.html   : Base HTML file
  |- main.js      : Vue entry code
  |- App.vue      : Root Vue component
|- tests/         : Custom unit tests

Preparation

  1. Run npm install to provide required npm modules
  2. Go to /config/env and make .env file for your project

| .env

You can inject your custom environment variables in your project.

The .env file should be located in /config/env directory.

The project will inject { __NOT_USED__: undefined } environment variable as process.env object if you don't generate .env file, which means .env file is not a mandatory part of your project.

CAUTION: You can access your predefined .env's values only by accessing process.env, only in build-time. process.env is not available in run-time.

How to use

| How to build

  1. Run npm run build
  2. Use a build output from /build directory

| How to run webpack-dev-server

  1. Run npm run dev
  2. Visit http://localhost:3000 (Automatically opens)

| How to run test

  1. Run npm run test:watch
  2. If you need code coverage report, run npm run test:coverage

Update Logs

| v1.0.0

  • Initial simple ready-to-use version

| v1.0.1

  • added Sass, Storybook support

Appendix

TBD

boilerplate-vue's People

Contributors

cadenzah avatar

Watchers

 avatar  avatar  avatar

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.