Skip to content

Commit a4afff1

Browse files
author
Jack Herrington
committed
First checkin
0 parents  commit a4afff1

Some content is hidden

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

74 files changed

+10653
-0
lines changed

.bowerrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "app/components"
3+
}

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
8+
[*]
9+
10+
# Change these settings to your own preference
11+
indent_style = space
12+
indent_size = 2
13+
14+
# We recommend you to keep these unchanged
15+
end_of_line = lf
16+
charset = utf-8
17+
trim_trailing_whitespace = true
18+
insert_final_newline = true
19+
20+
[*.md]
21+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
.tmp
4+
.sass-cache
5+
app/components

.jshintrc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"node": true,
3+
"browser": true,
4+
"es5": true,
5+
"esnext": true,
6+
"bitwise": true,
7+
"camelcase": true,
8+
"curly": true,
9+
"eqeqeq": true,
10+
"immed": true,
11+
"indent": 2,
12+
"latedef": true,
13+
"newcap": true,
14+
"noarg": true,
15+
"quotmark": "single",
16+
"regexp": true,
17+
"undef": true,
18+
"unused": true,
19+
"strict": true,
20+
"trailing": true,
21+
"smarttabs": true,
22+
"globals": {
23+
"angular": false
24+
}
25+
}

Gruntfile.js

