Skip to content

Commit b0fb82a

Browse files
committed
Mat is the literal worst.
0 parents  commit b0fb82a

36 files changed

+4686
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
npm-debug.log
3+
tmp

.grunticon-temp/star.svg

Lines changed: 1 addition & 0 deletions
Loading

.jshintrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"curly": true,
3+
"eqeqeq": true,
4+
"immed": true,
5+
"latedef": true,
6+
"newcap": true,
7+
"noarg": true,
8+
"sub": true,
9+
"undef": true,
10+
"boss": true,
11+
"eqnull": true,
12+
"node": true
13+
}

Gruntfile.js

Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
/*global module:false,require:false*/
2+
module.exports = function(grunt) {
3+
4+
var os = require('os'),
5+
isWindows = os.platform().indexOf('win') === 0; // watch out for `darwin`
6+
7+
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
8+
9+
// Project configuration.
10+
grunt.initConfig({
11+
pkg: '<json:package.json>',
12+
banner: '/*! Project Name - v<%= pkg.version %> - ' +
13+
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
14+
'* Copyright (c) <%= grunt.template.today("yyyy") %> ' +
15+
'Authored by Filament Group, Inc. */',
16+
clean: {
17+
dist: [ "_dist/" ],
18+
grunticon: [ ".grunticon-temp" ]
19+
},
20+
concat: {
21+
options: {
22+
banner: '<%= banner %>'
23+
},
24+
js_initial: {
25+
src: [
26+
'_tmpl/_js/_lib/modernizr.js',
27+
'_tmpl/_js/app-globals.js',
28+
'_tmpl/_js/initial.config.js'
29+
],
30+
dest: '_dist/_js/initial.js'
31+
},
32+
js_main: {
33+
src: [
34+
// keep this globalenhance file last!
35+
'_tmpl/_js/globalenhance.js'
36+
],
37+
dest: '_dist/_js/main.js'
38+
},
39+
js_respond: {
40+
src: [
41+
'_tmpl/_js/_lib/respond.js'
42+
],
43+
dest: '_dist/_js/respond.js'
44+
},
45+
css_main: {
46+
src: [
47+
'_tmpl/_css/_lib/*',
48+
'_tmpl/_css/all.css',
49+
],
50+
dest: '_dist/_css/all.css'
51+
}
52+
},
53+
copy: {
54+
dist: {
55+
files: [
56+
{ expand: true, cwd: '_tmpl/docs/', src: ["*.html"], dest: "_dist/docs/" },
57+
{ expand: true, cwd: '_tmpl/_includes/', src: ["**"], dest: "_dist/_includes/" },
58+
{ expand: true, cwd: "_tmpl/_img/", src: ["**"], dest: "_dist/_img/" },
59+
{ expand: true, cwd: "_tmpl/_img/svg/", src: ["*.png"], dest: "_dist/_img/_svg/" },
60+
{ expand: true, cwd: "_tmpl/_css/_img/", src: ["**"], dest: "_dist/_css/_img/" },
61+
{ expand: true, cwd: "_tmpl/", src: ["*.html","*.php","*.json"], dest: "_dist/" },
62+
{ expand: true, cwd: "_tmpl/", src: [".htaccess"], dest: "_dist/" }]
63+
},
64+
grunticon: {
65+
files: [
66+
{ expand: true, cwd: "_tmpl/_css/_svg/", src: ["**"], dest: ".grunticon-temp" }
67+
]
68+
}
69+
},
70+
watch: {
71+
all: {
72+
files: [
73+
'!_tmpl/_css/**/*',
74+
'!_tmpl/_js/**/*',
75+
'_tmpl/**/*'
76+
],
77+
tasks: 'watch-default'
78+
},
79+
80+
css: {
81+
files: ['_tmpl/_css/**/*'],
82+
tasks: 'watch-css'
83+
},
84+
85+
js: {
86+
files: ['_tmpl/_js/**/*'],
87+
tasks: 'watch-js'
88+
},
89+
grunticon: {
90+
files: ['_tmpl/_css/_svg/*'],
91+
tasks: 'watch-grunticon'
92+
}
93+
},
94+
cssmin: {
95+
options: {
96+
banner: '<%= banner %>',
97+
stripBanners: true
98+
},
99+
css_main: {
100+
src: [
101+
'<%= concat.css_main.dest %>'
102+
],
103+
dest: '<%= concat.css_main.dest %>'
104+
}
105+
},
106+
uglify: {
107+
options: {
108+
banner: '<%= banner %>',
109+
stripBanners: true
110+
},
111+
js_initial: {
112+
src: [
113+
'<%= concat.js_initial.dest %>'
114+
],
115+
dest: '<%= concat.js_initial.dest %>'
116+
},
117+
js_main: {
118+
src: [
119+
'<%= concat.js_main.dest %>'
120+
],
121+
dest: '<%= concat.js_main.dest %>'
122+
},
123+
js_respond: {
124+
src: [
125+
'<%= concat.js_respond.dest %>'
126+
],
127+
dest: '<%= concat.js_respond.dest %>'
128+
}
129+
},
130+
svgmin: { // Task
131+
options: { // Configuration that will be passed directly to SVGO
132+
plugins: [{
133+
removeViewBox: false
134+
}]
135+
},
136+
tmpl: {
137+
files: [
138+
{
139+
expand: true,
140+
cwd: '.grunticon-temp/',
141+
src: ['**/*.svg'],
142+
dest: '.grunticon-temp/'
143+
}
144+
]
145+
}
146+
},
147+
grunticon: {
148+
all: {
149+
options: {
150+
src: ".grunticon-temp/",
151+
dest: "_dist/_css/_grunticon/",
152+
svgo: true,
153+
pngcrush: false,
154+
cssbasepath: "/",
155+
colors: {
156+
"green": "#0C756D"
157+
}
158+
}
159+
}
160+
},
161+
criticalcss: {
162+
custom_options: {
163+
options: {
164+
url: "http://ricg.io.dev",
165+
filename : 'all.css',
166+
outputfile: "_dist/_css/critical.css"
167+
}
168+
}
169+
},
170+
171+
// prevent editing of _dist files
172+
chmod: {
173+
options: {},
174+
readonly: {
175+
options: {
176+
mode: isWindows ? '666': '555'
177+
},
178+
src: ['_dist/**']
179+
},
180+
writeable: {
181+
options: {
182+
mode: isWindows ? '666': '755'
183+
},
184+
src: ['_dist/**']
185+
}
186+
},
187+
188+
qunit: {
189+
all: ["_tmpl/_test/*.html"]
190+
}
191+
192+
});
193+
194+
// Default task.
195+
grunt.registerTask('default', [
196+
'chmod:writeable',
197+
'clean',
198+
'qunit',
199+
'concat',
200+
'copy',
201+
'svgmin',
202+
'grunticon',
203+
'criticalcss',
204+
'chmod:readonly'
205+
]);
206+
207+
grunt.registerTask('icons', [
208+
'chmod:writeable',
209+
'clean:grunticon',
210+
'copy:grunticon',
211+
'svgmin',
212+
'grunticon',
213+
'chmod:readonly'
214+
]);
215+
216+
// NOTE these watch tasks try to run only relevant tasks per file save
217+
218+
grunt.registerTask('watch-endpoints', [
219+
'chmod:writeable',
220+
'copy',
221+
'chmod:readonly'
222+
]);
223+
224+
grunt.registerTask('watch-default', [
225+
'chmod:writeable',
226+
'qunit',
227+
'copy',
228+
'svgmin',
229+
'chmod:readonly'
230+
]);
231+
232+
grunt.registerTask('watch-css', [
233+
'chmod:writeable',
234+
'concat:css_main',
235+
'chmod:readonly'
236+
]);
237+
238+
grunt.registerTask('watch-js', [
239+
'chmod:writeable',
240+
'concat:js_initial',
241+
'concat:js_main',
242+
'concat:js_respond',
243+
'concat:js_docs',
244+
'chmod:readonly'
245+
]);
246+
247+
grunt.registerTask('watch-grunticon', [
248+
'chmod:writeable',
249+
'clean:grunticon',
250+
'copy:grunticon',
251+
'svgmin',
252+
'grunticon',
253+
'chmod:readonly'
254+
]);
255+
256+
grunt.registerTask('stage', [
257+
'clean',
258+
'qunit',
259+
'concat',
260+
'cssmin',
261+
'uglify',
262+
'copy',
263+
'svgmin',
264+
'grunticon'
265+
]);
266+
};

LICENSE-MIT

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

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fg-project-scaffolding
2+
======================
3+
4+
A standard scaffolding and place to get started for our projects.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!-- Grunticon Loader: place this in the head of your page -->
2+
<script>
3+
/* grunticon Stylesheet Loader | https://github.com/filamentgroup/grunticon | (c) 2012 Scott Jehl, Filament Group, Inc. | MIT license. */
4+
window.grunticon=function(e){if(e&&3===e.length){var t=window,n=!(!t.document.createElementNS||!t.document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect||!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")||window.opera&&-1===navigator.userAgent.indexOf("Chrome")),o=function(o){var r=t.document.createElement("link"),a=t.document.getElementsByTagName("script")[0];r.rel="stylesheet",r.href=e[o&&n?0:o?1:2],a.parentNode.insertBefore(r,a)},r=new t.Image;r.onerror=function(){o(!1)},r.onload=function(){o(1===r.width&&1===r.height)},r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="}};
5+
grunticon( [ "/_dist/_css/_grunticon/icons.data.svg.css", "/_dist/_css/_grunticon/icons.data.png.css", "/_dist/_css/_grunticon/icons.fallback.css" ] );</script>
6+
<noscript><link href="/_dist/_css/_grunticon/icons.fallback.css" rel="stylesheet"></noscript>

_dist/_css/_grunticon/icons.data.png.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_dist/_css/_grunticon/icons.data.svg.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.icon-star { background-image: url(png/star.png); background-repeat: no-repeat; }

_dist/_css/_grunticon/png/star.png

1.35 KB
Loading

_dist/_css/_grunticon/preview.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype HTML>
2+
<html>
3+
<head>
4+
<title>Icons Preview!</title>
5+
<script>
6+
/* grunticon Stylesheet Loader | https://github.com/filamentgroup/grunticon | (c) 2012 Scott Jehl, Filament Group, Inc. | MIT license. */
7+
window.grunticon=function(e){if(e&&3===e.length){var t=window,n=!(!t.document.createElementNS||!t.document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect||!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")||window.opera&&-1===navigator.userAgent.indexOf("Chrome")),o=function(o){var r=t.document.createElement("link"),a=t.document.getElementsByTagName("script")[0];r.rel="stylesheet",r.href=e[o&&n?0:o?1:2],a.parentNode.insertBefore(r,a)},r=new t.Image;r.onerror=function(){o(!1)},r.onload=function(){o(1===r.width&&1===r.height)},r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="}};
8+
grunticon( [ "icons.data.svg.css", "icons.data.png.css", "icons.fallback.css" ] );
9+
</script>
10+
<noscript><link href="icons.fallback.css" rel="stylesheet"></noscript>
11+
</head>
12+
<body>
13+
<pre><code>.icon-star:</code></pre><div class="icon-star" style="width: 42px; height: 42px"></div><hr/>
14+
</body>
15+
</html>

0 commit comments

Comments
 (0)