elegantweb / nwjs-vue Goto Github PK
View Code? Open in Web Editor NEWA clean NW.js & Vue.js quick start boilerplate.
A clean NW.js & Vue.js quick start boilerplate.
Took a while to figure this out, but I was able to add a global scss file to the project by altering the following lines in build/utils.js:
sass: generateLoaders('sass', { indentedSyntax: true, data: '@import "@/assets/css/main.scss";' }),
scss: generateLoaders('sass', { data: '@import "@/assets/css/main.scss";' }),
Not sure this is even the best way to do it, but I leave it here for anyone else who might be trying to figure it out.
You don't want(select) vuex,but vuex's code is there
Hi :)
I just tryed your lib here : https://github.com/Shuunen/pass-me-app
The dev task is working & build seems successful but does not work in the end, any idea ?
Here is my env :
And the build log :
C:\Users\me\Projects\pass-me-app>yarn build
yarn run v1.7.0
$ node build/runner.js
Starting building tasks... { tasks: [ [ 'win', 'x64' ] ], concurrent: false }
Building for win, x64 starts...
Fetching NW.js binary... { platform: 'win',
arch: 'x64',
version: '0.32.4',
flavor: 'normal' }
[================================================--] 1727.08KB/s 1.8s
Building targets...
Building directory target starts...
Building directory target ends within 53.93s.
Building for win, x64 ends within 97.28s.
Done in 108.85s.
hi thanks for your boiler plate,
Can you explain how to communicate between background script and main window
means to run some functions in node process
The build script keeps redownloading NW.js binary between runs. Even if you rebuild just a few seconds after a previous build (and download of NW.js binary) it still goes on to download a new binary. This binary is 91.2MB on mac and around 83MB on linux. Is there a suitable workaround to avoid this behavior? Thanks for your work on this template.
Mac Os:
Fetching NW.js binary... { platform: 'darwin',
arch: 'x64',
version: '0.32.4',
flavor: 'sdk' }Error: ERROR_EXTRACTING path = /project/cnblogs/jna/node_modules/nwjs-builder-phoenix/caches/nwjs-sdk-v0.32.4-osx-x64.zip
at /project/cnblogs/jna/node_modules/nwjs-builder-phoenix/src/lib/util/archive.ts:25:15
at step (/project/cnblogs/jna/node_modules/nwjs-builder-phoenix/dist/lib/util/archive.js:32:23)
at Object.next (/project/cnblogs/jna/node_modules/nwjs-builder-phoenix/dist/lib/util/archive.js:13:53)
at fulfilled (/project/cnblogs/jna/node_modules/nwjs-builder-phoenix/dist/lib/util/archive.js:4:58)
at
im trying to package some files with .exe, .dll. sys extension under background folder.
it works on dev, but on product i got ENOENT
I am not able to require native module like "usb".
I try to import right under the <script> tag
usb = require("usb");
but dev.
Hi and thank you for this starter.
Upon compilation (win64, nw version 0.27.5), I found within nw.dll the following text - would you perchance know what it's origin is?
Favoritecitizenshippart in thepeople within practiceto continue−approved by the first allowed theand for thefunctioningplaying thesolution toheight="0" in his bookmore than afollows thecreated thepresence in nationalistthe idea ofa characterwere forced class="btndays of thefeatured inshowing theinterest inin place ofturn of thethe head ofLord of thepoliticallyhas its ownEducationalapproval ofsome of theeach other,behavior ofand becauseand anotherappeared onrecorded inblack"may includethe world'scan lead torefers to aborder="0" government winning theresulted in while the Washington,the subjectcity in the>
reflect theto completebecame moreradioactiverejected bywithout anyhis father,which couldcopy of theto indicatea politicalaccounts ofconstitutesworked witherof his lifeaccompaniedclientWidthprevent theLegislativedifferentlytogether inhas severalfor anothertext of thefounded thee with the is used forchanged theusually theplace wherewhereas the> <a href="themselves,although hethat can betraditionalrole of theas a resultremoveChilddesigned bywest of theSome peopleproduction,side of thenewslettersused by thedown to theaccepted bylive in theattempts tooutside thefrequenciesHowever, inprogrammersat least inapproximatealthough itwas part ofand variousGovernor ofthe articleturned into><a href="/the economyis the mostmost widelywould laterand perhapsrise to theoccurs whenunder whichconditions.the westerntheory thatis producedthe city ofin which heseen in thethe centralbuilding ofmany of hisarea of theis the onlymost of themany of thethe WesternThere is noextended toStatisticalcolspan=2 |short storypossible totopologicalcritical ofreported toa Christiandecision tois equal toproblems ofThis can bemerchandisefor most ofno evidenceeditions ofelements in". Thecom/images/which makesthe processremains theliterature,is a memberthe popularthe ancientproblems intime of thedefeated bybody of thea few yearsmuch of thethe work ofCalifornia,served as agovernment.concepts ofmovement in <div id="it" value="language ofas they areproduced inis that theexplain thediv>
However thelead to the <a href="/was grantedpeople havecontinuallywas seen asand relatedthe role ofproposed byof the besteach other.Constantinepeople fromdialects ofto revisionwas renameda source ofthe initiallaunched inprovide theto the westwhere thereand similarbetween twois also theEnglish andconditions,that it wasentitled tothemselves.quantity ofransparencythe same asto join thecountry andthis is theThis led toa statementcontrast tolastIndexOfthrough hisis designedthe term isis providedprotect
The instructions are for Vue CLI 2. There are a lot of benefits to switching over to CLI 3, especially the reduction in dependencies.
Hi, how are you? I'm migrating from Electron to nw.js with an existing vue project, I'm trying to configure the eslint-plugin-vue but I'm not getting it, could you help me set up the eslint file?
My eslint config file from electron projeto:
module.exports = {
root: true,
parserOptions: {
"parser": "babel-eslint",
"ecmaVersion": 2017,
"sourceType": "module"
},
env: {
browser: true,
node: true
},
"extends": [
"airbnb-base",
"plugin:vue/recommended"
],
globals: {
__static: true
},
plugins: [
'vue'
],
'rules': {
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'import/extensions': ['error', 'always', {
js: 'never',
vue: 'never'
}],
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js','.jsx','.vue']
}
}
}
}
My package.josn:
{
"name": "helloworld",
"label": "Helloworld",
"description": "A nwjs-vue application",
"version": "1.0.0",
"author": "Patrick A Lima <[email protected]>",
"private": true,
"main": "./dist/bg/bg.js",
"node-remote": "*://localhost/*",
"window": {
"width": 1000,
"height": 563
},
"build": {
"files": [
"node_modules/**/*",
"dist/**/*"
],
"output": "./releases",
"nwVersion": "0.32.4",
"nwPlatforms": [
"win"
],
"nwArchs": [
"x64"
]
},
"scripts": {
"dev": "node build/dev-runner.js",
"build": "node build/runner.js"
},
"devDependencies": {
"ajv": "^6.5.3",
"axios": "^0.18.0",
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.0",
"babel-loader": "^7.1.5",
"babel-minify-webpack-plugin": "^0.3.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-0": "^6.24.1",
"css-loader": "^0.28.11",
"eslint": "^5.6.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-vue": "^4.7.1",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^0.11.2",
"fs-extra": "^7.0.0",
"html-webpack-plugin": "^3.2.0",
"node-sass": "^4.9.2",
"npm-which": "^3.0.1",
"nwjs-builder-phoenix": "^1.14.7",
"sass-loader": "^7.0.1",
"url-loader": "^0.6.2",
"vue": "^2.5.17",
"vue-loader": "^15.2.7",
"vue-router": "^3.0.1",
"vue-template-compiler": "^2.5.17",
"vuex": "^3.0.1",
"webpack": "^3.12.0",
"webpack-dev-server": "^2.11.2",
"webpack-hot-middleware": "^2.22.3"
},
"dependencies": {
"bluebird": "^3.5.2",
"dugite": "^1.75.0",
"gitlab": "^4.1.1",
"moment": "^2.22.2",
"vue-virtual-scroller": "^0.12.0"
}
}
thanks in advance
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.