Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "bower_components"
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
bower_components
282 changes: 282 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
module.exports = function(grunt) {

var appConfig = {
host: 'localhost',
port: 1338,
src_dir: 'src/',
dist_dir: 'dist/'
};

require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

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

watch: {
grunt: {
files: 'Gruntfile.js'
},
sass: {
files: ['<%= appConfig.src_dir %>css/**/*.scss'],
tasks: ['sass', 'postcss', 'cssnext']
},
uglify: {
files: ['<%= appConfig.src_dir %>js/**/*.js'],
tasks: ['uglify']
},
jade: {
files: ['<%= appConfig.src_dir %>**/*.jade'],
tasks: ['jade']
}
},

browserSync: {
dev: {
bsFiles: {
src: [
'<%= appConfig.dist_dir %>css/*.css',
'<%= appConfig.dist_dir %>js/*.js',
'<%= appConfig.dist_dir %>*.html',
'<%= appConfig.dist_dir %>img/*.jpg',
'<%= appConfig.dist_dir %>img/*.png',
],
},

options: {
watchTask: true,
server: {
baseDir: appConfig.dist_dir
},
debugInfo: true,
logConnections: true,
notify: true,
plugins: [
{
module: 'bs-html-injector',
options: {
files: '<%= appConfig.dist_dir %>*.html'
}
}
],
ghostMode: {
scroll: true,
links: true,
forms: true
}
},

bsReload: {
all: {
reload: true
}
}
}
},

clean: {
options: {
dot: true
},

dist: {
src: ['<%= appConfig.dist_dir %>']
}
},

copy: {
src: {
files: [{
expand: true,
dot: true,
flatten: true,
src: ['bower_components/font-awesome/fonts/*', '<%= appConfig.src_dir %>fonts/*'],
dest: '<%= appConfig.dist_dir %>fonts/',
filter: 'isFile'
}]
}
},

sass: {
options: {
sourceMap: true
},

dist: {
files: {
'<%= appConfig.dist_dir %>css/main.min.css': '<%= appConfig.src_dir %>css/main.scss'
}
}
},

postcss: {
options: {
map: false,
processors: [
require('autoprefixer-core')({
browsers: ['last 5 versions', '> 15%', 'IE 10']
})
]
},

dist: {
src: ['<%= appConfig.dist_dir %>css/main.min.css']
}
},

cssnext: {
options: {
sourcemap: false
},

dist: {
files: {
'<%= appConfig.dist_dir %>css/main.min.css': '<%= appConfig.dist_dir %>css/main.min.css'
}
}
},

cssbeautifier : {
files : ['<%= appConfig.dist_dir %>css/main.min.css'],
options : {
indent: ' ',
openbrace: 'end-of-line',
autosemicolon: true
}
},

cssmin: {
options: {
shorthandCompacting: false,
roundingPrecision: -1
},

target: {
files: {
'<%= appConfig.dist_dir %>css/main.min.css': ['<%= appConfig.dist_dir %>css/main.min.css'],
}
}
},

uglify: {
dist: {
options: {
beautify: true
},

files: {
'<%= appConfig.dist_dir %>js/main.min.js': ['<%= appConfig.src_dir %>js/**/*.js']
}
}
},

jade: {
html: {
files: {
'<%= appConfig.dist_dir %>': ['<%= appConfig.src_dir %>*.jade']
},

options: {
client: false,
pretty: true
}
}
},

'ftp-deploy': {
build: {
auth: {
host: 'whitmoretearooms.co.uk',
port: 21,
authKey: '/.ftppass'
},
src: 'app',
dest: '/public_html/test',
exclusions: ['**/.DS_Store']
}
},

imagemin: {
png: {
options: {
optimizationLevel: 7
},
files: [
{
expand: true,
cwd: '<%= appConfig.src_dir %>img/',
src: ['**/*.png'],
dest: '<%= appConfig.dist_dir %>img/',
ext: '.png'
}
]
},

jpg: {
options: {
progressive: true
},
files: [
{
expand: true,
cwd: '<%= appConfig.src_dir %>img/',
src: ['**/*.jpg'],
dest: '<%= appConfig.dist_dir %>img/',
ext: '.jpg'
}
]
}
},

svgmin: {
options: {
plugins: [
{ collapseGroups: false },
{ removeUnknownsAndDefaults: false }
]
},
dist: {
files: [{
expand: true,
cwd: '<%= appConfig.src_dir %>img',
src: '{,*/}*.svg',
dest: '<%= appConfig.dist_dir %>img'
}]
}
}
});

grunt.registerTask('compile-css', [
'sass',
'postcss',
'cssnext',
'imagemin',
'svgmin',
// 'copy'
]);

grunt.registerTask('compile-js', [
'uglify'
]);

grunt.registerTask('compile-html', [
'jade'
]);

grunt.registerTask('compile-theme', ['compile-css', 'compile-js', 'compile-html']);

grunt.registerTask('prettify', [
'cssbeautifier',
'cssmin'
]);

grunt.registerTask('preview', [
'compile-theme',
'browserSync',
'watch'
]);

grunt.registerTask('default', ['preview']);
grunt.registerTask('prepare', ['compile-theme', 'prettify']);
grunt.registerTask('deploy', ['ship', 'ftp-deploy'])
}
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
## GridleCSS Theme

http://studio51.github.io/gridlecss/

A `test` theme for GridleCSS in order to test all the frameworks components.
This theme relies, heavily, on GridleCSS. Any changes, if any, made on the
framework will affect this theme.

### Installation

``` bash
$ git clone git@github.com:studio51/gridlecss.git
$ cd web
$ npm install
```

We use [Grunt.JS] as our Task Runner in order to compile the SASS files.
If you haven't used Grunt before, be sure to check out the Getting Started
guide, as it explains how to create a Gruntfile as well as install and use Grunt
plugins.

`$ grunt`

This is the default task which will `clean` the `dist` folder and `compile` the
all the theme files, such SASS, JS and JADE.

It will also launch a server on `localhost:1337` so make sure the port is not in
use by any other service. The server comes with livereload in order to see
updates as they happen in your browser.

`$ grunt compile`

This will `clean` the `dist` folder and `compile` the all the theme files, such
SASS, JS and JADE.

`$ grunt ship`

If you make any changes to GridleCSS Theme and whish to make a pull request or
use it, use this task which will `clean`, `compile`, and `prettify` all the
resources used by the theme.

### Open for pull requests

Before making any pull requests, make sure the Theme looks as it should by using
the `$ grunt` task.

### License

MIT &copy; [Studio51]

[Studio51]:http://creative-studio51.co.uk
[Grunt.JS]:http://gruntjs.com
21 changes: 21 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "GridleCSS",
"version": "1.0.0",
"homepage": "https://github.com/studio51/framework-gridlex",
"authors": [
"Vlad Radulescu <pacMakaveli90@gmail.co.uk>"
],
"description": "''",
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"devDependencies": {
"font-awesome": "~4.4.0",
"gridlecss": "*"
}
}
Loading