一款使用 Vue.js 构建的跨平台原生桌面应用 Vuido

3,405 阅读1分钟
原文链接: github.com

Create native desktop applications for Windows, OS X and Linux using Vue.js.

NPM module MIT License

Introduction

Vuido makes it possible to create lightweight, native desktop applications using Vue.js. Application using Vuido can run on Windows, OS X and Linux, using native GUI components, and don't require Electron.

Under the hood, Vuido uses the libui library which provides native GUI components for each desktop platform, and the libui-node bindings for Node.js.

Vuido supports most of the standard Vue.js API and it's compatible with many Vue.js extensions, for example Vuex. Applications using Vuido can also use all standard Node.js modules and any packages compatible with Node.js.

Prerequisites

The following prerequisites are needed to compile libui-node, which is used by Vuido.

Windows

npm install --global --production windows-build-tools

Linux

If they are not provided by default in your distribution:

Ubuntu / Debian

sudo apt install build-essential libgtk-3-dev

OS X

  • Xcode
xcode-select --install

Quick setup

The easiest way to start using Vuido is to use vue-cli to create the scaffolding of the project.

First make sure that vue-cli is installed globally:

npm install -g vue-cli

Run the following command to create the project (replace my-project with the name of your project):

vue init mimecorg/vuido-webpack-template my-project

Enter the directory created by vue-cli and install all dependencies:

cd my-project
npm install

Now you can build and run your application:

npm run build
npm start

Packaging

Although native desktop applications can run in the standard Node.js environment, it is recommended to use LaunchUI to package and distribute them to end users.

The easiest way to create a package for your application is to use the LaunchUI Packager. It provides an API for creating packages for Windows, Linux and OS X.

Documentation

You can find the full documentation of Vuido at vuido.mimec.org.

Development status

At the moment Vuido is in a very early stage of development. The main goal is to implement all remaining controls currently supported by libui.

Acknowledgements

Vuido is largely based on Vue.js and shares most of its code, except for the platform specific code related to libui.

Vuido was inspired by Proton Native, an environment for creating native desktop applications using React.

License

Vuido is licensed under the MIT license

Copyright (C) 2018 Michał Męciński