1 Star 0 Fork 0

浏览器 / electron-vue-typescript-starter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

:nut_and_bolt: Electron-Vue-TypeScript Starter

The Electron Shell starter that'll have you saying "kids these days" faster than you can type npm start.

WARNING: Electron Compile (one of the core dependencies of this starter) is no longer being actively maintained. Please consider starting your project using Electron Forge directly instead!

Features

  • All programming/style/markup languages supported by Electron Compile:
    • Programming: TypeScript, ES6, ES7, CoffeeScript, GraphQL
    • Style: Less, Sass, Stylus
    • Markup/other: Jade, and Vue
  • In particular, TypeScript is tuned to be as strict as possible.
  • Good TypeScript code completion in VS Code! (There were some quirks to work out here)
  • Packaging for distribution with Electron Forge:
    • Run npm run make to generate distributable packages.
    • Configure forge by modifying forge.config.js.
  • Hot reloading of everything (courtesy of Electron Compile)
  • VueJS devtools.

How to use

Simply fork or download this repo, and start hacking away! Before beginning any work, install all dependencies by running npm install.

Available commands:

  • npm start: Runs the application with Electron in development mode. Hot reloading as well as the Vue devtools are enabled in this mode.
  • npm run make: Builds distributable app packages using Electron Forge, placing the results in the out directory. Note that this will only build packages compatible with the host system running the command; running the build on macOS won't produce GNU/Linux packages, for example.
  • npm run lint: Runs tslint over all TypeScript files.

What might I want to customize first?

Things to note

There are three different TypeScript configurations located in this repository, and all three of them are important:

  • tsconfig.json contains the configuration used by Visual Studio Code or other editors to configure TypeScript checking. This file pulls in additional type information from the types directory, which contains a type definition necessary for proper code completion on imported Vue modules in Visual Studio Code.
  • _compilerc contains the two type definitions that are actually used when transpiling for use with Electron, one for development (used when running npm start) and one for production (used when running npm run make).
  • Due to a known issue with npm@4 and @5, it's advised to use npm@3 with Electron Forge: npm install -g npm@3

Known issues/future work

  • SCSS works, but the indented Sass format doesn't build properly.
  • It would be nice if this was a vue-cli, cookecutter, or yeoman scaffold.

Not what you were looking for?

Not interested in using TypeScript with Vue? Prefer to start with something simpler? I recommend checking out the available starter templates that Electron Forge offers for initializing projects.

Want something with more stuff/customizability/documentation out of the box? Prefer to use Webpack instead of Electron Compile? I recommend taking a look at electron-vue, which allows for scaffolding projects using vue-cli.

Copyright (c) 2017 Brandon DeRosier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

模板 https://github.com/bdero/electron-vue-typescript-starter 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/browsers/electron-vue-typescript-starter.git
git@gitee.com:browsers/electron-vue-typescript-starter.git
browsers
electron-vue-typescript-starter
electron-vue-typescript-starter
master

搜索帮助