Skip to content

Commit

Permalink
Updated to version 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPietrusky committed Dec 10, 2013
1 parent f0a1c73 commit 9ebd6be
Show file tree
Hide file tree
Showing 172 changed files with 17,008 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.sass-cache/
sftp-config.json

.ftppass
node_modules/
26 changes: 26 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"node": true,
"browser": true,
"es5": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": false,
"smarttabs": true,
"globals" : {
"jQuery": true,
"Modernizr": true
}
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

## 2.0.0 (10 December 2013)

* Added Changelog
* Added grunt support
* Added new UI
* Fixed some bugs
314 changes: 314 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,314 @@
/*!
* http://timpietrusky.com
* @author Tim Pietrusky
*/

'use strict';

/**
* Livereload and connect variables
*/
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({
port: LIVERELOAD_PORT
});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};

/**
* Grunt module
*/
module.exports = function (grunt) {

/**
* Dynamically load npm tasks
*/
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

/**
* FireShell Grunt config
*/
grunt.initConfig({

pkg: grunt.file.readJSON('package.json'),





/**
* Set project info
*/
project: {
src: 'src',
src_js_vendor : '<%= project.src %>/js/vendor',
app: 'app',
skin: '<%= project.app %>/skin',
css: [
'<%= project.src %>/scss/style.scss'
],
js: [
'<%= project.src %>/js/vendor/libs.js',
'<%= project.src %>/js/vendor/ga.js',
'<%= project.src %>/js/core/*.js',
'<%= project.src %>/js/*.js'
]
},





/**
* Project banner
* Dynamically appended to CSS/JS files
* Inherits text from package.json
*/
tag: {
banner: '/*!\n' +
' * <%= pkg.name %>\n' +
' * <%= pkg.title %>\n' +
' * <%= pkg.url %>\n' +
' * @author <%= pkg.author %>\n' +
' * @version <%= pkg.version %>\n' +
' * Copyright <%= pkg.copyright %>. <%= pkg.license %> licensed.\n' +
' */\n'
},





/**
* Connect port/livereload
* https://github.com/gruntjs/grunt-contrib-connect
* Starts a local webserver and injects
* livereload snippet
*/
connect: {
options: {
port: '9000',
hostname: '*'
},
livereload: {
options: {
middleware: function (connect) {
return [lrSnippet, mountFolder(connect, 'app')];
}
}
}
},





/**
* JSHint
* https://github.com/gruntjs/grunt-contrib-jshint
* Manage the options inside .jshintrc file
*/
jshint: {
files: ['src/js/*.js'],
options: {
jshintrc: '.jshintrc'
}
},





/**
* Concatenate JavaScript files
* https://github.com/gruntjs/grunt-contrib-concat
* Imports all .js files and appends project banner
*/
concat: {
options: {
stripBanners: true,
nonull: true,
banner: '<%= tag.banner %>'
},
dev: {
files: {
'<%= project.skin %>/js/scripts.min.js': '<%= project.js %>'
}
}
},





/**
* Uglify (minify) JavaScript files
* https://github.com/gruntjs/grunt-contrib-uglify
* Compresses and minifies all JavaScript files into one
*/
uglify: {
options: {
banner: "<%= tag.banner %>"
},
dist: {
files: {
'<%= project.skin %>/js/scripts.min.js': '<%= project.js %>'
}
}
},





/**
* Compile Sass/SCSS files
* https://github.com/gruntjs/grunt-contrib-sass
* Compiles all Sass/SCSS files and appends project banner
*/
compass: {
dev: {
options: {
sassDir: '<%= project.src %>/scss',
cssDir: '<%= project.skin %>/css',
watch: true
}
},
dist: {
options: {
sassDir: '<%= project.src %>/scss',
cssDir: '<%= project.skin %>/css',
outputStyle: 'compressed',
environment: 'production'
}
}
},





/**
* Opens the web server in the browser
* https://github.com/jsoverson/grunt-open
*/
open: {
server: {
path: 'http://weloveiconfonts.local'
}
},





/**
* Runs tasks against changed watched files
* https://github.com/gruntjs/grunt-contrib-watch
* Watching development files and run concat/compile tasks
* Livereload the browser once complete
*/
watch: {
concat: {
files: '<%= project.src %>/js/{,*/}*.js',
tasks: ['concat:dev', 'jshint']
},
livereload: {
options: {
livereload: LIVERELOAD_PORT
},
files: [
'<%= project.app %>/{,*/}*.html',
'<%= project.skin %>/css/*.css',
'<%= project.skin %>/js/{,*/}*.js',
'<%= project.skin %>/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
]
}
},





/*
* We use "compass watch" and "watch" at the same time
*/
concurrent: {
target1: ['compass', 'watch']
},





/*
* Deploy to a server with FTP
*/
ftpush: {
build: {
auth: {
host: '185.21.101.189',
port: 21,
authKey: 'key1'
},
src: 'app',
dest: '/var/www/beta.weloveiconfonts.com',
exclusions: ['app/.gitignore']
}
},





/*
* Deploy to a server with SFTP
*/
'sftp-deploy': {
build: {
auth: {
host: '185.21.101.189',
port: 22,
authKey: 'key1'
},
src: 'app',
dest: '/var/www/beta.weloveiconfonts.com',
exclusions: ['app/.gitignore'],
server_sep: '/'
}
},
});





/**
* Default task
* Run `grunt` on the command line
*/
grunt.registerTask('default', [
'jshint',
'connect:livereload',
'open',
'concurrent:target1'
]);





/**
* Build task
* Run `grunt build` on the command line
* Then compress all JS/CSS files
*/
grunt.registerTask('build', [
'compass:dist',
'jshint',
'uglify',
'sftp-deploy'
]);

};
Empty file modified README.md
100644 → 100755
Empty file.
38 changes: 38 additions & 0 deletions app/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<IfModule mod_rewrite.c>
#RewriteEngine On

#RewriteCond %{HTTP_HOST} ^api\.
#RewriteCond %{REQUEST_URI} !^/api/$ [NC]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule (.*) /api/$1 [L]

#RewriteCond %{HTTP_HOST} ^/api
#RewriteCond %{REQUEST_URI} !/api/$ [NC]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule (.*) /api/$1 [L]

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

</IfModule>


<IfModule mod_deflate.c>

# Compression
AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/javascript

</IfModule>


<IfModule mod_expires.c>

## Expire after some time
<FilesMatch "\.(jpg|jpeg|gif|png|css|woff|js|eot|svg|ttf)$">
ExpiresActive on
ExpiresDefault "access plus 1 month"
</FilesMatch>

</IfModule>
Loading

0 comments on commit 9ebd6be

Please sign in to comment.