{"id":22729793,"url":"https://github.com/gc-victor/d-d","last_synced_at":"2025-06-13T04:36:39.805Z","repository":{"id":147530089,"uuid":"351115783","full_name":"gc-victor/d-d","owner":"gc-victor","description":"A tiny development static server with hot reload","archived":false,"fork":false,"pushed_at":"2023-10-06T14:11:52.000Z","size":16,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T01:13:49.251Z","etag":null,"topics":["development","hot-reload","local","static-server"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/gc-victor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-03-24T14:44:43.000Z","updated_at":"2022-08-22T13:12:20.000Z","dependencies_parsed_at":"2023-07-14T01:00:25.331Z","dependency_job_id":null,"html_url":"https://github.com/gc-victor/d-d","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gc-victor/d-d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gc-victor%2Fd-d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gc-victor%2Fd-d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gc-victor%2Fd-d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gc-victor%2Fd-d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gc-victor","download_url":"https://codeload.github.com/gc-victor/d-d/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gc-victor%2Fd-d/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259582498,"owners_count":22880027,"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":["development","hot-reload","local","static-server"],"created_at":"2024-12-10T18:11:48.609Z","updated_at":"2025-06-13T04:36:39.475Z","avatar_url":"https://github.com/gc-victor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# d-d\n\nA tiny development static server with hot reload.\n\n## Invoke\n\n```console\nnpx github:gc-victor/d-d\n```\n\n## Install\n\nYou can use npm or yarn to install it.\n\n```console\nnpm install git+https://github.com/gc-victor/d-d.git#master\n```\n\n## Config\n\nYou have to create a d-d.config.js file.\n\n- **dist**: the place where your build files are, by **default '/dist'** \n- **src**: the place where your source code files are and where the watcher will listen for changes, by **default '/src'**\n- **port**: the port of the static server, by **default 1234**\n- **socketPort**: the web socket port, by **default 1235**\n- **onChangeClient**: the method where you do your magic in the **Client**, by **default reloads the client**, you will receive the pathname to the file changed\n- **onChangeServer**: the method where you do your magic in the **Server**, without a default value, you will receive the pathname to the file changed\n\n### Example\n\n```javascript\n// d-d.config.js\nimport { execSync } from 'child_process';\n\nexport default {\n    dist: '/dist',\n    src: ['./src'],\n    port: 1234,\n    socketPort: 1235,\n    onChangeClient: (pathname) =\u003e window.location.reload(),\n    onChangeServer: (pathname) =\u003e {\n        execSync('cp src/index.js dist/index.js', { stdio: 'inherit' });\n    }\n}\n```\n\n## Compatible Versioning\n\n### Summary\n\nGiven a version number MAJOR.MINOR, increment the:\n\n- MAJOR version when you make backwards-incompatible updates of any kind\n- MINOR version when you make 100% backwards-compatible updates\n\nAdditional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR format.\n\n[![ComVer](https://img.shields.io/badge/ComVer-compliant-brightgreen.svg)](https://github.com/staltz/comver)\n\n## Contribute\n\nFirst off, thanks for taking the time to contribute!\nNow, take a moment to be sure your contributions make sense to everyone else.\n\n### Reporting Issues\n\nFound a problem? Want a new feature? First of all, see if your issue or idea has [already been reported](../../issues).\nIf it hasn't, just open a [new clear and descriptive issue](../../issues/new).\n\n### Commit message conventions\n\nA specification for adding human and machine readable meaning to commit messages.\n\n- [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)\n\n### Submitting pull requests\n\nPull requests are the greatest contributions, so be sure they are focused in scope and do avoid unrelated commits.\n\n-   Fork it!\n-   Clone your fork: `git clone http://github.com/\u003cyour-username\u003e/d-d`\n-   Navigate to the newly cloned directory: `cd d-d`\n-   Create a new branch for the new feature: `git checkout -b my-new-feature`\n-   Install the tools necessary for development: `npm install`\n-   Make your changes.\n-   `npm run build` to verify your change doesn't increase output size.\n-   `npm test` to make sure your change doesn't break anything.\n-   Commit your changes: `git commit -am 'Add some feature'`\n-   Push to the branch: `git push origin my-new-feature`\n-   Submit a pull request with full remarks documenting your changes.\n\n## License\n\n[MIT License](https://github.com/gc-victor/d-d/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgc-victor%2Fd-d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgc-victor%2Fd-d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgc-victor%2Fd-d/lists"}