Code Monkey home page Code Monkey logo

adm-dev-kit's Introduction

ADM DEV KIT 2.0 coming soon!!!

ADM DEV KIT

ADM DEV KIT (Gulp) - component driven static website starter kit. Starting tool for component driven development using [Jade](https://github.com/jadejs/jade) + [PostHTML](https://github.com/posthtml/posthtml)-[BEM](https://github.com/rajdee/posthtml-bem) and [PostCSS](https://github.com/postcss/postcss).

Problem.

While developing static website all HTML, JS and CSS dependencies are stored in different places and included into different files.
So for example if You would like to delete some html fragment, You will have to delete it's JS and CSS somewhere else which can take some time until you find it and understand which part of JS or CSS exactly belongs to that html fragment. Sometimes we or our colleagues after deleting some html fragment forget to delete it's JS or CSS, so we have some not used JS and CSS which only generates file size sometimes make cause some errors.

Solution.

As a solution to that i would like to offer component driven development for static websites.
Component driven development can make our dependencies handling much easier. You can keep all component's related JS and CSS dependencies in one place.

What is inside?

  • Gulp as task runner (already includes tasks for minifying JS and CSS);
  • Express for serving static files;
  • Browser-Sync for sync browsing and browser refreshing;
  • Jade as template language;
  • PostHTML-BEM for BEM naming structure;
  • PostCSS as main pre/postprocessor for CSS;
  • MY IP UI Custom built Qr-Code UI for easy opening on mobile devices.
  • Basic css style for default html tags;

Usage

Clone/fork or just download repository and install all node dependencies:

$ npm i

Edit host name, port for Your own in package.json. Than run:

$ npm start

Open in Your browser:

http://localhost:3000

Showcase

Example of dev file structure:

webroot
	|- _common (contains common/global CSS and JS)
		|- common (CSS files for reseting style of default HTML tags)
		   common-index.css (CSS file that contains only those common css styles that are only important/related for index.jade file)
		|- header
			|- img
			   header.jade
			   header.js
			   header.css
		|- footer
			|- img
			   footer.jade
			   footer.js
			   footer.css
	|- _layouts (layouts for JADE templating)
		main.jade (main template file)
	|- index (contains all components used in index.jade file)
		|- slider
			|- img (images folder)
			   slider.jade
			   slider.js
			   slider.css
		|- news-box
			|- img (images folder)
			   news-box.jade
			   news-box.js
			   news-box.css
	index.jade
	variables.yml (CSS variables)

Example of markup:

main.jade - lauout file

doctype html
html
	head
		meta(charset='UTF-8')
		meta(name='viewport', content='width=device-width, initial-scale=1')
		block title
			title Main Layout
		//- CSS will be included here
		css
	body
		block content
		//- JS will be included here
		js

index.jade

extends ./_layouts/main.jade

block title
	title ADM DEV KIT

block content
	link(href='_common/common-index.css')
	include index/slider/slider.jade

index/slider/slider.jade

link(href='index/slider/slider.css')
script(src='index/slider/slider.js')
div(block='slider')
	div(elem='item')
		img(src='img/slide-img-1.jpg')
	div(elem='item')
		img(src='img/slide-img-2.jpg')
	div(elem='item')
		img(src='img/slide-img-3.jpg')

Example of dest file structure:

dest
	|- assets
		|- css
		   index.css
		|- js
		   index.js
		|- img
		   slide-img-1.jpg
		   slide-img-2.jpg
		   slide-img-3.jpg
	index.html

adm-dev-kit's People

Contributors

voischev 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.