Giter Site home page Giter Site logo

browserify's Introduction

vue-browserify-boilerplate

A full-featured Browserify + vueify setup with hot-reload, linting & unit testing.

This template is Vue 2.0 compatible. For Vue 1.x use this command: vue init browserify#1.0 my-project

Usage

This is a project template for vue-cli.

$ npm install -g vue-cli
$ vue init browserify my-project
$ cd my-project
$ npm install
$ npm run dev

What's Included

  • npm run dev: Browserify + vueify with proper config for source map & hot-reload.

  • npm run build: Production build with HTML/CSS/JS minification.

  • npm run lint: Lint JavaScript and *.vue files with ESLint.

  • npm test: Unit tests in PhantomJS with Karma + karma-jasmine + karma-browserify, with support for mocking and ES2015.

For more information see the docs for vueify.

Customizations

You will likely need to do some tuning to suit your own needs:

  • Install additional libraries that you need, e.g. vue-router, vue-resource, vuex, etc...

  • Use your preferred .eslintrc config. Don't forget to keep the plugin field so that ESLint can lint *.vue files.

  • Add your preferred CSS pre-processor, for example:

    npm install less --save-dev

    Then you can do:

    <style lang="less">
      /* write less! */
    </style>
  • The dev build is served using http-server. You can edit the NPM dev script in package.json to add a proxy option so that ajax requests are proxied to a separate backend API.

  • For unit testing:

    • You can run the tests in multiple real browsers by installing more karma launchers and adjusting the browsers field in karma.conf.js.

    • You can also swap out Jasmine for other testing frameworks, e.g. use Mocha with karma-mocha.

Fork It And Make Your Own

You can fork this repo to create your own boilerplate, and use it with vue-cli:

vue init username/repo my-project

browserify's People

Contributors

charbelrami avatar chrisvfritz avatar coolgoose avatar defcc avatar eddyerburgh avatar jingsam avatar kazupon avatar limichange avatar linusborg avatar markussorg avatar yyx990803 avatar zigomir avatar

Watchers

 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.