GithubHelp home page GithubHelp logo

chrisvfritz / vue-browserify-glob-require-demo Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 2 KB

A simple browserify setup appropriate for non-SPAs where you just want to register reusable components.

HTML 48.03% Vue 9.83% JavaScript 42.14%

vue-browserify-glob-require-demo's Introduction

Vue Browserify Glob Require Demo

A simple browserify setup appropriate for non-SPAs where you just want to register reusable components.

Backend Integration

  1. Copy package.json and .babelrc to the root of your project.
  2. Update references to src in package.json to where you want to keep your JavaScript (e.g. frontend/javascript).
  3. Copy the files in src to the folder you used in step 2.
  4. Update references to dist in package.json to your backend's asset pipeline or public folder (e.g. app/assets/javascripts or public/assets in Rails)
  5. In your layout file(s), add a script tag to the end of your body, pointing to your JavaScript build (e.g. /assets/build.js).
  6. Update the serve script in package.json to a command that will run your backend server. After that, you will be able to run browserify and your backend server with npm run dev.
  7. Update your deployment script to include npm run build before any asset compilation process your backend might use (e.g. before rake assets:precompile in Rails).
  8. Profit!

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

For more information see the docs for vueify.

vue-browserify-glob-require-demo's People

Contributors

chrisvfritz 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.