Coder Social home page Coder Social logo

railsware / bozon Goto Github PK

View Code? Open in Web Editor NEW
758.0 758.0 52.0 4.81 MB

๐Ÿ›  Command line tool for building, testing and publishing modern Electron applications

License: MIT License

JavaScript 98.91% HTML 0.48% CSS 0.61%
boilerplate bozon electron electron-application electron-applications electron-builder packaging scaffold scaffolding spectron testing webpack

bozon's People

Contributors

alchaplinsky avatar biremi avatar ceonizm avatar chbachman avatar dependabot[bot] avatar genu avatar jaulz avatar lichtjaeger avatar mrlannigan avatar mtrnord avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bozon's Issues

Sizing seems to be a problem

out of the box fresh launch tried to adjust sizing in settings.json

{
"width": 900,
"height": 650
}

Still launching with a default looks like 500x500 window.

Only way I can get window to size is to hard code values into the main/index.js by overwriting the json.settings.width/height values.

bozon start break

When i try 'bozon start' the console give me this error:

D:\Node\testbozon>bozon start
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: spawn gulp ENOENT
    at exports._errnoException (util.js:870:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)
    at Function.Module.runMain (module.js:443:11)
    at startup (node.js:139:18)
    at node.js:968:3

I tried but couldn't find the problem.

System: Win7x64, Node4.4.3, Gulp(Global), Coffee-Script(Global), Bozon(Global)

No config files

Hi! :)

I'm installer Bozon 0.3.4 via npm install bozon -g. But when I run bozon new appname, bozon generate a directory withou gulpfile.js and package.json. :/ I cannot run bozon start, because:

โžœ  appname bozon start
[11:08:42] No gulpfile found

I tried to run npm install too... :/

My system:

โžœ  appname node --version
v5.9.0
โžœ  appname npm --version
3.7.3
โžœ  appname sw_vers
ProductName:    Mac OS X
ProductVersion: 10.11
BuildVersion:   15A284

On running the .exe, app crashes and re-runs | runs twice

App runs smoothly with bozon start
After i package the app, i run the .exe, an installation green box appears, my app starts with a new window, after 6 seconds app window closes and then after 2-3 seconds app re opens successfully.

Are you familiar with this behavior or is it me? I would like it to open just once.

I am on Windows 10 x64, bozon version is 0.6.1

Permissions issue

On bozon start I get this:

[08:52:55] Using gulpfile ~/AnchorWP/public/anchor_wp/gulpfile.js
[08:52:55] Starting 'html'...
[08:52:55] Starting 'images'...
[08:52:55] Starting 'styles'...
[08:52:55] Starting 'scripts:main'...
[08:52:55] Starting 'scripts:renderer'...
[08:52:56] Finished 'images' after 337 ms
[08:52:56] 'html' errored after 391 ms
[08:52:56] Error: EACCES: permission denied, mkdir '/Users/matthewpritchett/AnchorWP/public/anchor_wp/builds'
    at Error (native)
[08:52:56] 'styles' errored after 379 ms
[08:52:56] Error: EACCES: permission denied, mkdir '/Users/matthewpritchett/AnchorWP/public/anchor_wp/builds'
    at Error (native)
[08:52:56] 'scripts:main' errored after 378 ms
[08:52:56] Error: EACCES: permission denied, mkdir '/Users/matthewpritchett/AnchorWP/public/anchor_wp/builds'
    at Error (native)
[08:52:56] Version: webpack 1.14.0
         Asset     Size  Chunks             Chunk Names
application.js  1.88 kB       0  [emitted]  main
[08:52:56] 'scripts:renderer' errored after 419 ms
[08:52:56] Error: EACCES: permission denied, mkdir '/Users/matthewpritchett/AnchorWP/public/anchor_wp/builds'
    at Error (native)

problem with getting up and running

  • Windows 10
  • node 4.4.4
  • bozon 0.4.0

While trying to follow the install steps i do this:

  1. bozon new helloworld
  2. cd hello world
  3. run npm install manually (for some reason this fails silently on my machine during the new process)
  4. npm install fails because package.json contains a post install script 'install-app-deps'. This fails because install-app-deps does not exist in ./node_modules/.bin
