Electron default app doesn't change

419 views Asked by At

I am trying to convert my Google Closure Library used web app to Electron. I've used grunt-electron to package the application but it seems it doesn't change the default app of the Test.app. In Test.app/Contents/Contents/app/ there exist my application, but it doesn't load my app, but indeed loads default app.

My file hierarchy:

  • www: index.js (Electron config file), index.html, css/, fonts/, js/**

My grunt task:

electron: {
        osxBuild: {
            options: {
                name: 'Test App',
                dir: 'www',
                out: 'build',
                version: '0.25.3',
                platform: 'darwin',
                arch: 'x64'
            }
        }
    }
1

There are 1 answers

0
CKK On BEST ANSWER

Check if package.json file exists in your www directory and has main js set inside.

It should be something like:

{
  "name"    : "your-app",
  "version" : "0.1.0",
  "main"    : "main.js"
}