Coder Social home page Coder Social logo

sindresorhus / generator-electron Goto Github PK

View Code? Open in Web Editor NEW
718.0 15.0 67.0 810 KB

Scaffold out an Electron app boilerplate

Home Page: https://github.com/sindresorhus/electron-boilerplate

License: MIT License

CSS 7.02% HTML 3.91% JavaScript 89.06%

generator-electron's Introduction

generator-electron

Scaffold out an Electron app

See awesome-electron for more useful Electron resources.

See Caprine for a production app based on this boilerplate.

Features

Install

$ npm install --global yo generator-electron

Usage

With yo:

$ yo electron

Related

generator-electron's People

Contributors

artanis avatar kevva avatar malept avatar richienb avatar sindresorhus 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

generator-electron's Issues

ES6 support

Just wondering where in the generator does it add the ES6 support or if it just comes natively in Electron?

Empty Website URL Remain Unchecked

I wrongly pressed Enter when asked for website URL, and the generator crashed. Would it be like asking for GitHub usernames, which warns user of the empty value?

? What is the URL of your website?

/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:77
    throw e;
    ^

Error: Invalid URL
    at module.exports (/usr/local/lib/node_modules/generator-electron/node_modules/normalize-url/index.js:56:9)
    at Object.prompt.filter (/usr/local/lib/node_modules/generator-electron/app/index.js:34:12)
    at /usr/local/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/run-async/index.js:26:25
    at /usr/local/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/run-async/index.js:25:19
    at /usr/local/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/inquirer/lib/prompts/base.js:88:12
    at tryCatcher (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:63:31)
    at InnerObserver.Rx.FlatMapObservable.InnerObserver.next (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:2140:43)
    at InnerObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:1762:31)
    at InnerObserver.tryCatcher (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:63:31)
    at AutoDetachObserverPrototype.next (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:5883:51)

yo: command not found

When i installed generator-electron and run command yo electron i bash says:

yo: command not found

Why is website required?

It's only used in three places: package.json, license, and readme.md.

These locations could easily be edited in by the user later, if they don't want to immediately provide a website url.

Integrate watching files plugin

It would be great to integrate chokidar to watch files and automatically restart an electron app on any changes. So, we don't need to manually restart the app while developing it.

Fatal error: Unable to parse version string

Fatal error: Unable to parse version string when packaging app for platform win32 ia32 using electron on Windows 10. And I find the problem occurs in the package.json

"scripts": {
"test": "xo",
"start": "electron .",
"build": "electron-packager . --out=dist --app-version=$npm_package_version --prune --asar --overwrite --all"
},

the generator-electron should use %npm_package_version% instead of $npm_package_version in windows

Use globbing for the `fs` methods

this.fs.copy(this.templatePath('editorconfig'), this.destinationPath('.editorconfig'));
this.fs.copy(this.templatePath('gitattributes'), this.destinationPath('.gitattributes'));
this.fs.copy(this.templatePath('gitignore'), this.destinationPath('.gitignore'));
this.fs.copy(this.templatePath('jshintrc'), this.destinationPath('.jshintrc'));
this.fs.copy(this.templatePath('index.js'), this.destinationPath('index.js'));
this.fs.copy(this.templatePath('index.html'), this.destinationPath('index.html'));
this.fs.copy(this.templatePath('index.css'), this.destinationPath('index.css'));
this.fs.copyTpl(this.templatePath('license'), this.destinationPath('license'), tmpl);
// needed so npm doesn't try to use it and fail
this.fs.copyTpl(this.templatePath('_package.json'), this.destinationPath('package.json'), tmpl);
this.fs.copyTpl(this.templatePath('readme.md'), this.destinationPath('readme.md'), tmpl);

Cannot generate projects with Nodist

Hi,

When trying to install the generator and run it, some issues are popping.

image

It seems the Nodist usage is not compatible. It does not find the $NODE_PATH while it exists and the generation fails for missing files.

Do you have any clue?

Thanks

No documentation?

Is this generator intended for the boilerplate only? No build process? I've tried npm build but nothing happens, unlike npm test and npm start which works just fine. I'm using latest version

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.