Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Bare minimum, simplistic, production ready boilerplate/build tool for developing with Electron and Vue.Js
Vuelectro is a minimalistic (being the keyword), simplistic and production-ready build/scaffolding tool that makes developing with Vue.js and Electron much easier and understandable. It's mainly for the people who appreciate simplicity over code that just "looks cool".
There are many reasons for the justification of creating Vuelectro upon my own conclusions that I came to while developing with existing build tools. But the highlight is Those tools are needlessly complicated and bloated with unnecessary code, libraries which ultimately make what's happening under the hood too cryptic and users end up having no control over the build process. It took less time for me to build this tool than getting used to already existing tools. So here's why you should use Vuelectro.
And the list goes on. But with the simplicity, they're maybe some missing crucial features that you might stumble upon. Make sure to let me know about those.
__resPath
and __staticPath
in both processes (explained below)Vuelectro at the moment is a cli tool itself. But you need to have Vue cli installed. If you don't have it installed, just run npm install -g @vue/cli
. Then follow these simple steps.
⚠️ It's highly recommended to install Vuelectro on a newly created project because it will replace some of the source files
⚠️ Vuelectro is targetted towards Vue 3. Not tested with Vue 2.
Open up a terminal window and run the following,
vue create <your-project-name>
(or use vue ui
) and cd
to that directory
vuex
and vue-router
when creating the project rather than later. Make sure to use "hash mode" if you're using vue-router, otherwise you'll end up with a blank Electron window.npm install vuelectro --save-dev
vuelectro init
That's it. Now you're ready to code.
vuelectro init
will create the following files and directories in your project directory.
vuelectro.config.js
- All the configuration for Vuelectro goes in here
vue.config.js
- Configuration for Vue which is your renderer process
src/electron-main.js
- Electron main process
src/preload.js
- Preload file for the renderer
resources
- A directory for your dynamic resources which its content will be copied to your resources directory in the build. Location mapped to __resPath
. (For an example, your SQLite database files should go in here.)
Vuelectro will use following directories at the time of development.
app
- A directory where your source code will be built into before running or packaging
app/renderer
- A directory where your Vue (renderer) source code will be built into
dist_electron
- A directory where all the build artifacts will go into
__resPath
- Path to your "resources" directory. Works in both development and production.
__staticPath
- Path to Vue's public aka "static" directory. Works in both development and production.
process.env.VUELECTRO_ENV
- Specifies the mode your process is running in.
This might look like a lot but trust me these are useful.
electron:run
- Directly runs Electron instance without building anything
electron:serve
- Runs your application using Vue dev server (Vue devtools will work here)
electron:serve:file
- Similar to serve
but runs from the files instead of dev server (Vue devtools will work here with allowFileAccess: true
)
electron:prod
- Runs your application in production mode without packaging
electron:compile:main
- Builds just the main process files in development mode
electron:compile:renderer
- Builds just the renderer process files (Vue source files) in development mode
electron:build
- Builds and packages your application for production
You don't have to manually set anything up to make native modules work with webpack unless for a very specific scenario. Vuelectro is preconfigured to automatically pick up your dependencies in both main and renderer processes.
There's no additional steps needed to debug with Vuelectro. Just regular Electron debugging methods will work.
electron:serve
You can pass in any number of additional arguments at the end when running vuelectro serve
and those arguments will be passed to the Electron instance. For an example you can do the following to debug the main process at port 5858
according to instructions here.
in your package.json
:
"scripts": {
"electron:serve": "cross-env VUELECTRO_ENV=serve vuelectro serve --inspect=5858"
}
This will launch your Electron instance with debugging enabled for the mentioned port. It will also support breakpoints without any issue.
Involvement as a contributor by adding a few lines of code, fixing a bug, responding to issues, testing etc.. would be one of the most helpful methods you could support the project. If you're not a developer but a generous person, you can send a small donation this way buy clicking the following button.
Or you can buy me a "ko-fi" by clicking this button
There's no need because as I've mentioned many times before, this build tool is just simple like that. All you need to know about the configuration for Vuelectro is mentioned as comments inside your vuelectro.config.js
file. Go check that out.
That's all you need to know. I made this as much simple as possible. Happy coding!!
This project is licensed under MIT License. Use and alter at your wish.
FAQs
Bare minimum, simplistic, production ready boilerplate/build tool for developing with Electron and Vue.Js
The npm package vuelectro receives a total of 0 weekly downloads. As such, vuelectro popularity was classified as not popular.
We found that vuelectro demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.