{"id":20148324,"url":"https://github.com/nwutils/nw-dev","last_synced_at":"2025-03-03T00:25:55.479Z","repository":{"id":30195237,"uuid":"33746060","full_name":"nwutils/nw-dev","owner":"nwutils","description":"A drop-in library for nw.js development","archived":false,"fork":false,"pushed_at":"2024-12-21T12:50:20.000Z","size":108,"stargazers_count":32,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T05:01:42.557Z","etag":null,"topics":["developer-tools","development","devtools","library","live-reload","livereload","node-module","nw","nwjs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/nw-dev","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nwutils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-10T19:12:30.000Z","updated_at":"2024-09-17T16:51:03.000Z","dependencies_parsed_at":"2024-06-19T00:14:28.839Z","dependency_job_id":"3817a147-3927-4059-9c2b-19e34e0fe36d","html_url":"https://github.com/nwutils/nw-dev","commit_stats":{"total_commits":21,"total_committers":5,"mean_commits":4.2,"dds":0.2857142857142857,"last_synced_commit":"7f596ea3eda54aacdbbd0719cad8be8421a28cf2"},"previous_names":["1j01/nw-dev"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwutils","download_url":"https://codeload.github.com/nwutils/nw-dev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587787,"owners_count":19986628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["developer-tools","development","devtools","library","live-reload","livereload","node-module","nw","nwjs"],"created_at":"2024-11-13T22:37:16.685Z","updated_at":"2025-03-03T00:25:55.455Z","avatar_url":"https://github.com/nwutils.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e This repository is in maintainance mode. Bug fixes will be provided on a best effort basis. If you use this project, please consider contributing back.\n\n# \u003cimg src=\"./nw-dev-logo.svg\" height=\"64\" valign=\"middle\"\u003e nw-dev\n\nA drop-in library for [nw.js][] development\n\n* Live-reloads upon save\n\n* Reloads when you press \u003ckbd\u003eF5\u003c/kbd\u003e\n\n* Opens the devtools when you press \u003ckbd\u003eF12\u003c/kbd\u003e (`nw@\u003e=0.13.0` does this for you)\n\n* Opens the devtools upon error\n\n* Sets `window.CRASHED` upon error,\n  so you can stop an animation loop for example\n  (and not flood the console with errors)\n\n* Clears the require cache,\n  so reloading works with modules\n\n* When you change `package.json`, it closes and reopens the window\n  with the new values, so you don't even have to restart\n  to change things like `window.frame`\n  (not working in latest nw.js)\n\n* When loaded in a browser (non-nw.js),\n  it only tries to do error handling\n\n\n## Install\n\n`npm i nw-dev --save-dev`\n\nPut this script before any other scripts\n(or at least ones you're developing):\n\n```html\n\u003cscript src=\"node_modules/nw-dev/lib/dev.js\"\u003e\u003c/script\u003e\n```\n\n\n## Exclude some files from being watched\n\nBy default `node_modules`, `npm-debug.log`, `.git`, `.hg`, and `.svn` are ignored.\n\nYou can ignore additional paths by adding a `data-ignore` attribute to the script:\n\n```html\n\u003cscript src=\"node_modules/nw-dev/lib/dev.js\" data-ignore=\"data.json|*.md\"\u003e\u003c/script\u003e\n```\n\nThe ignore pattern will be passed to [chokidar][] and interpreted by [micromatch][].\n\n\n## Usage with `win.show()`\n\nIf you use `win.show()` to show your app's window only once it finishes loading,\nit may also *focus* the window, depending on the platform.\n\nThis can be annoying if you want to keep editing after saving, as it will steal focus from your code editor — especially if you use autosave.\n\nTo avoid this behavior, you can guard against calling `win.show()` more than once like so:\n\n```js\nif(!win.shown){\n    win.show();\n    win.shown = true;\n}\n```\n\nNote that `win.shown` is a made-up property (using Javascript's [expando](https://developer.mozilla.org/en-US/docs/Glossary/Expando) feature), but it's attached to the NW.js window object rather than using a simple global variable, in order to persist across reloads.\n\n## Develop nw-dev\n\n* `npm i`\n\n* `npm link`, and `npm link nw-dev` from an nw.js project\n\n* `npm run prepublish` to recompile\n\n[nw.js]: https://github.com/nwjs/nw.js\n[chokidar]: https://github.com/paulmillr/chokidar\n[micromatch]: https://github.com/jonschlinkert/micromatch\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwutils%2Fnw-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwutils%2Fnw-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwutils%2Fnw-dev/lists"}