A very basic starter template with fundamental HTML5 markup -- only the basics.
Based on HTML5 Bones | http://html5bones.com
var path = require('path'); | |
var fs = require('fs'); | |
// Be careful of adding in console.log statements as these can | |
// influence the outcome of the script on Windows and cause it to pass. | |
process.on('uncaughtException', function(error) { | |
console.log('error: ' + error); | |
}); |
// node server instead of xampp ; | |
var http = require('http'); | |
var fs = require('fs'); | |
http.createServer(function (request, response) { | |
var filePath = '.' + request.url; | |
console.log(request.url); | |
fs.readFile(filePath, function(error, content) { | |
response.writeHead(200); |
{ | |
"name": "<project>", | |
"private": true, | |
"scripts": { | |
"css": "postcss --use postcss-import --use postcss-modular-scale-plus --use postcss-custom-properties --use postcss-custom-media --use css-mqpacker --css-mqpacker.sort --use postcss-calc --use autoprefixer --autoprefixer.browsers 'last 2 versions' --use cssnano --cssnano.safe", | |
"build:css": "npm run css -- --output assets/css/full.min.css assets/css/src/index.css", | |
"watch:css": "npm run css -- --watch --output assets/css/full.min.css assets/css/src/index.css", | |
"js": "uglifyjs --no-mangle --quotes=1", | |
"build:js": "npm run js -- --compress drop_console=true --output assets/js/full.min.js assets/js/src/lib/*.js assets/js/src/*.js", | |
"watch:js": "watch 'npm run js -- --compress --output assets/js/full.min.js assets/js/src/lib/*.js assets/js/src/*.js' assets/js/src", |
const cssnext = require("cssnext"); | |
const fs = require("fs"); | |
const watch = require("node-watch"); | |
const program = require("commander"); | |
program | |
.version("0.0.1") | |
.option("-s, --source [path]", "Source file") | |
.option("-d, --destination [path]", "Destination file") | |
.option("-w, --watch [path]", "Watch directory") |
/* ******************************************************************************************* | |
* THE UPDATED VERSION IS AVAILABLE AT | |
* https://github.com/LeCoupa/awesome-cheatsheets | |
* ******************************************************************************************* */ | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
var gulp = require('gulp'); | |
var clean = require('gulp-clean'); | |
var jshint = require('gulp-jshint'); | |
var concat = require('gulp-concat'); | |
var uglify = require('gulp-uglify'); | |
var imagemin = require('gulp-imagemin'); | |
var bases = { | |
app: 'app/', |
var http = require("http"); | |
var url = require("url"); | |
var fs = require("fs"); | |
var port = process.argv[2] || 8080; | |
var contentTypes = { | |
'ico': 'image/x-icon', | |
'html': 'text/html', | |
'js': 'application/javascript', | |
'json': 'application/json', |
#!/bin/bash | |
# | |
# Provision for Vagrant box ArchLinux | |
# | |
# Insert to Vagrantfile: | |
# config.vm.provision "shell", path: "https://gist.github.com/smaknsk/8165875/raw" | |
# | |
# | |
# Run nginx, httpd, php-fpm as user: |
// Variables dc (http://nodejs.org/api/) | |
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs"), | |
port = process.argv[2] || 1337, // Array ex -> http://nodejs.org/docs/latest/api/process.html#process_process_argv | |
mimeTypes = { | |
// Basic mimes | |
'asc' : 'text/plain', |
A very basic starter template with fundamental HTML5 markup -- only the basics.
Based on HTML5 Bones | http://html5bones.com