Giter Site home page Giter Site logo

frontend-build-tool's Introduction

Let's Build a Front End Builder

Yo Dwg, I heard you like generators

Step 1: Installation Requirements

"... cut a hole in a box ..."

  • ๐Ÿ’Ž Ruby Environment Manager
$ brew install rbenv ruby-build
  • ๐Ÿ’Ž Install Required Gems
bundle install
  • ๐Ÿบ Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • ๐Ÿ“ฃ Node
brew install node
  • โ˜• Gulp
npm install -g gulp    # Installed as a global CLI tool
  • ๐Ÿฆ Bower
npm install -g bower    # Installed as a global CLI tool

Step 2: Install all the things

"... put your junk in that box ..."

First, in order to save these dependencies w/o committing each node module, we need to create a package.json file that will house all of the information about the thing that we're building. We can use Node's built in initializing tool to handle all the basic information. We do this by executing npm init and answering the prompts.

$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sane defaults.

See "npm help json" for definitive documentation on these fields
and exactly what they do.

Use "npm install <pkg> --save" afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.

name: (Front End) frontend-build-tool
version: (1.0.0) 0.0.1
description: Does everything we want to automate for my frontend build process.
entry point: (index.js) gulpfile.js
test command:
git repository: https://github.com/ThatGuyCND/frontend-build-tool
keywords: gulp automation, frontend, sass
author: Erik Baldwin <[email protected]
license: (ISC) MIT

results in a package.json file in the root of our cwd:

{
  "name": "frontend-build-tool",
  "version": "0.0.1",
  "description": "Does everything we want to automate for my frontend build process.",
  "main": "gulpfile.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/ThatGuyCND/frontend-build-tool"
  },
  "keywords": [
    "gulp",
    "automation",
    "frontend",
    "sass"
  ],
  "author": "Erik Baldwin <[email protected]>",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/ThatGuyCND/frontend-build-tool/issues"
  },
  "homepage": "https://github.com/ThatGuyCND/frontend-build-tool"
}

Having the package file means that we don't have to include ./node_modules in our code repository, making it easier to share. When someone else wants to use this tool, the would simply checkout the repository and run npm install in the root; all specified package dependencies will be downloaded. The only thing we'll manually update for the time being is the test key - we don't want to fail our build just because we didn't specify a test. Change the following: "test": "echo \"Error: no test specified\" && exit 1" => "test": "echo \"Warning: no test specified\" && exit 0"

Local Node Modules:

  • Gulp because we need it locally too npm install --save-dev gulp
  • Bower we want it locally in case a user doesn't have it installed globally npm install --save bower

Other modules for things we want to do:

  • Compile our Sass files
  • Prefix our style properties, for those browsers that we dare not mention
  • Concat multiple files into one
  • Minify/Uglify our scripts

frontend-build-tool's People

Contributors

thatguycnd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.