Lines changed: 304 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,304 @@
1+
'use strict';
2+
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
3+
var mountFolder = function (connect, dir) {
4+
return connect.static(require('path').resolve(dir));
5+
};
6+
7+
module.exports = function (grunt) {
8+
// load all grunt tasks
9+
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
10+
11+
// configurable paths
12+
var yeomanConfig = {
13+
app: 'app',
14+
dist: 'dist'
15+
};
16+
17+
try {
18+
yeomanConfig.app = require('./component.json').appPath || yeomanConfig.app;
19+
} catch (e) {}
20+
21+
grunt.initConfig({
22+
yeoman: yeomanConfig,
23+
watch: {
24+
coffee: {
25+
files: ['<%= yeoman.app %>/scripts/{,*/}*.coffee'],
26+
tasks: ['coffee:dist']
27+
},
28+
coffeeTest: {
29+
files: ['test/spec/{,*/}*.coffee'],
30+
tasks: ['coffee:test']
31+
},
32+
compass: {
33+
files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
34+
tasks: ['compass']
35+
},
36+
livereload: {
37+
files: [
38+
'<%= yeoman.app %>/{,*/}*.html',
39+
'{.tmp,<%= yeoman.app %>}/styles/{,*/}*.css',
40+
'{.tmp,<%= yeoman.app %>}/styles/{,*/}*.scss',
41+
'{.tmp,<%= yeoman.app %>}/scripts/{,*/}*.js',
42+
'<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
43+
],
44+
tasks: ['livereload']
45+
}
46+
},
47+
connect: {
48+
options: {
49+
port: 8080,
50+
// Change this to '0.0.0.0' to access the server from outside.
51+
hostname: 'localhost'
52+
},
53+
livereload: {
54+
options: {
55+
middleware: function (connect) {
56+
return [
57+
lrSnippet,
58+
mountFolder(connect, '.tmp'),
59+
mountFolder(connect, yeomanConfig.app)
60+
];
61+
}
62+
}
63+
},
64+
test: {
65+
options: {
66+
middleware: function (connect) {
67+
return [
68+
mountFolder(connect, '.tmp'),
69+
mountFolder(connect, 'test')
70+
];
71+
}
72+
}
73+
}
74+
},
75+
open: {
76+
server: {
77+
url: 'http://localhost:<%= connect.options.port %>'
78+
}
79+
},
80+
clean: {
81+
dist: {
82+
files: [{
83+
dot: true,
84+
src: [
85+
'.tmp',
86+
'<%= yeoman.dist %>/*',
87+
'!<%= yeoman.dist %>/.git*'
88+
]
89+
}]
90+
},
91+
server: '.tmp'
92+
},
93+
jshint: {
94+
options: {
95+
jshintrc: '.jshintrc'
96+
},
97+
all: [
98+
'Gruntfile.js',
99+
'<%= yeoman.app %>/scripts/{,*/}*.js'
100+
]
101+
},
102+
karma: {
103+
unit: {
104+
configFile: 'karma.conf.js',
105+
singleRun: true
106+
}
107+
},
108+
coffee: {
109+
dist: {
110+
files: [{
111+
expand: true,
112+
cwd: '<%= yeoman.app %>/scripts',
113+
src: '{,*/}*.coffee',
114+
dest: '.tmp/scripts',
115+
ext: '.js'
116+
}]
117+
},
118+
test: {
119+
files: [{
120+
expand: true,
121+
cwd: 'test/spec',
122+
src: '{,*/}*.coffee',
123+
dest: '.tmp/spec',
124+
ext: '.js'
125+
}]
126+
}
127+
},
128+
compass: {
129+
options: {
130+
sassDir: '<%= yeoman.app %>/styles',
131+
cssDir: '.tmp/styles',
132+
imagesDir: '<%= yeoman.app %>/images',
133+
javascriptsDir: '<%= yeoman.app %>/scripts',
134+
fontsDir: '<%= yeoman.app %>/styles/fonts',
135+
importPath: '<%= yeoman.app %>/components',
136+
relativeAssets: true
137+
},
138+
dist: {},
139+
server: {
140+
options: {
141+
debugInfo: true
142+
}
143+
}
144+
},
145+
concat: {
146+
dist: {
147+
files: {
148+
'<%= yeoman.dist %>/scripts/scripts.js': [
149+
'.tmp/scripts/{,*/}*.js',
150+
'<%= yeoman.app %>/scripts/{,*/}*.js'
151+
]
152+
}
153+
}
154+
},
155+
useminPrepare: {
156+
html: '<%= yeoman.app %>/index.html',
157+
options: {
158+
dest: '<%= yeoman.dist %>'
159+
}
160+
},
161+
usemin: {
162+
html: ['<%= yeoman.dist %>/{,*/}*.html'],
163+
css: ['<%= yeoman.dist %>/styles/{,*/}*.css'],
164+
options: {
165+
dirs: ['<%= yeoman.dist %>']
166+
}
167+
},
168+
imagemin: {
169+
dist: {
170+
files: [{
171+
expand: true,
172+
cwd: '<%= yeoman.app %>/images',
173+
src: '{,*/}*.{png,jpg,jpeg}',
174+
dest: '<%= yeoman.dist %>/images'
175+
}]
176+
}
177+
},
178+
cssmin: {
179+
dist: {
180+
files: {
181+
'<%= yeoman.dist %>/styles/main.css': [
182+
'.tmp/styles/{,*/}*.css',
183+
'<%= yeoman.app %>/styles/{,*/}*.css'
184+
]
185+
}
186+
}
187+
},
188+
htmlmin: {
189+
dist: {
190+
options: {
191+
/*removeCommentsFromCDATA: true,
192+
// https://github.com/yeoman/grunt-usemin/issues/44
193+
//collapseWhitespace: true,
194+
collapseBooleanAttributes: true,
195+
removeAttributeQuotes: true,
196+
removeRedundantAttributes: true,
197+
useShortDoctype: true,
198+
removeEmptyAttributes: true,
199+
removeOptionalTags: true*/
200+
},
201+
files: [{
202+
expand: true,
203+
cwd: '<%= yeoman.app %>',
204+
src: ['*.html', 'views/*.html'],
205+
dest: '<%= yeoman.dist %>'
206+
}]
207+
}
208+
},
209+
cdnify: {
210+
dist: {
211+
html: ['<%= yeoman.dist %>/*.html']
212+
}
213+
},
214+
ngmin: {
215+
dist: {
216+
files: [{
217+
expand: true,
218+
cwd: '<%= yeoman.dist %>/scripts',
219+
src: '*.js',
220+
dest: '<%= yeoman.dist %>/scripts'
221+
}]
222+
}
223+
},
224+
uglify: {
225+
dist: {
226+
files: {
227+
'<%= yeoman.dist %>/scripts/scripts.js': [
228+
'<%= yeoman.dist %>/scripts/scripts.js'
229+
]
230+
}
231+
}
232+
},
233+
rev: {
234+
dist: {
235+
files: {
236+
src: [
237+
'<%= yeoman.dist %>/scripts/{,*/}*.js',
238+
'<%= yeoman.dist %>/styles/{,*/}*.css',
239+
'<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
240+
'<%= yeoman.dist %>/styles/fonts/*'
241+
]
242+
}
243+
}
244+
},
245+
copy: {
246+
dist: {
247+
files: [{
248+
expand: true,
249+
dot: true,
250+
cwd: '<%= yeoman.app %>',
251+
dest: '<%= yeoman.dist %>',
252+
src: [
253+
'*.{ico,txt}',
254+
'.htaccess',
255+
'components/**/*',
256+
'images/{,*/}*.{gif,webp}',
257+
'styles/fonts/*'
258+
]
259+
}]
260+
}
261+
}
262+
});
263+
264+
grunt.renameTask('regarde', 'watch');
265+
266+
grunt.registerTask('server', [
267+
'clean:server',
268+
'coffee:dist',
269+
'compass:server',
270+
'livereload-start',
271+
'connect:livereload',
272+
'open',
273+
'watch'
274+
]);
275+
276+
grunt.registerTask('test', [
277+
'clean:server',
278+
'coffee',
279+
'compass',
280+
'connect:test',
281+
'karma'
282+
]);
283+
284+
grunt.registerTask('build', [
285+
'clean:dist',
286+
'jshint',
287+
'test',
288+
'coffee',
289+
'compass:dist',
290+
'useminPrepare',
291+
'imagemin',
292+
'cssmin',
293+
'htmlmin',
294+
'concat',
295+
'copy',
296+
'cdnify',
297+
'ngmin',
298+
'uglify',
299+
'rev',
300+
'usemin'
301+
]);
302+
303+
grunt.registerTask('default', ['build']);
304+
};

LICENSE.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2013 Lithium Technologies, Inc.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

0 commit comments

Comments
 (0)