Skip to content

Commit df22f2e

Browse files
author
Ashley Nolan
committed
Initial part of weather toggle finished
0 parents  commit df22f2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+5887
-0
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Include your project-specific ignores in this file
2+
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
3+
# Examples: https://github.com/github/gitignore
4+
5+
# SASS #
6+
########
7+
.sass-cache
8+
*.scssc
9+
10+
11+
# OS generated files #
12+
######################
13+
.DS_Store
14+
.DS_Store?
15+
._*
16+
.Spotlight-V100
17+
.Trashes
18+
ehthumbs.db
19+
Thumbs.db
20+
21+
22+
# Random
23+
*.sublime-*
24+
25+
node_modules
26+
bower_components
27+
28+
# Ignore these if we are building js/Sass on the server #
29+
#########################################################
30+
js/dist/*.js
31+
#css/*.css
32+
css/temp/*.css
33+
**/*.map
34+
35+
# Jekyll
36+
_site/

.jscs.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"requireCurlyBraces": ["if", "else", "for", "while", "do"],
3+
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return"],
4+
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
5+
"disallowRightStickedOperators": ["?", "+", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
6+
"requireRightStickedOperators": ["!"],
7+
"requireLeftStickedOperators": [","],
8+
"disallowImplicitTypeConversion": ["string"],
9+
"disallowKeywords": ["with"],
10+
"disallowKeywordsOnNewLine": ["else"],
11+
"requireLineFeedAtFileEnd": true,
12+
"validateJSDoc": {
13+
"checkParamNames": true,
14+
"requireParamTypes": true
15+
}
16+
}

.jshintrc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"globals": {"console": true},
3+
"camelcase": true,
4+
"curly": true,
5+
"debug": true,
6+
"forin": true,
7+
"latedef": true,
8+
"laxcomma": true,
9+
"maxerr": "50",
10+
"noarg": true,
11+
"noempty": true,
12+
"smarttabs": false,
13+
"strict": false,
14+
"trailing": true,
15+
"unused": true,
16+
"white": false,
17+
"browser": true,
18+
"devel": true,
19+
"jquery": true
20+
}

Gruntfile.js

+171
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
module.exports = function (grunt) {
2+
3+
'use strict';
4+
5+
// Load grunt tasks automatically
6+
require('load-grunt-tasks')(grunt);
7+
8+
var options = {
9+
pkg: require('./package'), // <%=pkg.name%>
10+
11+
/**
12+
* Config - Edit this section
13+
* ==========================
14+
* Choose javascript dist filename
15+
* Choose javascript dist location
16+
* Choose javascript files to be uglified
17+
*/
18+
config : {
19+
scss : {
20+
cssFile : 'kickoff' // <%=config.scss.cssFile%>
21+
},
22+
23+
js : {
24+
// <%=config.js.distDir%>
25+
distDir : 'js/dist/',
26+
27+
// <%=config.js.distFile%>
28+
distFile : 'app.min.js',
29+
30+
// <%=config.js.fileList%>
31+
fileList : [
32+
'js/helpers/console.js',
33+
'bower_components/trak/dist/trak.js',
34+
'bower_components/swiftclick/js/libs/swiftclick.js',
35+
'bower_components/cookies-js/src/cookies.js',
36+
'js/script.js'
37+
]
38+
}
39+
}
40+
};
41+
42+
43+
/**
44+
* Config - Edit this section
45+
* ==========================
46+
* Choose javascript dist filename
47+
* Choose javascript dist location
48+
* Choose javascript files to be uglified
49+
*/
50+
51+
52+
// Load grunt configurations automatically
53+
var configs = require('load-grunt-configs')(grunt, options);
54+
55+
// Define the configuration for all the tasks
56+
grunt.initConfig(configs);
57+
58+
59+
/* ==========================================================================
60+
Available tasks:
61+
* grunt : run jshint, uglify and sass:kickoff
62+
* grunt start : run this before starting development
63+
* grunt watch : run sass:kickoff, uglify and livereload
64+
* grunt dev : run uglify, sass:kickoff & autoprefixer:kickoff
65+
* grunt deploy : run jshint, uglify, sass:kickoff and csso
66+
* grunt jquery : build custom version of jquery
67+
* grunt serve : watch js & scss and run a local server
68+
* grunt icons : generate the icons. uses svgmin and grunticon
69+
* grunt jscheck : run jshint & jscs
70+
* grunt travis : used by travis ci only
71+
========================================================================== */
72+
73+
/**
74+
* GRUNT * Default task
75+
* run uglify, sass:kickoff and autoprefixer
76+
*/
77+
grunt.registerTask('default', [
78+
'newer:uglify',
79+
'newer:sass:kickoff',
80+
'autoprefixer:kickoff'
81+
]);
82+
83+
/**
84+
* GRUNT START * Run this to
85+
* run jquery builder, uglify, sass and autoprefixer
86+
*/
87+
grunt.registerTask('start', [
88+
'jquery',
89+
'shell:bowerinstall',
90+
'uglify',
91+
'sass:kickoff',
92+
'autoprefixer:kickoff',
93+
'connect:start',
94+
'watch'
95+
]);
96+
97+
98+
/**
99+
* GRUNT DEV * A task for development
100+
* run uglify, sass:kickoff & autoprefixer:kickoff
101+
*/
102+
grunt.registerTask('dev', [
103+
'uglify',
104+
'sass:kickoff',
105+
'autoprefixer:kickoff'
106+
]);
107+
108+
109+
/**
110+
* GRUNT DEPLOY * A task for your production environment
111+
* run uglify, sass:kickoff, autoprefixer:kickoff and csso
112+
*/
113+
grunt.registerTask('deploy', [
114+
'newer:uglify',
115+
'newer:sass:kickoff',
116+
'newer:autoprefixer:kickoff',
117+
'newer:csso'
118+
]);
119+
120+
121+
/**
122+
* GRUNT SERVE * A task for for a static server with a watch
123+
* run connect and watch
124+
*/
125+
grunt.registerTask('serve', [
126+
'uglify',
127+
'sass:kickoff',
128+
'autoprefixer:kickoff',
129+
'connect:site',
130+
'watch'
131+
]);
132+
133+
134+
/**
135+
* GRUNT ICONS * A task to create all icons using grunticon
136+
* run clean, svgmin and grunticon
137+
*/
138+
grunt.registerTask('icons', [
139+
'clean:icons',
140+
'svgmin',
141+
'grunticon'
142+
]);
143+
144+
145+
/**
146+
* GRUNT JSCHECK * Check js for errors and style problems
147+
* run jshint, jscs
148+
*/
149+
// Default task
150+
grunt.registerTask('jscheck', [
151+
'jshint',
152+
'jscs'
153+
]);
154+
155+
156+
//Travis CI to test build
157+
grunt.registerTask('travis', [
158+
'jshint',
159+
'uglify',
160+
'sass:kickoff',
161+
'autoprefixer:kickoff'
162+
]);
163+
164+
165+
/**
166+
* TODO:
167+
* Need task to update all grunt dependencies
168+
* Need task to download all bower dependencies
169+
*/
170+
171+
};

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2013 Tullo Marshall Warren
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

