forked from OctoLinker/OctoLinker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stefan Buck
committed
Jun 13, 2014
0 parents
commit 270f7b5
Showing
34 changed files
with
93,536 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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": "app/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,8 @@ | ||
node_modules | ||
temp | ||
.tmp | ||
dist | ||
.sass-cache | ||
app/bower_components | ||
test/bower_components | ||
package |
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,27 @@ | ||
{ | ||
"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", | ||
"regexp": true, | ||
"undef": true, | ||
"unused": true, | ||
"strict": true, | ||
"trailing": true, | ||
"smarttabs": true, | ||
"globals" : { | ||
"chrome": true, | ||
"$": true, | ||
"npmRegistry": true, | ||
"bowerRegistry": 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,327 @@ | ||
// Generated on 2014-06-13 using generator-chrome-extension 0.2.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); | ||
|
||
// Configurable paths | ||
var config = { | ||
app: 'app', | ||
dist: 'dist', | ||
manifest: grunt.file.readJSON('app/manifest.json') | ||
}; | ||
|
||
grunt.initConfig({ | ||
|
||
// Project settings | ||
config: config, | ||
|
||
// Watches files for changes and runs tasks based on the changed files | ||
watch: { | ||
bower: { | ||
files: ['bower.json'], | ||
tasks: ['bowerInstall'] | ||
}, | ||
js: { | ||
files: ['<%= config.app %>/scripts/{,*/}*.js'], | ||
tasks: ['jshint'], | ||
options: { | ||
livereload: true | ||
} | ||
}, | ||
gruntfile: { | ||
files: ['Gruntfile.js'] | ||
}, | ||
styles: { | ||
files: ['<%= config.app %>/styles/{,*/}*.css'], | ||
tasks: [], | ||
options: { | ||
livereload: true | ||
} | ||
}, | ||
livereload: { | ||
options: { | ||
livereload: '<%= connect.options.livereload %>' | ||
}, | ||
files: [ | ||
'<%= config.app %>/*.html', | ||
'<%= config.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}', | ||
'<%= config.app %>/manifest.json', | ||
'<%= config.app %>/_locales/{,*/}*.json' | ||
] | ||
} | ||
}, | ||
|
||
// Grunt server and debug server setting | ||
connect: { | ||
options: { | ||
port: 9000, | ||
livereload: 35729, | ||
// change this to '0.0.0.0' to access the server from outside | ||
hostname: 'localhost' | ||
}, | ||
chrome: { | ||
options: { | ||
open: false, | ||
base: [ | ||
'<%= config.app %>' | ||
] | ||
} | ||
}, | ||
test: { | ||
options: { | ||
open: false, | ||
base: [ | ||
'test', | ||
'<%= config.app %>' | ||
] | ||
} | ||
} | ||
}, | ||
|
||
// Empties folders to start fresh | ||
clean: { | ||
chrome: { | ||
}, | ||
dist: { | ||
files: [{ | ||
dot: true, | ||
src: [ | ||
'<%= config.dist %>/*', | ||
'!<%= config.dist %>/.git*' | ||
] | ||
}] | ||
} | ||
}, | ||
|
||
// 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', | ||
'<%= config.app %>/scripts/{,*/}*.js', | ||
'!<%= config.app %>/scripts/vendor/*', | ||
'test/spec/{,*/}*.js' | ||
] | ||
}, | ||
mocha: { | ||
all: { | ||
options: { | ||
run: true, | ||
urls: ['http://localhost:<%= connect.options.port %>/index.html'] | ||
} | ||
} | ||
}, | ||
|
||
// Automatically inject Bower components into the HTML file | ||
bowerInstall: { | ||
app: { | ||
src: [ | ||
'<%= config.app %>/*.html' | ||
] | ||
} | ||
}, | ||
|
||
// Reads HTML for usemin blocks to enable smart builds that automatically | ||
// concat, minify and revision files. Creates configurations in memory so | ||
// additional tasks can operate on them | ||
useminPrepare: { | ||
options: { | ||
dest: '<%= config.dist %>' | ||
}, | ||
html: [ | ||
'<%= config.app %>/popup.html', | ||
'<%= config.app %>/options.html' | ||
] | ||
}, | ||
|
||
// Performs rewrites based on rev and the useminPrepare configuration | ||
usemin: { | ||
options: { | ||
assetsDirs: ['<%= config.dist %>', '<%= config.dist %>/images'] | ||
}, | ||
html: ['<%= config.dist %>/{,*/}*.html'], | ||
css: ['<%= config.dist %>/styles/{,*/}*.css'] | ||
}, | ||
|
||
// The following *-min tasks produce minifies files in the dist folder | ||
imagemin: { | ||
dist: { | ||
files: [{ | ||
expand: true, | ||
cwd: '<%= config.app %>/images', | ||
src: '{,*/}*.{gif,jpeg,jpg,png}', | ||
dest: '<%= config.dist %>/images' | ||
}] | ||
} | ||
}, | ||
|
||
svgmin: { | ||
dist: { | ||
files: [{ | ||
expand: true, | ||
cwd: '<%= config.app %>/images', | ||
src: '{,*/}*.svg', | ||
dest: '<%= config.dist %>/images' | ||
}] | ||
} | ||
}, | ||
|
||
htmlmin: { | ||
dist: { | ||
options: { | ||
// removeCommentsFromCDATA: true, | ||
// collapseWhitespace: true, | ||
// collapseBooleanAttributes: true, | ||
// removeAttributeQuotes: true, | ||
// removeRedundantAttributes: true, | ||
// useShortDoctype: true, | ||
// removeEmptyAttributes: true, | ||
// removeOptionalTags: true | ||
}, | ||
files: [{ | ||
expand: true, | ||
cwd: '<%= config.app %>', | ||
src: '*.html', | ||
dest: '<%= config.dist %>' | ||
}] | ||
} | ||
}, | ||
|
||
// By default, your `index.html`'s <!-- Usemin block --> will take care of | ||
// minification. These next options are pre-configured if you do not wish | ||
// to use the Usemin blocks. | ||
// cssmin: { | ||
// dist: { | ||
// files: { | ||
// '<%= config.dist %>/styles/main.css': [ | ||
// '<%= config.app %>/styles/{,*/}*.css' | ||
// ] | ||
// } | ||
// } | ||
// }, | ||
// uglify: { | ||
// dist: { | ||
// files: { | ||
// '<%= config.dist %>/scripts/scripts.js': [ | ||
// '<%= config.dist %>/scripts/scripts.js' | ||
// ] | ||
// } | ||
// } | ||
// }, | ||
// concat: { | ||
// dist: {} | ||
// }, | ||
|
||
// Copies remaining files to places other tasks can use | ||
copy: { | ||
dist: { | ||
files: [{ | ||
expand: true, | ||
dot: true, | ||
cwd: '<%= config.app %>', | ||
dest: '<%= config.dist %>', | ||
src: [ | ||
'*.{ico,png,txt}', | ||
'images/{,*/}*.{webp,gif}', | ||
'{,*/}*.html', | ||
'styles/{,*/}*.css', | ||
'styles/fonts/{,*/}*.*', | ||
'_locales/{,*/}*.json', | ||
] | ||
}] | ||
} | ||
}, | ||
|
||
// Run some tasks in parallel to speed up build process | ||
concurrent: { | ||
chrome: [ | ||
], | ||
dist: [ | ||
'imagemin', | ||
'svgmin' | ||
], | ||
test: [ | ||
] | ||
}, | ||
|
||
// Auto buildnumber, exclude debug files. smart builds that event pages | ||
chromeManifest: { | ||
dist: { | ||
options: { | ||
buildnumber: true, | ||
background: { | ||
target: 'scripts/background.js', | ||
exclude: [ | ||
'scripts/chromereload.js' | ||
] | ||
} | ||
}, | ||
src: '<%= config.app %>', | ||
dest: '<%= config.dist %>' | ||
} | ||
}, | ||
|
||
// Compres dist files to package | ||
compress: { | ||
dist: { | ||
options: { | ||
archive: 'package/GitHub Linker<%= config.manifest.version %>.zip' | ||
}, | ||
files: [{ | ||
expand: true, | ||
cwd: 'dist/', | ||
src: ['**'], | ||
dest: '' | ||
}] | ||
} | ||
} | ||
}); | ||
|
||
grunt.registerTask('debug', function () { | ||
grunt.task.run([ | ||
'jshint', | ||
'concurrent:chrome', | ||
'connect:chrome', | ||
'watch' | ||
]); | ||
}); | ||
|
||
grunt.registerTask('test', [ | ||
'connect:test', | ||
'mocha' | ||
]); | ||
|
||
grunt.registerTask('build', [ | ||
'clean:dist', | ||
'chromeManifest:dist', | ||
'useminPrepare', | ||
'concurrent:dist', | ||
'cssmin', | ||
'concat', | ||
'uglify', | ||
'copy', | ||
'usemin', | ||
'compress' | ||
]); | ||
|
||
grunt.registerTask('default', [ | ||
'jshint', | ||
'test', | ||
'build' | ||
]); | ||
}; |
Binary file not shown.
Oops, something went wrong.