• This repository has been archived on 01/Oct/2020
  • Stars
    star
    5
  • Rank 2,853,722 (Top 57 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 10 years ago
  • Updated about 7 years ago

Reviews

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

Repository Details

A NodeJS App that creates static HTML mockups using Grunt

mockups-creator v2

A NodeJS App that creates static HTML mockups using Grunt

Introduction

This was built because of my needs to always kickstart a mockup in the fastest way as possible. So, this will bring a very flexible but powerful mockup generator based on various technologies.

What is this?

This is a yeoman-like project. It will help you to kickstar mockups in no-time.

Why do you think this is so special

Because I want to create a platform for independent mockups that doesn't really belongs to some CMS or other technology. This is also different from the simple "static site generator" that you can find elsewhere.

I love to be flexible and indipendent from the platforms. That's why I built this tool.

What does the mockup start template have?

Backend

  • Customizable Gruntfile.js.
  • Swig Templates ( just like Twig, but for Javascript )
  • Template custom data customizable via JSON file ( see app.json file )
  • Web Fonts generator ( just place your TTF or OTF fonts in the fonts folder )
  • Web Icons generator based on SVG files ( just place them in the icons folder )
  • SCSS ( with map files support so you can see from your inspector directly the SCSS file reference )
  • Autoprefixing for CSS rules ( this give's you the freedom to not use anymore -webkit-, -moz-, etc. )
  • YUI compressor for CSS
  • Google Closure Compiler for Javascript
  • Auto-rebuild + Live Reload when editing swig, scss or js files
  • Static file server. No more depending on Apache, Nginx, etc.
  • Auto-update, of NPM packages, once a day on build

Frontend

  • jQuery 3.x
  • Bootstrap 4.x ( using NPM to keep it aligned with latest updates )
  • Fontawesome 4.x ( using NPM to keep it aligned with latest updates )
  • Ion Icons 3.x ( using NPM to keep it aligned with latest updates )
  • Modernizr + Detectizr
  • bootstrap-toolkit media-queries for Javascript
  • Default template ( ready for IE10+, Chrome, Firefox, Safari, iOS, Android, etc. ) using the most awesome techniques out there to simplify the work for you :)

Deploy

Output

  • TYPO3 extension output with Grunt script for building again all the "opened" files like SCSS, JS, Fonts and Icons

Requirements

To run this you need these binaries to be available in your system

  1. fontforge ( required by grunt-fontgen and grunt-webfont )
  2. ttf2eot ( required by grunt-fontgen )
  3. batik-ttf2svg ( on OSX ) or ttf2svg ( on Linux ) ( required by grunt-fontgen )

To test if they're working just type these names in your terminal and if they're working you're good to go. Otherwise you should look at your OS documentation on how to get these binaries working.

How to use

  1. Run npm install.
  2. Run grunt make --app=project_name.
  3. Wait for the cool stuff to be done
  4. Work inside the app/project_name/ folder that will be created.
  5. Configure your app/project_name/app.json with the desired values.
  6. Run one of the commands down below.

  • Normally when you start a project you should use

    grunt make --app=project_name
    
  • While you're developing your mockup, run this task to build the project and watch for changes (usually you run this only once)

    grunt build --app=project_name
    
  • If you want to build in Development mode your mockup but you don't want to watch it for changes

    grunt rebuild --app=project_name
    
  • When you're finished and you're ready to deploy, but want to test it first

    grunt build_deploy --app=project_name
    
  • When you're sure that everything is ok and want to deploy it using rsync

    grunt deploy --app=project_name
    
  • When you want to output your project as a TYPO3 extension

    grunt typo3 --app=project_name
    

Arguments Reference

  • --app is the option that says which app to run based on your chosen task.
  • --customtask is for custom tasks developed inside your app that doesn't belong to the core mockups-creator tasks.

Directories reference

  • _apptpl folder is used as a starter template when you run grunt make --app=project_name task. Everything from this folder will be copied 1:1 to the project_name folder that you got from the grunt make task.
  • fonts folder is used when you want to autogenerate webfonts based on ttf or otf desktop fonts. When you'll place some files here you'll get all known webfonts formats + a CSS file that will be minified with your SCSS file that exists in tpl folder. This will give a big speed boost to work with custom fonts without needing to create the CSS manually or with external tools.
  • icons folder is used to autogenerate icons for your website based on SVG files. Just put them there and you'll get all the job done automatically. You can simply use them as 'project_name-icon-svgfilename' classes.
  • rsc folder is used for resources like images, and other things. All the items inside this folder will be copied to the root of your output.path configuration or typo3.path configuration.
  • tpl folder is used for templating your app. Here will live the SCSS, the Swig template files and the Javascript code. Everything inside this folder will be compacted, minified, autoprefixed, etc. by Grunt Tasks.
  • _typo3 is used to copy 1:1 to the packaged typo3 extension that will be built using the relative task.

app.json reference

{
	"config" : {
		"output" : {
			// The output path of your project
			"path" : "_release"
		},
		"livereload" : {
			// The livereload port
			"port" : 35729,
			// The livereload host
			"host" : "localhost"
		},
		"server" : {
			// The static server port. -1 means disabled.
			"port" : -1
		},
		"deploy" : {
			// The rsync path on the remote server
			"path" : "/var/www",
			// The rsync host of the remote server
			"host" : "localhost"
		},
		"typo3" : {
			// Typo3 main folder where your extension is going to be saved.
			// Inside this folder will be created based on your project_name and suffix property below.
			"path" : "_typo3ext",
			// Suffix to be appended to the project name when creating the folder
			"suffix" : "_core"
		}
	},
	// This will be the assets configuration
	"assets" : {
    // Tells to copy all the found fonts in these paths, in our {output.path}/fonts/ folder
    "fonts" : [
      "..."
    ],
		// Tells to build/deploy tasks, the resources and their order to be compiled to a singular JS file
		"js" : [
			"bower_components/...",
			"...",
			"tpl/js/*.js"
		]
	},
	// Custom template data
	"data" : {
		"foo" : "bar"
	}
}

Basically the config.json is the same as app.json and will override its settings.

Moving from v1 to v2

  • cd app/project_name ( project_name is your mockup project )
  • mv config.json app.json and adapt your settings to the new format ( see app.json )
  • mv icons.css tpl/icons.css
  • Copy bower.json, Gruntfile.js and package.json to app/project_name
  • Fix the name property inside package.json using your project_name
  • npm install
  • bower install

More Repositories

1

FFNx

Next generation modding platform for Final Fantasy VII and Final Fantasy VIII ( with native Steam 2013 release support! )
C++
340
star
2

LineageOTA

A simple OTA REST Server for LineageOS OTA Updater System Application
PHP
215
star
3

iPoPS

Convert your PSX Discs and ISOs into the PBP format, and play them on your PSP
C
60
star
4

gitbook-plugin-summary

Gitbook plugin to auto-generate SUMMARY.md
JavaScript
52
star
5

docker-powerdns

PowerDNS + Recursor + Admin GUI + Adblock in one single Docker
Shell
52
star
6

vps-powered-by-docker

Arch Linux setup script to obtain a full VPS with Automatic Reverse Proxy (and more) without pain
Shell
27
star
7

docker-woocommerce

PHP Docker for Woocommerce on Steroids
Dockerfile
22
star
8

docker-lineage-cicd

Docker microservice for LineageOS Continuous Integration and Continous Deployment
Dockerfile
17
star
9

PostEvent

A Cross-Domain Event Handler javascript library. Pure Vanilla JS, no dependencies.
HTML
15
star
10

sublime-projecttreetemplater

A simple templater for your project: manage the tree with a simple script!
Python
15
star
11

LineageOTAUnitTest

A LineageOS OTA Unit Test made for NodeJS
JavaScript
10
star
12

jvectormap-italy-provinces

A plugin for jVectorMap which includes an Italy Map with Provinces Areas
10
star
13

TwigPress

A boilerplate Twig Engine Theme for Wordpress
PHP
9
star
14

chrome-link-revealer

Simply reveal links when you hover your mouse over anchors
JavaScript
9
star
15

chrome-deezer-mediakeys-reloaded

Add multimedia keys support to Deezer
JavaScript
9
star
16

spotify-playlist-extractor

Bring back the freedom of choice to users. Let them export their playlist from Spotify, whenever they want :)
JavaScript
9
star
17

