• Stars
    star
    106
  • Rank 325,871 (Top 7 %)
  • Language Makefile
  • Created over 8 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A decent Makefile for fast prototyping and a good development experience.

Screenshot of Makefile

Makefile for the Front End

I've used this Makefile for a fast development environment for a side-project that I no longer continue.

You can clone this repository to kickstart a frontend project. Required folder structure is set up for Makefile to work.

TL;DR

Why Make?

I'm using Make to manage ops-side of my front-end projects because it's simple. In Gulp, Grunt or Webpack or any other tool, you have to comprehend the complexity of programmatic usage and learn how some 3rd party abstractions work.

When, instead, Make is used for the same tasks, it's much easier for anyone to contribute, fix or make any kind of change on the build script (at least for me). It's not asynchronous, it doesn't give you abstractions to "make your job easier". It's flat. You read a Makefile in sequential order, with no indirection.

Setup

You need Node and npm installed on your machine which is capable of running Makefiles (i.e: not Windows as far as I know).

# Clone the repository
git clone [email protected]:scriptype/Makefile-for-the-Front-End.git

# Go to project directory
cd Makefile-for-the-Front-End

# Install dependencies
npm i

Besides modules used in Makefile, react and react-dom for JS and express for dev-server will also be installed. They are not mandatory.

Run

Development

make

When finished, head over to localhost:8080

Production

make release

When finished, head over to localhost:8080

Notes

  • It's far from being perfect (and it's not intended to be).

  • Express dependency is for server.js. You can remove it and handle dev-server however you like.

  • Handlebars is used in index.html to dynamically manipulate the path of JS and CSS files according to environment. It also calls livereload script in dev mode.

  • No CSS pre-processor was used. CSS files are completely static and source files are directly used in dev mode. You get an experience similar to prototyping in browser thanks to livereload.

  • When releasing the project:

    • CSS will be autoprefixed and @imports will be concatenated into a single file.

    • JS modules will be babelified with react and es2015 presets.

    • HTML, JS and CSS outputs will be minified.

Contribution

Please don't hesitate to open issues and making pull requests. When doing that, consider that this boilerplate is aimed to have minimum complexity. e.g: Implementing redux is out of scope in this project.

Licence

MIT License

Copyright (c) 2016 Mustafa Enes Ertarhanacı

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

More Repositories

1

sorted-colors

A tool to sort the named CSS colors in a way that it shows related colors together
JavaScript
583
star
2

salinger

Ecosystem-free task runner that goes well with npm scripts.
JavaScript
69
star
3

feed

My collection of links to blog posts, talks and opinions on art, design and technology. You can set it up for your own use 🌱
JavaScript
22
star
4

kicss

CSS first real-time interactions
JavaScript
12
star
5

USCSS

United States of CSS Elements
JavaScript
11
star
6

writ-cms

The timeless SSG + CMS
JavaScript
6
star
7

brandify

Extract colors from brand logos then filter and sort brands with their colors.
JavaScript
5
star
8

nisanyanmap

NisanyanMap — Etymological dictionary of places in Anatolia
JavaScript
4
star
9

salinger-basic-boilerplate

Ready to use Salinger boilerplate with basic features
JavaScript
4
star
10

bem

A small utility for creating dynamic BEM classnames.
JavaScript
4
star
11

react-opening-hours

Opening hours component of a restaurant – implemented with react
JavaScript
4
star
12

vimrc

My vim setup
Vim Script
3
star
13

nodebb-plugin-recent-cards-timuu

CSS
2
star
14

non-fancy-homepage

Development files of tumblr/x0r's theme
HTML
2
star
15

scriptype.github.io

Personal landing page.
HTML
2
star
16

graphql-presentation-node-graphql

GraphQL Layer of GraphQL Presentation App
TypeScript
1
star
17

karicca.me

Portfolio website that uses Tumblr as a CMS (in quite a hacky way)
JavaScript
1
star
18

-

-
JavaScript
1
star
19

appointment-scheduler

Helps you keep track of your HR meetings and job applications
JavaScript
1
star
20

avatar-generator

Avatar Generator
JavaScript
1
star
21

ad-generator

Ad generator
JavaScript
1
star
22

enes-in-old

Old version of my blog
HTML
1
star
23

todo-vanilla

Todo app implemented with vanilla html, js and css
JavaScript
1
star
24

rautatieasema

rautatieasema.com
HTML
1
star
25

fermentemutfagim-static

HTML
1
star
26

scriptype

1
star
27

A

A
1
star
28

sanity-eleventy-blog

Blog with Eleventy
JavaScript
1
star
29

chunk-generation

Minecraft-style chunk generator imitation.
JavaScript
1
star