Code Monkey home page Code Monkey logo

materialize's Introduction

Front-end Dev

My front-end stack that changes day to day :)

Here is a demo of the installation and a rundown of features. https://www.youtube.com/watch?v=nNmILmypXyU

Installation

Install the necessary package managers

$ npm install -g bower

$ npm install -g gulp

$ npm install -g gulp-hologram

$ gem install bundler

Clone the repo

$ git clone [email protected]:heyMP/frontend-dev.git

$ cd frontend-dev

Install the dependencies

$ npm install

$ bower install

$ bundle install

Segmentation Fault

If you receive any Drush errors that contain Segmentation fault run npm install, WITHOUT sudo. There are occasions where the npm cleanup script doesn't run when using sudo.

Run Gulp Server

$ gulp server

If you are using this stack on a server rendered website then run gulp without its built in server:

$ gulp

Bower Dependencies

Bower makes it extremely easy to add new third-party libraries to your project. Front-end dev makes that process even easier by automatically pulling those javascript and css files from bower into your project via gulp.

Example: Adding Bootstrap through Bower

The first step is to run:

$ bower install bootstrap --save

Notice the --save flag. Not only does this add Bootstrap to the list of your project dependencies, it also lets Front-end Dev know to automatically pull any javascript or css resources into our existing project.

Now run:

$ gulp build

This will allow gulp to parse through the list of bower dependencies and create third-party.js and third-party.css files.

Overriding Bower Imports

Sometimes there will be lots of javascript and css files that will be packaged with a library. You'll want to use Bower's 'override' option specify which files you want to be pulled into your project.

Edit the 'bower.json' file. You will see an option in the json array for 'overrides'. here is where you have a few options.

Specify a file

  "overrides": {
    "bootstrap": {
      "main": js/tooltip.js"
    }
  }

Specify multiple files

  "overrides": {
    "bootstrap": {
      "main": ["js/tooltip.js", "js/modal.js"]
    }
  }

Ignore library all together

  "overrides": {
    "bootstrap": {
      "ignore": "true"
    }
  }

To see all of the available options, visit the main-bower-files website.

materialize's People

Contributors

heymp avatar

Watchers

James Cloos avatar  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.