This repository has been archived by the owner on Jan 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
48 changed files
with
1,662 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"directory": "src/bower_components" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
|
||
[*] | ||
|
||
# Change these settings to your own preference | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# We recommend you to keep these unchanged | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules | ||
dist/bower_components | ||
.tmp | ||
.sass-cache | ||
src/bower_components | ||
test | ||
examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"node": true, | ||
"browser": true, | ||
"esnext": true, | ||
"bitwise": true, | ||
"camelcase": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"immed": true, | ||
"indent": 4, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"quotmark": "single", | ||
"undef": true, | ||
"unused": true, | ||
"strict": true, | ||
"trailing": true, | ||
"smarttabs": true, | ||
"jquery": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,336 @@ | ||
// Generated on 2014-02-28 using generator-webapp 0.4.7 | ||
'use strict'; | ||
|
||
// # Globbing | ||
// for performance reasons we're only matching one level down: | ||
// 'test/spec/{,*/}*.js' | ||
// use this if you want to recursively match all subfolders: | ||
// 'test/spec/**/*.js' | ||
|
||
module.exports = function (grunt) { | ||
|
||
// Load grunt tasks automatically | ||
require('load-grunt-tasks')(grunt); | ||
|
||
// Time how long tasks take. Can help when optimizing build times | ||
require('time-grunt')(grunt); | ||
|
||
// Define the configuration for all the tasks | ||
grunt.initConfig({ | ||
|
||
// Project settings | ||
yeoman: { | ||
// Configurable paths | ||
app: 'src', | ||
dist: 'dist' | ||
}, | ||
|
||
// Watches files for changes and runs tasks based on the changed files | ||
watch: { | ||
js: { | ||
files: ['<%= yeoman.app %>/scripts/{,*/}*.js'], | ||
tasks: ['jshint'], | ||
options: { | ||
livereload: true | ||
} | ||
}, | ||
jstest: { | ||
files: ['test/spec/{,*/}*.js'], | ||
tasks: ['test:watch'] | ||
}, | ||
gruntfile: { | ||
files: ['Gruntfile.js'] | ||
}, | ||
compass: { | ||
files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'], | ||
tasks: ['compass:server', 'autoprefixer'] | ||
}, | ||
styles: { | ||
files: ['<%= yeoman.app %>/styles/{,*/}*.css'], | ||
tasks: ['newer:copy:styles', 'autoprefixer'] | ||
}, | ||
livereload: { | ||
options: { | ||
livereload: '<%= connect.options.livereload %>' | ||
}, | ||
files: [ | ||
'<%= yeoman.app %>/{,*/}*.html', | ||
'.tmp/styles/{,*/}*.css', | ||
'<%= yeoman.app %>/images/{,*/}*.{gif,jpeg,jpg,png,svg,webp}' | ||
] | ||
} | ||
}, | ||
|
||
// The actual grunt server settings | ||
connect: { | ||
options: { | ||
port: 9000, | ||
livereload: 35729, | ||
// Change this to '0.0.0.0' to access the server from outside | ||
hostname: 'localhost' | ||
}, | ||
livereload: { | ||
options: { | ||
open: true, | ||
base: [ | ||
'.tmp', | ||
'<%= yeoman.app %>' | ||
] | ||
} | ||
}, | ||
test: { | ||
options: { | ||
port: 9001, | ||
base: [ | ||
'.tmp', | ||
'test', | ||
'<%= yeoman.app %>' | ||
] | ||
} | ||
}, | ||
dist: { | ||
options: { | ||
open: true, | ||
base: '<%= yeoman.dist %>', | ||
livereload: false | ||
} | ||
} | ||
}, | ||
|
||
// Empties folders to start fresh | ||
clean: { | ||
dist: { | ||
files: [{ | ||
dot: true, | ||
src: [ | ||
'.tmp', | ||
'<%= yeoman.dist %>/*', | ||
'!<%= yeoman.dist %>/.git*' | ||
] | ||
}] | ||
}, | ||
server: '.tmp' | ||
}, | ||
|
||
// Make sure code styles are up to par and there are no obvious mistakes | ||
jshint: { | ||
options: { | ||
jshintrc: '.jshintrc', | ||
reporter: require('jshint-stylish') | ||
}, | ||
all: [ | ||
'Gruntfile.js', | ||
'<%= yeoman.app %>/scripts/{,*/}*.js', | ||
'!<%= yeoman.app %>/scripts/vendor/*', | ||
'test/spec/{,*/}*.js' | ||
] | ||
}, | ||
|
||
|
||
// Mocha testing framework configuration options | ||
mocha: { | ||
all: { | ||
options: { | ||
run: true, | ||
urls: ['http://<%= connect.test.options.hostname %>:<%= connect.test.options.port %>/index.html'] | ||
} | ||
} | ||
}, | ||
|
||
|
||
|
||
|
||
// Compiles Sass to CSS and generates necessary files if requested | ||
compass: { | ||
options: { | ||
sassDir: '<%= yeoman.app %>/styles', | ||
cssDir: '.tmp/styles', | ||
javascriptsDir: '<%= yeoman.app %>/scripts', | ||
importPath: '<%= yeoman.app %>/bower_components' | ||
}, | ||
dist: { | ||
options: { | ||
sassDir: '<%= yeoman.app %>/styles', | ||
cssDir: '.tmp/styles' | ||
} | ||
}, | ||
server: { | ||
options: { | ||
debugInfo: true | ||
} | ||
} | ||
}, | ||
|
||
// Add vendor prefixed styles | ||
autoprefixer: { | ||
options: { | ||
browsers: ['last 1 version'] | ||
}, | ||
dist: { | ||
files: [{ | ||
expand: true, | ||
cwd: '.tmp/styles/', | ||
src: '{,*/}*.css', | ||
dest: '.tmp/styles/' | ||
}] | ||
} | ||
}, | ||
|
||
cssmin: { | ||
dist: { | ||
files: { | ||
'<%= yeoman.dist %>/styles/kitchen-sink.min.css': [ | ||
'.tmp/styles/{,*/}*.css', | ||
'<%= yeoman.app %>/styles/{,*/}*.css' | ||
] | ||
} | ||
} | ||
}, | ||
// uglify: { | ||
// dist: { | ||
// files: { | ||
// '<%= yeoman.dist %>/scripts/scripts.js': [ | ||
// '<%= yeoman.dist %>/scripts/scripts.js' | ||
// ] | ||
// } | ||
// } | ||
// }, | ||
concat: { | ||
dist: {} | ||
}, | ||
|
||
// Copies remaining files to places other tasks can use | ||
copy: { | ||
dist: { | ||
files: [{ | ||
expand: true, | ||
dot: true, | ||
cwd: '<%= yeoman.app %>', | ||
dest: '<%= yeoman.dist %>', | ||
src: [ | ||
'styles/{,*/}*.scss', | ||
'.tmp/styles' | ||
] | ||
}] | ||
}, | ||
styles: { | ||
expand: true, | ||
dot: true, | ||
cwd: '<%= yeoman.app %>/styles', | ||
dest: '.tmp/styles/', | ||
src: '{,*/}*.css' | ||
} | ||
}, | ||
|
||
|
||
// Generates a custom Modernizr build that includes only the tests you | ||
// reference in your app | ||
modernizr: { | ||
devFile: '<%= yeoman.app %>/bower_components/modernizr/modernizr.js', | ||
outputFile: '<%= yeoman.dist %>/bower_components/modernizr/modernizr.js', | ||
files: [ | ||
'<%= yeoman.dist %>/scripts/{,*/}*.js', | ||
'<%= yeoman.dist %>/styles/{,*/}*.css', | ||
'!<%= yeoman.dist %>/scripts/vendor/*' | ||
], | ||
uglify: true | ||
}, | ||
|
||
// Run some tasks in parallel to speed up build process | ||
concurrent: { | ||
server: [ | ||
'compass:server', | ||
'copy:styles' | ||
], | ||
test: [ | ||
'copy:styles' | ||
], | ||
dist: [ | ||
'compass:dist', | ||
'copy:styles' | ||
] | ||
}, | ||
|
||
requirejs: { | ||
dist: { | ||
options: { | ||
baseUrl: '<%= yeoman.app %>/scripts', | ||
mainConfigFile: '<%= yeoman.app %>/scripts/config.js', | ||
name: 'almond', | ||
out: '<%= yeoman.dist %>/scripts/MarionetteTransition.min.js', | ||
optimize: 'uglify', | ||
wrap:{ | ||
startFile:"<%= yeoman.app %>/fragments/wrap-start.frag", | ||
endFile:"<%= yeoman.app %>/fragments/wrap-end.frag" | ||
} | ||
} | ||
}, | ||
distNoMin: { | ||
options: { | ||
baseUrl: '<%= yeoman.app %>/scripts', | ||
mainConfigFile: '<%= yeoman.app %>/scripts/config.js', | ||
name: 'almond', | ||
out: '<%= yeoman.dist %>/scripts/MarionetteTransition.js', | ||
optimize: 'none', | ||
wrap:{ | ||
startFile:"<%= yeoman.app %>/fragments/wrap-start.frag", | ||
endFile:"<%= yeoman.app %>/fragments/wrap-end.frag" | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
|
||
|
||
grunt.registerTask('serve', function (target) { | ||
if (target === 'dist') { | ||
return grunt.task.run(['build', 'connect:dist:keepalive']); | ||
} | ||
|
||
grunt.task.run([ | ||
'clean:server', | ||
'concurrent:server', | ||
'autoprefixer', | ||
'connect:livereload', | ||
'watch' | ||
]); | ||
}); | ||
|
||
grunt.registerTask('server', function () { | ||
grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.'); | ||
grunt.task.run(['serve']); | ||
}); | ||
|
||
grunt.registerTask('test', function(target) { | ||
if (target !== 'watch') { | ||
grunt.task.run([ | ||
'clean:server', | ||
'concurrent:test', | ||
'autoprefixer', | ||
]); | ||
} | ||
|
||
grunt.task.run([ | ||
'connect:test', | ||
'mocha' | ||
]); | ||
}); | ||
|
||
grunt.registerTask('build', [ | ||
'clean:dist', | ||
'concurrent:dist', | ||
'autoprefixer', | ||
'concat', | ||
'cssmin', | ||
'copy:dist', | ||
'requirejs:dist', | ||
'requirejs:distNoMin', | ||
'modernizr' | ||
]); | ||
|
||
grunt.registerTask('default', [ | ||
'newer:jshint', | ||
'test', | ||
'build' | ||
]); | ||
}; |
Oops, something went wrong.