SteamworksSDKCI

CI builds of Steamworks SDK for CMake build systems
C++
9
star
18

docker-awesome-wordpress

A Docker that combines all the most awesome needed things for a powerful Wordpress installation
Dockerfile
8
star
19

gulp-usemin-reloaded

A better usemin
JavaScript
6
star
20

chrome-spotify-mediakeys-reloaded

Add multimedia keys support to Spotify
JavaScript
6
star
21

Palmer

FF7 Field Background Editor
C++
5
star
22

jquery-itunestoresearch

A simple wrap to official iTunes Store Search API with jQuery
JavaScript
4
star
23

chrome-grooveshark-mediakeys-reloaded

Add multimedia keys support to Grooveshark
JavaScript
4
star
24

Moomba

Final Fantasy VIII CAM editor
C#
4
star
25

docker-gplayweb

GPlayWeb + FDroid Server + Caddy Server on one single Docker
Shell
4
star
26

typdom3

DOMPDF wrapper for TYPO3
PHP
4
star
27

tomahawk-daapjs

A DAAP resolver for Tomahawk made in Javascript
JavaScript
3
star
28

twypo

Twig for TYPO3
PHP
3
star
29

CaitSith

Final Fantasy VII CAM editor
C#
3
star
30

docker-pagekit

PHP Docker for Pagekit
2
star
31