$ ls ./node_modules/.bin/
bozon*  bozon.cmd  electron*  electron.cmd

Any insight into how to complete the install is much appreciated.

I updates Bozon, now nothing works anymore

So, I upgrade Bozon to the latest version (0.9.2) and now nothing is working anymore. It won't compile anything anymore because a lot of foldernames changed (I fixed that) and also no node_modules are loaded it seems to only look for CSS files when I use require?

For example, this worked in a previous version:
const $ = require('jquery');

Now I get this error when starting the app with bozon start:

[ ModuleNotFoundError: Module not found: Error: Can't resolve 'jquery' in '[PATH]/src/javascripts/renderer'
    at factory.create (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/webpack/lib/Compilation.js:823:10)
    at factory (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/webpack/lib/NormalModuleFactory.js:397:22)
    at resolver (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/webpack/lib/NormalModuleFactory.js:130:21)
    at asyncLib.parallel (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/webpack/lib/NormalModuleFactory.js:224:22)
    at /Users/lars/.npm-global/lib/node_modules/bozon/node_modules/neo-async/async.js:2830:7
    at /Users/lars/.npm-global/lib/node_modules/bozon/node_modules/neo-async/async.js:6877:13
    at normalResolver.resolve (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/webpack/lib/NormalModuleFactory.js:214:25)
    at doResolve (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/enhanced-resolve/lib/Resolver.js:184:12)
    at hook.callAsync (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
resolve 'jquery' in '[PATH]/src/javascripts/renderer'
  Parsed request is a module
  using description file: [PATH]/package.json (relative path: ./src/javascripts/renderer)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      looking for modules in [PATH]/src/stylesheets
        using description file: [PATH]/package.json (relative path: ./src/stylesheets)
          Field 'browser' doesn't contain a valid alias configuration
          using description file: [PATH]/package.json (relative path: ./src/stylesheets/jquery)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              [PATH]/src/stylesheets/jquery doesn't exist
            .wasm
              Field 'browser' doesn't contain a valid alias configuration
              [PATH]/src/stylesheets/jquery.wasm doesn't exist
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              [PATH]/src/stylesheets/jquery.mjs doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              [PATH]/src/stylesheets/jquery.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              [PATH]/src/stylesheets/jquery.json doesn't exist
            as directory
              [PATH]/src/stylesheets/jquery doesn't exist
      looking for modules in [PATH]/src/images
        using description file: [PATH]/package.json (relative path: ./src/images)
          Field 'browser' doesn't contain a valid alias configuration
          using description file: [PATH]/package.json (relative path: ./src/images/jquery)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              [PATH]/src/images/jquery doesn't exist
            .wasm
              Field 'browser' doesn't contain a valid alias configuration
              [PATH]/src/images/jquery.wasm doesn't exist
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              [PATH]/src/images/jquery.mjs doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              [PATH]/src/images/jquery.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              [PATH]/src/images/jquery.json doesn't exist
            as directory
              [PATH]/src/images/jquery doesn't exist ]

How do I require node_modules in the latest version?

By the way, if I don't require any node modules it starts and in the devTools I can use require('jquery') without any problems...

Thanks.

Why do you need Webpack?

I've had some trouble getting native modules to load correctly in webpack. I was curious why you used this instead of electron-compile and possibly electron-connect.

Cant start on Windows

When I try to do bozon start on Windows 10, I get "Cannot find module 'commander'"

image

I tried adding NODE_PATH to system variables, didnt help

Ability to create app for windows 32 bit system

First, a wonderful tool to wrap electron packaging! Really great for bootstrap an electron app for the first time.

Here is my environment:

Environment Version
OS MacOS Sierra
electron 1.4.3
electron-builder 12.0.3
electron-packager-tf 7.5.3
gulp 3.9.1
npm 4.1.2

When I'm doing bozon package windows it is by default generating for 64-bit machine and app is working fine. But I don't find a way to generate for 32-bit machine using bozon.

Is there any option available or am I missing something?

I went through the code and found a temporary workaround by changing

this.electronBuilder.Platform[platform.toUpperCase()].createTarget()

to

this.electronBuilder.Platform[platform.toUpperCase()].createTarget(null,
        this.electronBuilder.Arch.ia32, this.electronBuilder.Arch.x64)

here packager.js#L49

Was "Boson" taken.

Not really an issue but why not use "Boson" so that it falls in line with "Photon" and "Electron"? I understand that Bozon sounds similar unless the creators are from the village Bozon in Turkey.

Remove gulp-sass from dependencies

Either add syntax options

  bozon new  [project_name] --sass, --scss, --less 

or

add options sass, scss, less to inquirer

or

handle css with webpack and avoid css compilation with gulp

React implementation

In case I want to use React, in order to use http://reactdesktop.js.org , I just need to add a gulp recipe to transpile jsx files right? Apart from installing needed packages in app/package.json I guess.

This is my gulpfile.js:

require('bozon/lib/tasks');
var bozon = require('bozon/lib/bozon');
var jsx = require('gulp-jsx');

bozon.buildTaskBefore('scripts:renderer', 'scripts:jsx', function() {
  return bozon.src('javascripts/scripts/**/*.jsx').pipe(jsx({
    factory: 'React.createClass'
  })).on('error', function(e) { console.log(e); }).pipe(bozon.dest('javascripts/renderer'));
});

Using https://github.com/alexmingoia/gulp-jsx, but it doesn't work, no files are generated in javascripts/renderer.

Too many warnings during installation...

node v6.1.0
electron v1.2.2

$ npm install -g bozon
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
/Users/xiaolai/.nvm/versions/node/v6.1.0/bin/bozon -> /Users/xiaolai/.nvm/versions/node/v6.1.0/lib/node_modules/bozon/lib/cli.js

> [email protected] install /Users/xiaolai/.nvm/versions/node/v6.1.0/lib/node_modules/bozon/node_modules/macos-alias
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/volume/src/volume.o
  SOLINK_MODULE(target) Release/volume.node

> [email protected] install /Users/xiaolai/.nvm/versions/node/v6.1.0/lib/node_modules/bozon/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
  COPY /Users/xiaolai/.nvm/versions/node/v6.1.0/lib/node_modules/bozon/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node
  TOUCH Release/obj.target/action_after_build.stamp

> [email protected] install /Users/xiaolai/.nvm/versions/node/v6.1.0/lib/node_modules/bozon/node_modules/fs-xattr
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/xattr/src/async.o
  CXX(target) Release/obj.target/xattr/src/error.o
  CXX(target) Release/obj.target/xattr/src/sync.o
  CXX(target) Release/obj.target/xattr/src/util.o
  CXX(target) Release/obj.target/xattr/src/xattr.o
  SOLINK_MODULE(target) Release/xattr.node

Can't use installed npm packages (the ones inside app/node_modules) (maybe a newby question)

I'm on Windows 10, running Bozon 0.6.1

First of all, sorry, i'm a newbie at Javascript/NodeJS (this project itself is for learning more about it)

I've saved random-js and material-components-web to app/node_modules and I want to use them in my electron app, but the node_modules isn't being copied to the builds/development folder, so i cant use them.

Probably prepare::app can't stat them?
I've see the routine for prepare::app, and (if i'm not wrong) Bozon will try to stat node_modules and copy it to the builds/. And if it can't stat it, it will fallback to the cp -r method (wich is unavailable on Windows, of course), am I right?

And I don't know if this is a bug, or a stupid newbie question.. Thanks in advance

Cheers
capturar

To support Angular2 in Bozon

I am newbie to web development and trying out electronjs for future development. I would love to contribute Bozon project to support Angular2. Could you guide me to start?

Syntax-Error when creating new project

Hello folks,
Iยดm new to this, so maybe Iยดm doing something wrong. I had problems creating a new project with version 0.7.8

After installing with NPM I tried to start a new project and got this error:

xyz@machine: $ bozon new project-name
/usr/local/lib/node_modules/bozon/node_modules/inquirer/lib/prompts/list.js:32
      let index = _.findIndex(this.opt.choices.realChoices, ({ value }) => value === def);
                                                             ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Function.promptModule.restoreDefaultPrompts (/usr/local/lib/node_modules/bozon/node_modules/inquirer/lib/inquirer.js:55:33)
    at Object.inquirer.createPromptModule (/usr/local/lib/node_modules/bozon/node_modules/inquirer/lib/inquirer.js:65:16)
    at Object.<anonymous> (/usr/local/lib/node_modules/bozon/node_modules/inquirer/lib/inquirer.js:77:28)

I switched back to v0.7.7 and it worked.

Update electron-builder to 13.8.0

  1. Update electron-builder version to 13.8.0
  2. Remove electron-packager-tf โ€” not required anymore.

Is this project still alive? Should it be promoted on electron-builder page?

webpack config to add json-loader

I have a dependency that requires loading a json, but to work with webpack I need to include json-loader, else throws:

... /app/node_modules/mime/types.json Unexpected token (1:27)
You may need an appropriate loader to handle this file type.

Can be reproduced installing and instantiating the node-mime module.

Adding the loader manually to bozon/lib/building/tasks.js it solves the problem:

bozon.task('scripts:renderer', function () {
  var webpack = bozon.requireLocal('webpack-stream')
  return bozon.src('javascripts/renderer/application.*').pipe(webpack({
    target: 'electron',
    output: {
      filename: 'application.js'
    },
    module: {
        loaders: [
            { test: /\.json$/, loader: "json-loader" }
        ]
    }
  })).pipe(bozon.dest('javascripts/renderer'))
})

Can this be done somehow in the bozon config files? I'm not so clear on how to do webpack config with the bozon config files setup.

package cmd. fails w/ Unhandled rejection Error: electron-prebuilt must be in the devDependencies

First things first: AWESOME project ! ๐Ÿ‘

The error...

Unhandled rejection Error: electron-prebuilt must be in the devDependencies - Click to expand

CI detected, so artifacts will be published if draft release exists
Unhandled rejection Error: electron-prebuilt must be in the devDependencies
    at checkDependencies (/dev/code/bozon_test/node_modules/electron-builder/src/packager.ts:310:13)
    at Packager.checkMetadata (/dev/code/bozon_test/node_modules/electron-builder/src/packager.ts:184:5)
    at Packager.<anonymous> (/dev/code/bozon_test/node_modules/electron-builder/src/packager.ts:90:10)
    at next (native)
    at runCallback (timers.js:574:20)
    at tryOnImmediate (timers.js:554:5)
    at processImmediate [as _immediateCallback] (timers.js:533:5)
From previous event:
    at tsAwaiter (/dev/code/bozon_test/node_modules/electron-builder/src/util/awaiter.ts:10:47)
    at Object.build (/dev/code/bozon_test/node_modules/electron-builder/out/builder.js:153:12)
    at Packager.productionBuild (/usr/local/lib/node_modules/bozon/lib/packaging/packager.js:46:33)
    at Packager.build (/usr/local/lib/node_modules/bozon/lib/packaging/packager.js:19:19)
    at Object.package (/usr/local/lib/node_modules/bozon/lib/bin/runner.js:21:42)
    at Command.<anonymous> (/usr/local/lib/node_modules/bozon/lib/bin/bozon.js:42:19)
    at Command.listener (/usr/local/lib/node_modules/bozon/node_modules/commander/index.js:301:8)
    at emitTwo (events.js:106:13)
    at Command.emit (events.js:191:7)
    at Command.parseArgs (/usr/local/lib/node_modules/bozon/node_modules/commander/index.js:615:12)
    at Command.parse (/usr/local/lib/node_modules/bozon/node_modules/commander/index.js:458:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/bozon/lib/bin/bozon.js:45:9)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
[...]

...occurs for package cmd. for all targets (osx|windows|linux).

Simply installing the module electron-prebuilt as devDependency does not solve the issue.

I could reproduce for [email protected] on Node v5.12.0 and v6.6.0 on OSX 10.12 (Sierra) for a newly scaffolded otherwise untouched app.

Uncaught Error: Could not locate the bindings file.

I am trying to use the package serialport in a project with no success. I have simplified the project to the following:

  1. Created a new Bozon project with bozon new bozon-serialport-test.
  2. Run bozon start to verify that the project works as expected.
  3. To the top of app/renderer/application.js, added the line
    const Serialport = require('serialport);.

Doing this results in the following error.

application.js:2024 Uncaught Error: Could not locate the bindings file. Tried:
โ†’ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/build/serialport.node
โ†’ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/build/Debug/serialport.node
โ†’ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/build/Release/serialport.node
โ†’ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/out/Debug/serialport.node
โ†’ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/Debug/serialport.node
โ†’ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/out/Release/serialport.node
โ†’ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/Release/serialport.node
โ†’ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/build/default/serialport.node
โ†’ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/compiled/6.5.0/darwin/x64/serialport.node

The correct path is /Users/john/Documents/Software_Development/Node/bozon_serialport_test/builds/development/node_modules/serialport/build/Release/serialport.node.

As suggested here, I ran the (slightly modified) command ./app/node_modules/.bin/electron-rebuild (since the app node_modules dir is where serialport is). I get the same result.

Also from that page, I tried HOME=~/.electron-gyp node-gyp rebuild --target=1.4.15 --arch=x64 --dist-url=https://atom.io/download/electron and got the same result.

I also read through this post and tried the following:

  1. Installed node-pre-gyp globally with yarn global node-pre-gyp.
  2. In the directory . . .bozon_serialport_test/app/node_modules/serialport, I executed node-pre-gyp rebuild.
  3. I ran the project again and got the same error.

I am using:
electron 1.4.15,
bozon 0.7.0,
OS X 10.11.6

What is generating those incorrect paths? Is there anything else to try to make this work?

windows build under os x fails

hi there,

nice tool, just found it and was happy to use it.
but it looks like it is a outdated. i just wondering if you still support this project or if its better for me to use another build tool?

the error message happens while trying to deploy a windows app under os x:

[01:01:02] Finished 'html' after 274 ms [01:01:02] Finished 'styles' after 256 ms [01:01:02] Finished 'scripts:main' after 255 ms [01:01:02] Finished 'scripts:renderer' after 255 ms [01:01:02] Starting 'prepare:app'... [01:01:02] Finished 'prepare:app' after 35 ms Warning: "build.osx" is deprecated โ€” please use "mac" instead of "osx" Skip app dependencies rebuild because platform is different Warning: app-bundle-id is deprecated, please use appId Unhandled rejection Error: Cannot check wine version: Error: spawn wine ENOENT

anyway, even i couldn't use the tool yet thanks for the great work you done for the electron community.

cheers maiky

bozon package linux got : Error: Exit code: ENOENT. spawn gm ENOENT

Hi,
Thank you for your great job.
It looks have error when package linux when do : bozon package linux.
I tested 'bozon package linux' via linux OS , windows OS, mac OS all have same error.
bozon package mac and win working great.
All test via NodeJS 7.7.3,
and make a new bozon project with bozon,
then do bozon start and got great running.
then do bozon package linux no any other touch.
folder: packages/linux-unpacked looks good and have all unpacked files.

$bozon package linux
[11:24:51] Using gulpfile /qtgate/gulpfile.js
[11:24:51] Starting 'html'...
[11:24:51] Starting 'images'...
[11:24:51] Starting 'styles'...
[11:24:51] Starting 'scripts:main'...
[11:24:51] Starting 'scripts:renderer'...
[11:24:52] Finished 'images' after 143 ms
[11:24:52] Finished 'html' after 194 ms
[11:24:52] Finished 'styles' after 179 ms
[11:24:52] Version: webpack 1.14.0
Asset Size Chunks Chunk Names
application.js 1.88 kB 0 [emitted] main
[11:24:52] Finished 'scripts:main' after 211 ms
[11:24:52] Finished 'scripts:renderer' after 211 ms
[11:24:52] Starting 'prepare:app'...
[11:24:52] Finished 'prepare:app' after 29 ms
Skip app dependencies rebuild because platform is different
Packaging for linux x64 using electron 1.6.2 to packages/linux-unpacked
Downloading tmp-1535-0-electron-v1.6.2-linux-x64.zip
[> ] 0.0% (0 B/s)
Unhandled rejection Error: Exit code: ENOENT. spawn gm ENOENT
at /qtgate/node_modules/electron-builder-util/src/util.ts:75:16
at exithandler (child_process.js:217:5)
at ChildProcess.errorhandler (child_process.js:229:5)
at emitOne (events.js:96:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:213:12)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
From previous event:
at exec (/qtgate/node_modules/electron-builder-util/src/util.ts:53:3)
at resize (/qtgate/node_modules/electron-builder/src/targets/LinuxTargetHelper.ts:155:16)
at /qtgate/node_modules/electron-builder/src/targets/LinuxTargetHelper.ts:158:46
at Generator.next ()
at go$readdir$cb (/qtgate/node_modules/graceful-fs/graceful-fs.js:149:14)
at FSReqWrap.oncomplete (fs.js:114:15)
From previous event:
at LinuxTargetHelper.createFromIcns (/qtgate/node_modules/electron-builder/out/targets/LinuxTargetHelper.js:216:11)
at /qtgate/node_modules/electron-builder/src/targets/LinuxTargetHelper.ts:54:25
From previous event:
at LinuxTargetHelper.computeDesktopIcons (/qtgate/node_modules/electron-builder/out/targets/LinuxTargetHelper.js:84:11)

Where modules for app/javascripts/main/index.js supposed to go?

Steps:

  1. Created a new project with bozon new bozontest
  2. cd bozontest/app and npm install electron-debug to install package to the app/node_modules
  3. Added require('electron-debug')(); to the app/javascripts/main/index.js
  4. Run bozon start from root project folder and it throws an error:
    App threw an error during load Error: Cannot find module 'electron-debug'

It works for packaged app, though.
Adding that package to the root package.json instead: works for bozon start, but does not work with packaged app.
Is it correct to add it to both root package.json and app/package.json ?

Failed to package app on Linux

I run bozon package and it fails.

Here's the stack trace:

(node:5361) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:5368) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
/home/tom/thundred/gulpfile.js:5
bozon.task('styles', function () {
      ^

TypeError: bozon.task is not a function
    at Object.<anonymous> (/home/tom/thundred/gulpfile.js:5:7)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Liftoff.handleArguments (/home/tom/thundred/node_modules/gulp/bin/gulp.js:116:3)
    at Liftoff.<anonymous> (/home/tom/thundred/node_modules/liftoff/index.js:193:16)

Here's the contents of my gulpfile.js:

require('bozon/tasks/all')
var sass = require('gulp-sass')

bozon.task('styles', function () {
  return bozon.src('stylesheets/**/*.sass').pipe(sass.sync({
    outputStyle: 'compressed',
    precision: 10
  }).on('error', sass.logError)).pipe(bozon.dest('stylesheets'))
})

I feel like I'm missing something simple here...

Use template-literal instead of EJS

Template Literal is fastest, smallest and simplest template engine, because it use JS's literal template feature.

It's 55 times faster than EJS, and it also use less CPU and RAM ressources, so it may be a good idea to use it instead of EJS ๐Ÿ˜€

Application not starting

After creating project i tried this command
bozon start
but nothing happens . I'm using windows

skip install

@railsware,

I would like to suggest adding a 'skip install' option to bozon new [name], similar to 'yeoman --skip-install'.

Thank you very much.

Updates needed

Needs to be updated for Electron v3.0.2

Has some deprecations

npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated @types/[email protected]: This is a stub types definition for commander (https://github.com/tj/commander.js). commander provides its own type definitions, so you don't need @types/commander installed!
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

Debugging in DevTools

Hello,

Is it possible to debug the main process in the devtools? Webpack is adding that closure, so I can't easily debug. Also I can't get require to work for local files, how do I use that?

Thanks!

Error in windows if the path contains spaces

Hi,

if the project path contains any spaces the childProcess.spawn functions are not executing the right files.

You have to enclose such paths with " .

(Sorry I have no time for a PR the next two weeks)

Native NPM Modules

Do Native NPM Modules work with this or do I need "electron-rebuild"?

VSCode Debugging

Im new to using bozon and I wanted to see if anyone has this setup with visual studio code debugging. I cant seem to get it to keep the debugger running using bozon start. Any help would be great

Typescript implementation

Hello everybody.

Happy new year.

This is not really an issue but a request for a "how-to" on how to use typescript as main language with bozon. I have an idea but it use "npm" not "bozon" and I don't know if it is the right way to do.

Thank you in advance.

Found 2 vulnerabilities (1 moderate, 1 high) after installed bozon

Afther starting new electron app with bozon new appName

PS C:\Users\justi\OneDrive\Bureau\Electron> bozon new HornelleTop

Welcome to Bozon!
You're about to start new Electron application,
but first answer a few questions about your project:

? What is the name of your app? HornelleTop
? Please specify author name (ex: John Doe): Justin Dah-kenangnon
create .gitignore
create package.json
create webpack.config.js
create LICENSE
create README.md
create src\main\index.js
create src\preload\index.js
create src\renderer\index.html
create src\renderer\stylesheets\application.css
create src\renderer\javascripts\index.js
create resources\icon.icns
create resources\icon.ico
create config\settings.json
create config\environments\development.json
create config\environments\production.json
create config\environments\test.json
create config\platforms\windows.json
create config\platforms\linux.json
create config\platforms\mac.json
create test\features\main_spec.js
create test\helper.js
Running npm install..
npm WARN deprecated [email protected]: outdated version, please use @next
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

[email protected] install C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top\node_modules\electron-chromedriver
node ./download-chromedriver.js

[email protected] postinstall C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top\node_modules\babel-runtime\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

https://opencollective.com/core-js
https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

[email protected] postinstall C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top\node_modules\dmg-builder\node_modules\ejs
node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

[email protected] postinstall C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top\node_modules\ejs
node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

[email protected] postinstall C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top\node_modules\electron
node install.js

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1019 packages from 973 contributors and audited 6460 packages in 603.283s

25 packages are looking for funding
run npm fund for details

found 2 vulnerabilities (1 moderate, 1 high)

run npm audit fix to fix them, or npm audit for details

Success! Created hornelle_top at C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top
Inside that directory, you can run several commands:

bozon start
Starts the Electron app in development mode.

bozon test
Starts the test runner.

bozon package
Packages Electron application for specified platform.

We suggest you to start with typing:
cd hornelle_top
bozon start

PS C:\Users\justi\OneDrive\Bureau\Electron> cd hornelle_top

I try running : npm audit fix but i got this:

`PS C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top> npm audit fix
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

up to date in 68.324s

25 packages are looking for funding
run npm fund for details

fixed 0 of 2 vulnerabilities in 6460 scanned packages
2 vulnerabilities required manual review and could not be updated
PS C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top>
`

Any thing to make in order to resolve this ?

bozon + three.js

hi,
tried running threejs inside a bozon project template
used sample from https://github.com/jeromeetienne/electron-threejs-example
example running on electron boilerplate (just drag and drop.

i tried to change code to bozon , this is what I edited:

`var electron, path, json;
let window;
path = require('path');
json = require('../../package.json');

electron = require('electron');

electron.app.on('ready', function() {


  window = new electron.BrowserWindow({
    title: json.name,
    width: json.settings.width,
    height: json.settings.height,
    frame: false,
    transparent: true

  });

  window.loadURL('file://' + path.join(__dirname, '..', '..') + '/index.html');



  window.on('closed', function() {
    window = null;
  });

});
`

and this example code:

`const {app, BrowserWindow} = require('electron');

let mainWindow;

// Quit when all windows are closed.
app.on('window-all-closed', function() {
  if (process.platform != 'darwin')
    app.quit();
});

// This method will be called when Electron has done everything
// initialization and ready for creating browser windows.
app.on('ready', function() {
  // Create the browser window.
  mainWindow = new BrowserWindow({
          width: 800, 
          height: 600, 
          frame:false, 
          transparent: true
  });

  mainWindow.setIgnoreMouseEvents(true)

  // and load the index.html of the app.
  mainWindow.loadURL('file://' + __dirname + '/index.html');

  // Emitted when the window is closed.
  mainWindow.on('closed', function() {
    // Dereference the window object, usually you would store windows
    // in an array if your app supports multi windows, this is the time
    // when you should delete the corresponding element.
    mainWindow = null;
  });
});
`

but on runnig bozon start nothing happens...
this is the index.html

`<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title></title>
  <link rel="stylesheet" href="stylesheets/application.css" />
  <script src="javascripts/renderer/application.js" type="text/javascript"></script>
</head>

<body>
<div id="container"></div>

</body>
<script src="javascripts/three.min.js"></script>
<script>
...here code of the example</script>
`

Remove gulp-coffee from initial setup

Make coffee processing optional choice on new project create, either with option:

bozon new [project_name] --coffee

or

Add coffee, typescript, es6 options to inquirer

bozon starts does not do anything and issue no errors

I was very excited discovering bozon, after getting really tired searching for the best electron application skeleton. So, I followed your (very simple) installation guide, issued the command

bozon start

and saw this:

C:\work\monterey-framework\generic-electron-app\generic_app (master)
ฮป bozon start

C:\work\monterey-framework\generic-electron-app\generic_app (master)

The first remedy I tried was to assume that your installation instructions should really be:

npm install -g bozon
bozon new [name]
npm install

however, while I believe that npm install should be run before bozon start, even after running npm install followed by bozon start, still nothing happend.

My last attempt was to install bozon locally to my project where I want to use it. No changes - bozon start does me as much good as pushing on my nose :-)

My environment

  • windows 8.1
  • node.js v5.1.1
  • npm 3.5.0

Can you advise, please?

missing "bozon" in devDependencies

How to reproduce:

  • bozon new PROJECT (here under OSX)
  • transfer project to linux (here via git push/pull) except for the node_modules-subdir
  • npm install in the PROJECT's dir
  • bozon start

That led to the error:

module.js:328
    throw err;
    ^

Error: Cannot find module 'bozon/lib/tasks'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/DIR/PROJECT/gulpfile.js:1:63)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
Error launching app
Unable to find Electron app at [...]

Fix:
in the file PROJECT/package.json
add to devDependencies
the following dependency:
"bozon": "^0.7.1"
and subsequently npm install

I found that as a solution since the module bozon/lib/tasks was in case of OSX found as PROJECT/node_modules/bozon/lib/tasks.js but missing in case of linux.

So "bozon" seems actually to be a missing devDependency.

HTH and kind regards,
Thomas

Not working the NativeImage class static functions

new Tray(NativeImage.createEmpty());

uncaughtException: Cannot read property 'createEmpty' of undefined
TypeError: Cannot read property 'createEmpty' of undefined
    at registerTray (/Users/umutcelik/viadirect/viadirect-oriantation/builds/development/javascripts/main/index.js:202:55)
    at App.initApp (/Users/umutcelik/viadirect/viadirect-oriantation/builds/development/javascripts/main/index.js:222:5)
    at App.emit (events.js:187:15)

Livereload Not Working

Maybe I'm just being dumb but it doesn't seem like the app is auto-refreshing in development.

How to add a new script for build for armv7l

How to build my Electron app using this script in package.json. I use this to run the same to run apps for my raspberry pi.

"build --armv7l --linux"

Adding the above to scripts and running shows errors

Error: Application entry file "index.js" in the "[path]/dist/linux-armv7l-unpacked/resources/app.asar" does not exist. Seems like a wrong configuration.

Unable to use whitespace in path

When I create a program in a folder with a whitespace and I start it, I get the following error:

/bin/sh: 1: /home/lars/My: not found
/bin/sh: 1: /home/lars/My: not found

That's all. I just call bozon start.

The path: /home/lars/My Path/Test Project
OS: Ubuntu 17.10 (also happening on Mac OS High Sierra)

So what should I do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.