nwutils / nw-vue-cli-example Goto Github PK
View Code? Open in Web Editor NEWNW.js, Vue-CLI 4, Vue-DevTools
Home Page: https://nwutils.io
License: MIT License
NW.js, Vue-CLI 4, Vue-DevTools
Home Page: https://nwutils.io
License: MIT License
Make nw
globally accessible to all templates.
Make isDesktop
computed globally accessible to all templates.
Hello,
Is there a way to ignore some files or directories from the build ? i have a case where i need this kind of feature, that'll be quite handy, otherwiser, we have to do it manually everytime we build, but we need the files back, for development.
Thanks!
Hello guys, I have used this boilerplate to make an experiment app on Windows 10 x64. I ran npm run build:win
, and the output distribution works on my machine (developer's machine). Then I sent the .zip
version to other laptops, unzip and run the .exe
, it surprisingly shows a blank screen of white. I could not figure out how to debug that situation, I therefore remade the app step by step and built after every step.
The result is it always works on my machine, and but not on others' if I import anything into the Vue components' script
.
import { C_DATE, formatDate } from '@/utils/date';
import { logger } from '../utils/log';
export default {
data() {
return {
dateTitle: formatDate(window.dayjs(), C_DATE.FM_YYYYMMDD_FULL),
msg: window._getTerm('system_msg.fetch_future'),
};
},
created() {
logger.info('Đang khởi tạo trang chủ');
}
};
/**
* => Output normally on developer's machine
* => Output a blank screen of white on machines with the same environment, without Node installed
*/
Any thoughts?
Hello!! I am trying to make system calls and execute commands from the nwjs application using its boilerplate but I can't. Without making use of Vue-cli3 / Webpack / Babel it works, but don't compile the code from vue-cli3.
As an example, so far, when I want to execute a system command to know the user who has started a graphic session, did something similar to the following:
// To execute commands asynchronously:
const util = require ("util");
const miexec = util.promisify (require ("child_process"). exec);
// Then in a vue mixin or from a vuex action I ran the following from a function:
command = "whoami"
try {
const res = await miexec (command)
if (res.stderr) {
console.error (`Error with $ {command}: $ {res.stderr}`);
return null
}
message = `Ok !! => $ {res.stdout.toString ()} `
console.log (message);
return res.stdout.toString ()
} catch (err) {
message = "Error:" + result.stdout.toString ()
console.log (message)
return "error"
}
The problem I find is that he does not like the initial require, or does not know what I am referring to:
const util = require ("util"); ????
Would you know how to solve the previous problem?
Thank you very much in advance. Regards
when I run e2e test task and i get this message
it look like my chrome version is not in 71 -- 75. that should use nw.exe . but it use my desktop chrome software. my desktop chrome version is 77.0.3865.120.
then i uninstall my desktop chrome and run e2e test task. and i get this message
that say cannot find chrome binary.
so why has this error?
Here's the current plan, though it may change as work starts in this direction.
vue-3
branch that will be used to work on a new Vue 3 boilerplate for NW.js
nw-vite-example
repo?vue-3
branch meets my standards
master
vue-3
branch will be deletedvue-2
branch. This will continue to be maintained with the latest version of Vue 2.x and it's associated dependencies.
os.platform()
return "browser"
not macOs? or window?
how to return platform of system
It seems to be a “standard” solution while developing to run vue’s serve service and then run nw with main set to localhost:port. While this is convenient it doesn’t work when your nw app is accessing system resources (example, file system access). One way around this is to create more complicated build setup (not too bad) and implement watch to build on file change and then have nw run on built files.
Add typescript and it gets more complicated quickly.
This template is a great start to nwjs/vue and was looking for advice on workflow/setup when accessing browser restricted resources - would be neat addition to this project,
Switch to GitHub Actions, update badge, change master
to main
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.