JPM

A simple Json Package Manager
C#
2
star
32

jquery-youtubelivefeed

A simple jQuery plugin that will let you to embed live feeds or latest one made
JavaScript
2
star
33

ota.julianxhokaxhiu.com

Fully Automated Serverless OTA Service for LineageOS, using Github, Basketbuild, Cloudflare and Travis
JavaScript
2
star
34

PuPuSharp

FF8 Field Importer/Exporter - C# version of the original PuPu Project
C#
2
star
35

amazon-bot

JavaScript
2
star
36

FF78Launcher

An alternative launcher for FF7/FF8 Steam editions
CMake
2
star
37

bgfxCI

CI builds of bgfx for x86 platform
PowerShell
2
star
38

chrome-soundcloud-mediakeys-reloaded

Enable the use of MediaKeys for Soundcloud
JavaScript
2
star
39

polysticky.js

A position sticky polyfill that doesn't suck.
JavaScript
2
star
40

dotfiles

Collection of dotfiles improved overtime, based on Arch Linux
Shell
2
star
41

gulp-closurecompiler

The ClosureCompiler.js Gulp Task
JavaScript
2
star
42

FF7SND

Final Fantasy VII Audio Extraction app ( originally made by Qhimm.com )
C#
2
star
43

jquery-tagbox

A simple Facebook (or Google+) TagBox like using jQueryUI
JavaScript
1
star
44

MMNx

Next generation Mod Manager
CMake
1
star
45

ff8_mch

Final Fantasy VIII MCH Import/Export plugin for Blender
Python
1
star
46

docker-twrp-cicd

Docker microservice for TWRP Continuous Integration and Continous Deployment
Shell
1
star
47

DeliriNotturni-Live-Page

Live page of DeliriNotturni.org
JavaScript
1
star
48

rpi-powered-by-docker

Arch Linux ARM setup script to obtain a full RPI with Automatic Reverse Proxy (and more) without pain
Shell
1
star
49

ffmpegCI

CI builds of FFMpeg for x86 platform
PowerShell
1
star
50

chrome-youtube-mediakeys-reloaded

Enable the use of MediaKeys for Youtube
JavaScript
1
star
51

blog.julianxhokaxhiu.com

Julian Xhokaxhiu's Blog
HTML
1
star
52

vpngate-ovpn-exporter

Export all VPNGate OpenVPN configurations to files inside country-code relative folders
Python
1
star
53

AUR

My Arch Linux AUR Packages
Shell
1
star
54

LLGLCI

CI builds of LLGL for x86 platform
CMake
1
star
55

docker-iperf3

iPerf3 Server Container
Dockerfile
1
star
56

docker-nginx-reloaded

Reverse Proxy Docker container with Nginx, acme.sh, DNS and Autodiscovery ( alternative to jwilder/nginx-proxy )
Twig
1
star