Commit 49f3124b authored by Terion's avatar Terion
Browse files

first comit

parents
{
"directory": "build/vendor"
}
\ No newline at end of file
---
BUNDLE_PATH: "."
BUNDLE_DISABLE_SHARED_GEMS: '1'
.idea
build
node_modules
.sass-cache
ruby
\ No newline at end of file
source "https://rubygems.org"
gem 'sass', "~> 3.4"
gem 'compass', "~> 1"
gem 'bootstrap-sass', '~> 3.3.5'
gem 'sass-globbing', '~>1'
gem 'compass-normalize', '~>1.5'
\ No newline at end of file
GEM
remote: https://rubygems.org/
specs:
autoprefixer-rails (5.2.1.2)
execjs
json
bootstrap-sass (3.3.5.1)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.3.0)
chunky_png (1.3.4)
compass (1.0.3)
chunky_png (~> 1.2)
compass-core (~> 1.0.2)
compass-import-once (~> 1.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
sass (>= 3.3.13, < 3.5)
compass-core (1.0.3)
multi_json (~> 1.0)
sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
compass-normalize (1.5)
compass (>= 0.12.0)
execjs (2.6.0)
ffi (1.9.10)
json (1.8.3)
multi_json (1.11.2)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
sass (3.4.16)
sass-globbing (1.1.1)
sass (>= 3.1)
PLATFORMS
ruby
DEPENDENCIES
bootstrap-sass (~> 3.3.5)
compass (~> 1)
compass-normalize (~> 1.5)
sass (~> 3.4)
sass-globbing (~> 1)
{
"name": "terion.name",
"version": "0.0.1",
"authors": [
"Volodymyr 'Terion' Kornilov"
],
"license": "GPL",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"velocity": "~1.2.2",
"promise-ajax-js": "*"
}
}
#!/bin/bash
bundle install
npm install
./node_modules/bower/bin/bower install
./node_modules/gulp/bin/gulp
\ No newline at end of file
FROM terion/static-web-build-runtime
ADD ./ /usr/share/nginx/
RUN cd /usr/share/nginx/ && ./build.sh
web:
build: ../../
dockerfile: environments/production/Dockerfile
\ No newline at end of file
gulp = require 'gulp'
gulp.task 'coffee', ->
include = require 'gulp-include'
uglify = require('gulp-uglify')
coffee = require "gulp-coffee"
ifElse = require('gulp-if-else')
argv = require('yargs').argv
gulp.src 'src/coffee/*.coffee'
.pipe include()
.pipe coffee()
.pipe ifElse(argv.production, uglify)
.on 'error', (e)-> console.error e
.pipe gulp.dest 'build/js'
\ No newline at end of file
gulp = require 'gulp'
gulp.task 'fonts', ->
gulp.src 'src/fonts/**/*'
.pipe gulp.dest 'build/fonts'
###
fontfacegen is too buggy...
fontfacegen = require('fontfacegen')
fs = require('fs')
path = require('path')
concat = require('concat-files')
fonts = fs.readdirSync('src/fonts/')
cssFiles = []
for font in fonts
extension = path.extname(font)
fontname = path.basename(font, extension)
if extension == '.ttf' or extension == '.otf'
fontfacegen
source: path.join('src/fonts/', font),
dest: 'build/fonts/',
collate: true
css: "build/fonts/#{fontname}.css"
css_fontpath: "/"
cssFiles.push "build/fonts/#{fontname}.css"
concat cssFiles, 'build/fonts/fonts.css'
###
\ No newline at end of file
gulp = require 'gulp'
gulp.task 'img', ->
imagemin = require 'gulp-imagemin'
pngquant = require 'imagemin-pngquant'
gulp.src 'src/img/**/*'
.pipe(imagemin({
progressive: true,
svgoPlugins: [{removeViewBox: false}],
use: [pngquant()]
}))
.pipe gulp.dest 'build/img'
\ No newline at end of file
gulp = require 'gulp'
gulp.task 'jade', ->
jade = require('gulp-jade')
rename = require("gulp-rename")
argv = require('yargs').argv
gulp.src 'src/jade/pages/*.jade'
.pipe jade {
basedir: 'src/jade/pages/'
pretty: !argv.production
locals: site_domain: 'example.com'
}
.pipe rename (path)->
unless path.basename == 'index'
path.dirname += "/" + path.basename
path.basename = "index"
path.extname = ".html"
.pipe gulp.dest 'build'
\ No newline at end of file
gulp = require 'gulp'
gulp.task 'js', ->
uglify = require('gulp-uglify')
gulp.src 'src/js/**/*'
.pipe uglify()
.pipe gulp.dest 'build/js'
\ No newline at end of file
gulp = require 'gulp'
gulp.task 'sass', ->
compass = require 'gulp-compass'
csso = require 'gulp-csso'
autoprefixer = require "gulp-autoprefixer"
ifElse = require('gulp-if-else')
argv = require('yargs').argv
gulp.src ['src/sass/*.sass', '!src/sass/_*', '!src/sass/_*/*']
.pipe compass
#project: '',
css: 'build/css/'
sass: 'src/sass/'
image: 'src/img/'
require: ['bootstrap-sass', 'sass-globbing', 'compass-normalize']
comments: false
style: 'expanded'
bundle_exec: true
.on 'error', (e)-> console.error e
.pipe(autoprefixer(browsers: ['last 2 version', 'safari 5', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'], remove: false))
.pipe ifElse(argv.production, csso)
.pipe gulp.dest 'build/css'
gulp = require 'gulp'
serve = require 'gulp-serve'
gulp.task 'serve', serve('./build')
\ No newline at end of file
# run with --production option for minified assets
gulp = require 'gulp'
requireDir = require('require-dir')
tasks = requireDir('./gulp')
gulp.task 'default', ['jade', 'fonts', 'img', 'sass', 'js', 'coffee']
gulp.task 'watch', ->
gulp.watch 'src/sass/**/*.sass', ['sass']
gulp.watch ['src/jade/**/*.jade'], ['pages']
gulp.watch 'src/coffee/**/*.coffee', ['coffee']
gulp.task 'sw', ['serve', 'watch']
\ No newline at end of file
require('coffee-script/register');
//require('gulp-task-loader')('gulp');
require('./gulpfile.coffee');
\ No newline at end of file
{
"name": "project.name",
"version": "0.0.1",
"description": "",
"private": true,
"main": "gulpfile.js",
"scripts": {
"test": "gulp"
},
"keywords": [
"GulpJS"
],
"author": "Volodymyr Kornilov",
"license": "BSD",
"dependencies": {
"bower": "~1.3",
"coffee-script": "~1.8",
"glob": "~4",
"gulp": "^3.8.9",
"gulp-autoprefixer": "1.0.1",
"gulp-coffee": "~2.2",
"gulp-compass": "~1.2",
"gulp-csso": "^0.2.9",
"gulp-if-else": "^1.0.3",
"gulp-imagemin": "^2.0.0",
"gulp-include": "^1.1.0",
"gulp-jade": "*",
"gulp-rename": "^1.2.0",
"gulp-serve": "^1.0.0",
"gulp-uglify": "^1.2.0",
"gulp-util": "~3.0",
"imagemin-pngquant": "^4.0.0",
"require-dir": "^0.3.0",
"yargs": "^3.19.0"
}
}
# Single language static sites template
* `gulp` for building dev
* `gulp --production` for building prod
Uses bundler for ruby packages (sass, compass, boottrap-sass, etc), bower for client assets, nodejs with gulp for other stuff
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment