{"id":14482810,"url":"https://github.com/scriptype/Makefile-for-the-Front-End","last_synced_at":"2025-08-30T03:32:15.237Z","repository":{"id":148624966,"uuid":"60920016","full_name":"scriptype/Makefile-for-the-Front-End","owner":"scriptype","description":"A decent Makefile for fast prototyping and a good development experience.","archived":false,"fork":false,"pushed_at":"2016-08-15T10:45:24.000Z","size":16,"stargazers_count":105,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-19T13:23:59.336Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scriptype.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-06-11T17:43:04.000Z","updated_at":"2024-12-30T15:16:18.000Z","dependencies_parsed_at":"2023-06-15T14:30:33.973Z","dependency_job_id":null,"html_url":"https://github.com/scriptype/Makefile-for-the-Front-End","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scriptype/Makefile-for-the-Front-End","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptype%2FMakefile-for-the-Front-End","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptype%2FMakefile-for-the-Front-End/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptype%2FMakefile-for-the-Front-End/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptype%2FMakefile-for-the-Front-End/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scriptype","download_url":"https://codeload.github.com/scriptype/Makefile-for-the-Front-End/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptype%2FMakefile-for-the-Front-End/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272800741,"owners_count":24995138,"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-08-30T02:00:09.474Z","response_time":77,"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":[],"created_at":"2024-09-03T00:01:18.470Z","updated_at":"2025-08-30T03:32:14.932Z","avatar_url":"https://github.com/scriptype.png","language":"Makefile","funding_links":[],"categories":["Makefile"],"sub_categories":[],"readme":"![Screenshot of Makefile](https://cdn.pbrd.co/images/1C4FPlj3.png)\n\n# Makefile for the Front End\n\nI've used this Makefile for a fast development environment for a side-project \nthat I no longer continue.\n\nYou can clone this repository to kickstart a frontend project. Required folder \nstructure is set up for Makefile to work.\n\n#### TL;DR\n\n - Use [static, non-preprocessed CSS](https://css-tricks.com/dont-use-css-preprocessors/) with [livereload](https://github.com/napcs/node-livereload) to give lightning-fast \n prototyping abilities.\n\n - Use [watchify](https://github.com/substack/watchify) + [babelify](https://github.com/babel/babelify) to compile JSX and enable ES2015. Also auto-refresh \n the browser.\n\n - Minify HTML ([html-minifier](https://github.com/kangax/html-minifier)), CSS ([cssnano](https://github.com/ben-eb/cssnano)), JS ([uglifyjs](https://github.com/mishoo/UglifyJS2)) for production.\n\n - Use PostCSS plugins ([import](https://github.com/postcss/postcss-import), [autoprefixer](https://github.com/postcss/autoprefixer)) for production CSS.\n\n\n## Why Make?\n\nI'm using Make to manage ops-side of my front-end projects because it's simple.\nIn Gulp, Grunt or Webpack or any other tool, you have to comprehend the complexity\nof programmatic usage and learn how some 3rd party abstractions work.\n\nWhen, instead, Make is used for the same tasks, it's much easier for anyone to\ncontribute, fix or make any kind of change on the build script (at least for me). \nIt's not asynchronous, it doesn't give you abstractions to \"make your job easier\". \nIt's flat. You read a Makefile in sequential order, with no indirection.\n\n## Setup\n\nYou need `Node` and `npm` installed on your machine which is capable of running \nMakefiles (i.e: not Windows as far as I know).\n\n```\n# Clone the repository\ngit clone git@github.com:scriptype/Makefile-for-the-Front-End.git\n\n# Go to project directory\ncd Makefile-for-the-Front-End\n\n# Install dependencies\nnpm i\n```\n\nBesides modules used in Makefile, `react` and `react-dom` for JS and \n`express` for dev-server will also be installed. They are not mandatory.\n\n## Run\n\n#### Development\n\n```sh\nmake\n```\n\nWhen finished, head over to `localhost:8080`\n\n#### Production\n\n```sh\nmake release\n```\n\nWhen finished, head over to `localhost:8080`\n\n## Notes\n\n  - It's far from being perfect (and it's not intended to be).\n\n  - `Express` dependency is for `server.js`. You can remove it and handle \n  dev-server however you like.\n\n  - Handlebars is used in `index.html` to dynamically manipulate the path of JS \n  and CSS files according to environment. It also calls livereload script in dev mode.\n\n  - No CSS pre-processor was used. CSS files are completely static and source files \n  are directly used in dev mode. You get an experience similar to prototyping in \n  browser thanks to livereload.\n\n  - When releasing the project:\n\n    - CSS will be autoprefixed and `@imports` will be concatenated into a single file.\n\n    - JS modules will be babelified with `react` and `es2015` presets.\n\n    - HTML, JS and CSS outputs will be minified.\n\n## Contribution\n\nPlease don't hesitate to open issues and making pull requests. When doing that, \nconsider that this boilerplate is aimed to have minimum complexity. e.g: Implementing \nredux is out of scope in this project.\n\n## Licence\n```\nMIT License\n\nCopyright (c) 2016 Mustafa Enes Ertarhanacı\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptype%2FMakefile-for-the-Front-End","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscriptype%2FMakefile-for-the-Front-End","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptype%2FMakefile-for-the-Front-End/lists"}