config/css.js

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
module.exports.tasks = {
2+
3+
/**
4+
* Sass compilation using grunt-sass
5+
* https://github.com/gruntjs/grunt-contrib-sass
6+
* Includes kickoff.scss and kickoff-old-ie.scss by default
7+
* Also creates source maps
8+
*/
9+
sass: {
10+
kickoff: {
11+
options: {
12+
unixNewlines: true,
13+
style: 'expanded',
14+
lineNumbers: false,
15+
debugInfo : false,
16+
precision : 8,
17+
sourcemap: true
18+
},
19+
files: {
20+
'css/temp/<%=config.scss.cssFile%>.css' : 'scss/<%=config.scss.cssFile%>.scss',
21+
'css/temp/<%=config.scss.cssFile%>-old-ie.css': 'scss/<%=config.scss.cssFile%>-old-ie.scss'
22+
}
23+
}
24+
},
25+
26+
27+
/**
28+
* Autoprefixer
29+
* https://github.com/nDmitry/grunt-autoprefixer
30+
* https://github.com/ai/autoprefixer
31+
* Auto prefixes your CSS using caniuse data
32+
*/
33+
autoprefixer: {
34+
options: {
35+
// We are supporting the last 2 browsers, any browsers with >1% market share,
36+
// and ensuring we support IE8+ with prefixes
37+
browsers: ['> 5%', 'last 4 versions', 'firefox > 3.6', 'ie > 7'],
38+
map: true
39+
},
40+
41+
kickoff: {
42+
expand: true,
43+
flatten: true,
44+
src: 'css/temp/*.css',
45+
dest: 'css/'
46+
}
47+
},
48+
49+
50+
/**
51+
* CSSO
52+
* https://github.com/t32k/grunt-csso
53+
* Minify CSS files with CSSO
54+
*/
55+
csso: {
56+
dist: {
57+
options: {
58+
restructure: false //turns structural optimisations off as can mess up fallbacks http://bem.info/tools/optimizers/csso/description/
59+
},
60+
files: {
61+
'css/<%=config.scss.cssFile%>.css' : 'css/<%=config.scss.cssFile%>.css',
62+
'css/<%=config.scss.cssFile%>-old-ie.css': 'css/<%=config.scss.cssFile%>-old-ie.css'
63+
},
64+
65+
}
66+
},
67+
68+
};

config/icons.js

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
module.exports.tasks = {
2+
/**
3+
* Grunticon
4+
* https://github.com/filamentgroup/grunticon
5+
*/
6+
grunticon: {
7+
myIcons: {
8+
files: [{
9+
expand: true,
10+
cwd : 'img/src-min',
11+
src : ['*.svg', '*.png'],
12+
dest : 'img/icons'
13+
}],
14+
options: {
15+
// customselectors: {
16+
// "*": [".icon-$1:before"]
17+
// }
18+
}
19+
}
20+
},
21+
22+
/**
23+
* SVGmin
24+
* https://github.com/sindresorhus/grunt-svgmin
25+
*/
26+
svgmin: {
27+
options: {
28+
plugins: [
29+
{ removeViewBox: false },
30+
{ removeUselessStrokeAndFill: false }
31+
]
32+
},
33+
dist: { // Target
34+
files: [{ // Dictionary of files
35+
expand: true, // Enable dynamic expansion.
36+
cwd: 'img/src', // Src matches are relative to this path.
37+
src: ['**/*.svg'], // Actual pattern(s) to match.
38+
dest: 'img/src-min', // Destination path prefix.
39+
ext: '.svg' // Dest filepaths will have this extension.
40+
// ie: optimise img/src/branding/logo.svg and store it in img/branding/logo.min.svg
41+
}]
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)