{"id":24289304,"url":"https://github.com/rla/frontend-js-build","last_synced_at":"2025-07-27T10:17:07.409Z","repository":{"id":18250241,"uuid":"21404049","full_name":"rla/frontend-js-build","owner":"rla","description":"Makefile-based build workflow for front-end JavaScript","archived":false,"fork":false,"pushed_at":"2015-03-12T23:26:31.000Z","size":176,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-06T01:25:18.033Z","etag":null,"topics":["browserify","javascript-bundle","workflow"],"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/rla.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}},"created_at":"2014-07-01T22:20:39.000Z","updated_at":"2019-08-13T15:45:06.000Z","dependencies_parsed_at":"2022-09-14T01:33:04.380Z","dependency_job_id":null,"html_url":"https://github.com/rla/frontend-js-build","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rla/frontend-js-build","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rla%2Ffrontend-js-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rla%2Ffrontend-js-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rla%2Ffrontend-js-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rla%2Ffrontend-js-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rla","download_url":"https://codeload.github.com/rla/frontend-js-build/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rla%2Ffrontend-js-build/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267342500,"owners_count":24071921,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["browserify","javascript-bundle","workflow"],"created_at":"2025-01-16T10:51:50.776Z","updated_at":"2025-07-27T10:17:07.381Z","avatar_url":"https://github.com/rla.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# frontend-js-build\n\nFrontend JavaScript workflow with toolset:\n\n * watch\n * make\n * browserify\n * uglifyify\n * brfs\n * exorcist\n\nSupported features:\n\n * CommonJS-based JavaScript modules.\n * Single bundled and minified JavaScript file.\n * Same bundle for development and production.\n * Source Maps.\n * Project-local toolset.\n\n## Project structure\n\n * `Makefile` - build rules, not very abstract but give the idea how tools work.\n * `package.json` - contains local NPM dependencies.\n * `public/js/app/app.js` - the entrypoint JavaScript file.\n * `public/js/bundle.js` - the JavaScript bundle.\n * `public/js/bundle.js.map` - Source Map file for the JavaScript bundle. Loaded by the browser\n   when the debugger is open.\n * `public/misc` - directory containing miscellaneous files included in the bundle.\n\n## Tools\n\nThe following tools are used:\n\n * [make](http://en.wikipedia.org/wiki/Make_%28software%29) - the build tool.\n * [watch](http://en.wikipedia.org/wiki/Watch_%28Unix%29) - triggers periodic builds.\n * [browserify](http://browserify.org/) - converts CommonJS-based JavaScript modules into a bundle file.\n * [uglifyify](https://github.com/hughsk/uglifyify) - Browserify plugin that minifies the bundle code.\n * [brfs](https://github.com/substack/brfs) - Browserify plugin that embeds non-JS files into bundles.\n * [exorcist](https://github.com/thlorenz/exorcist) - extracts the source map and places it into a separate file.\n\nInstalling tools (assumes that make and watch are already installed):\n\n    npm install\n\n## Build targets\n\n * all - builds bundle.\n * clean - removes bundle.\n\nBuilding periodically (2s):\n\n    watch make\n\n## Build dependencies\n\nDue to Makefile specifics, dependencies have to updated manually when\ncreating new directories under `public/js`.\n\nCurrent dependencies:\n\n    $(BUNDLE): public/js/app/app.js public/js/app/*.js\n\nAdding a directory `something` under `app` requires the following change:\n\n    $(BUNDLE): public/js/app/app.js public/js/app/*.js public/js/app/something/*.js\n\nThis is because `make` cannot handle recursive file patterns. The main entry\npoint `public/js/app/app.js` must come as the first dependency.\n\n## Notes\n\nThe Makefile contains `.DELETE_ON_ERROR:` which causes it to remove the target file\nwhen build fails. This is a workaround to \u003chttps://github.com/substack/node-browserify/issues/899\u003e.\n\n## What is not included\n\n * Testing. Many approaches and tools to choose from.\n * Linting. JSLint vs JSHint vs ESLint.\n * ES6. Could be added with the [babelify](https://github.com/babel/babelify) Browserify transform.\n * CSS. Many tools to choose from (Less, Sass, SCSS, Stylus, ...).\n\n## Alternative choices\n\n * uglifyify+exorcist can be replaced with the [minifyify](https://github.com/ben-ng/minifyify) transform.\n * [webpack](https://github.com/webpack/webpack) provides integrated solution for all of this.\n\n## License\n\nThe MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frla%2Ffrontend-js-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frla%2Ffrontend-js-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frla%2Ffrontend-js-build/lists"}