{"action":"created","issue":{"url":"https://api.github.com/repos/electronjs/electron-compile/issues/61","labels_url":"https://api.github.com/repos/electronjs/electron-compile/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/electronjs/electron-compile/issues/61/comments","events_url":"https://api.github.com/repos/electronjs/electron-compile/issues/61/events","html_url":"https://github.com/electronjs/electron-compile/issues/61","id":128979124,"number":61,"title":"How do you properly pre-compile for release?","user":{"login":"ezekg","id":6979737,"avatar_url":"https://avatars.githubusercontent.com/u/6979737?v=3","gravatar_id":"","url":"https://api.github.com/users/ezekg","html_url":"https://github.com/ezekg","followers_url":"https://api.github.com/users/ezekg/followers","following_url":"https://api.github.com/users/ezekg/following{/other_user}","gists_url":"https://api.github.com/users/ezekg/gists{/gist_id}","starred_url":"https://api.github.com/users/ezekg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezekg/subscriptions","organizations_url":"https://api.github.com/users/ezekg/orgs","repos_url":"https://api.github.com/users/ezekg/repos","events_url":"https://api.github.com/users/ezekg/events{/privacy}","received_events_url":"https://api.github.com/users/ezekg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-01-26T23:45:19Z","updated_at":"2016-01-31T21:57:01Z","closed_at":null,"body":"The current documentation is confusing,\r\n\r\n> ## How can I precompile my code for release-time?\r\n> \r\n> electron-compile comes with a command-line application to pre-create a cache for you.\r\n> \r\n> ```sh\r\n> Usage: electron-compile --appDir [root-app-dir] paths...\r\n> \r\n> Options:\r\n>   -a, --appdir  The top-level application directory (i.e. where your\r\n>                 package.json is)\r\n>   -v, --verbose  Print verbose information\r\n>   -h, --help     Show help\r\n> ```\r\n> \r\n> Run `electron-compile` on all of your application assets, even if they aren't strictly code (i.e. your static assets like PNGs). electron-compile will recursively walk the given directories.\r\n> \r\n> ```sh\r\n> electron-compile --appDir /path/to/my/app ./src ./static\r\n> ```\r\n\r\nWhat is `--appDir`? Is that where the compiled files will go? It seems like that flag does nothing.\r\n\r\nDoes pre-compiling require you to have your `main.js` and `package.json` inside of the `./src` directory? I don't get how this while pre-compile thing is supposed to work. As it is now, I get this error when I boot the app with `electron .` after pre-compiling with `electron-compile --appDir . ./src ./resources`:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/6979737/12599078/864f4fda-c454-11e5-9b50-a17204701eeb.png)\r\n\r\nIf I remove the `.cache` directory, then the app runs correctly again. What's the correct way to package an app for release with this library?\r\n\r\nThis is my current folder structure,\r\n![image](https://cloud.githubusercontent.com/assets/6979737/12599054/5ae95b7e-c454-11e5-99e6-0d04fcfad653.png)\r\n"},"comment":{"url":"https://api.github.com/repos/electronjs/electron-compile/issues/comments/177628762","html_url":"https://github.com/electronjs/electron-compile/issues/61#issuecomment-177628762","issue_url":"https://api.github.com/repos/electronjs/electron-compile/issues/61","id":177628762,"user":{"login":"jronallo","id":66485,"avatar_url":"https://avatars.githubusercontent.com/u/66485?v=3","gravatar_id":"","url":"https://api.github.com/users/jronallo","html_url":"https://github.com/jronallo","followers_url":"https://api.github.com/users/jronallo/followers","following_url":"https://api.github.com/users/jronallo/following{/other_user}","gists_url":"https://api.github.com/users/jronallo/gists{/gist_id}","starred_url":"https://api.github.com/users/jronallo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jronallo/subscriptions","organizations_url":"https://api.github.com/users/jronallo/orgs","repos_url":"https://api.github.com/users/jronallo/repos","events_url":"https://api.github.com/users/jronallo/events{/privacy}","received_events_url":"https://api.github.com/users/jronallo/received_events","type":"User","site_admin":false},"created_at":"2016-01-31T21:57:01Z","updated_at":"2016-01-31T21:57:01Z","body":"When I try to run my built app I just get an error that resources/app/index.js can't be found. There is no index.js file there, because I'm using index.coffee instead. I've moved the compiled .cache over but it still is looking for index.js and can't find it. "}}