Skip to content

Commit 2e9ac5e

Browse files
author
Jurgen Van de Moere
committed
Initial commit
0 parents  commit 2e9ac5e

12 files changed

+310
-0
lines changed

.bowerrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "bower"
3+
}

.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true

.gitignore

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
._*
2+
.~lock.*
3+
.buildpath
4+
.DS_Store
5+
.idea
6+
.project
7+
.settings
8+
9+
# Ignore node stuff
10+
node_modules/
11+
npm-debug.log
12+
libpeerconnection.log
13+
14+
# OS-specific
15+
.DS_Store
16+
17+
# Bower components
18+
bower

.jshintrc

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

Gruntfile.js

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
module.exports = function (grunt) {
2+
3+
grunt.initConfig({
4+
pkg: grunt.file.readJSON('package.json'),
5+
concat: {
6+
options: {
7+
separator: ''
8+
},
9+
library: {
10+
src: [
11+
'src/growlNotifications/growlNotifications.prefix',
12+
'src/growlNotifications/growlNotifications.js',
13+
'src/growlNotifications/directives/**/*.js',
14+
'src/growlNotifications/filters/**/*.js',
15+
'src/growlNotifications/services/**/*.js',
16+
'src/growlNotifications/growlNotifications.suffix'
17+
],
18+
dest: 'dist/growl-notifications.js'
19+
}
20+
},
21+
uglify: {
22+
options: {
23+
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
24+
},
25+
jid: {
26+
files: {
27+
'dist/growl-notifications.min.js': ['<%= concat.library.dest %>']
28+
}
29+
}
30+
},
31+
jshint: {
32+
beforeConcat: {
33+
src: ['gruntfile.js', 'growlNotifications/**/*.js']
34+
},
35+
afterConcat: {
36+
src: [
37+
'<%= concat.library.dest %>'
38+
]
39+
},
40+
options: {
41+
// options here to override JSHint defaults
42+
globals: {
43+
jQuery: true,
44+
console: true,
45+
module: true,
46+
document: true,
47+
angular: true
48+
},
49+
globalstrict: false
50+
}
51+
},
52+
watch: {
53+
options: {
54+
livereload: true
55+
},
56+
files: [
57+
'Gruntfile.js',
58+
'src/**/*'
59+
],
60+
tasks: ['default']
61+
}
62+
});
63+
64+
grunt.loadNpmTasks('grunt-contrib-uglify');
65+
grunt.loadNpmTasks('grunt-contrib-jshint');
66+
grunt.loadNpmTasks('grunt-contrib-concat');
67+
grunt.loadNpmTasks('grunt-contrib-watch');
68+
69+
grunt.registerTask('default', ['jshint:beforeConcat', 'concat', 'jshint:afterConcat', 'uglify']);
70+
grunt.registerTask('livereload', ['default', 'watch']);
71+
72+
};

bower.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "growl-notifications",
3+
"version": "0.0.0",
4+
"main": ["dist/growl-notifications.js"],
5+
"ignore": [
6+
"src",
7+
"test",
8+
"Gruntfile.js",
9+
"**/.*"
10+
],
11+
"dependencies": {
12+
"angular": "~1.0.8"
13+
},
14+
"devDependencies": {
15+
"angular-mocks": "~1.0.8",
16+
"angular-scenario": "~1.0.8"
17+
}
18+
}

karma-unit.conf.js

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
module.exports = function(config) {
2+
config.set({
3+
4+
// base path, that will be used to resolve files and exclude
5+
basePath: '',
6+
7+
frameworks: ['jasmine'],
8+
9+
plugins: [
10+
'karma-jasmine',
11+
'karma-chrome-launcher',
12+
'karma-phantomjs-launcher'
13+
],
14+
15+
// list of files / patterns to load in the browser
16+
files: [
17+
'bower/angular/angular.js',
18+
'bower/angular-mocks/angular-mocks.js',
19+
'dist/growl-notifications.js',
20+
'test/unit/**/*.js'
21+
],
22+
23+
24+
// list of files to exclude
25+
exclude: [],
26+
27+
28+
// test results reporter to use
29+
// possible values: 'dots', 'progress', 'junit'
30+
reporters: ['progress'],
31+
32+
33+
// web server port
34+
port: 9876,
35+
36+
37+
// cli runner port
38+
runnerPort: 9100,
39+
40+
41+
// enable / disable colors in the output (reporters and logs)
42+
colors: true,
43+
44+
45+
// level of logging
46+
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
47+
logLevel: config.LOG_INFO,
48+
49+
50+
// enable / disable watching file and executing tests whenever any file changes
51+
autoWatch: true,
52+
53+
54+
// Start these browsers, currently available:
55+
// - Chrome
56+
// - ChromeCanary
57+
// - Firefox
58+
// - Opera
59+
// - Safari (only Mac)
60+
// - PhantomJS
61+
// - IE (only Windows)
62+
browsers: ['Chrome'],
63+
64+
65+
// If browser does not capture in given timeout [ms], kill it
66+
captureTimeout: 60000,
67+
68+
69+
// Continuous Integration mode
70+
// if true, it capture browsers, run tests and exit
71+
singleRun: false
72+
73+
});
74+
};
75+

package.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "growl-notifications",
3+
"version": "0.0.0",
4+
"dependencies": {},
5+
"devDependencies": {
6+
"grunt": "~0.4.1",
7+
"grunt-contrib-concat": "~0.3.0",
8+
"grunt-contrib-uglify": "~0.2.0",
9+
"grunt-contrib-jshint": "~0.6.0",
10+
"grunt-contrib-connect": "~0.3.0",
11+
"grunt-contrib-watch": "~0.4.0",
12+
"grunt-karma": "~0.4.3",
13+
"grunt-concurrent": "~0.3.0",
14+
"connect-livereload": "~0.2.0",
15+
"grunt-google-cdn": "~0.2.0",
16+
"karma": "~0.9",
17+
"karma-jasmine": "~0.0.3",
18+
"karma-chrome-launcher": "~0.0.2"
19+
},
20+
"engines": {
21+
"node": ">=0.8.0"
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Create all modules and define dependencies to make sure they exist
2+
// and are loaded in the correct order to satisfy dependency injection
3+
// before all nested files are concatenated by Grunt
4+
5+
// Config
6+
angular.module('growlNotifications.config', [])
7+
.value('growlNotifications.config', {
8+
debug: true
9+
});
10+
11+
// Modules
12+
angular.module('growlNotifications.directives', []);
13+
angular.module('growlNotifications.filters', []);
14+
angular.module('growlNotifications.services', []);
15+
angular.module('growlNotifications',
16+
[
17+
'growlNotifications.config',
18+
'growlNotifications.directives',
19+
'growlNotifications.filters',
20+
'growlNotifications.services'
21+
]);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
(function(window, document) {
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
})(window, document);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
'use strict';
2+
3+
// Set the jasmine fixture path
4+
// jasmine.getFixtures().fixturesPath = 'base/';
5+
6+
describe('', function() {
7+
8+
var module;
9+
var dependencies;
10+
dependencies = [];
11+
12+
var hasModule = function(module) {
13+
return dependencies.indexOf(module) >= 0;
14+
};
15+
16+
beforeEach(function() {
17+
18+
// Get module
19+
module = angular.module('growlNotifications');
20+
dependencies = module.requires;
21+
});
22+
23+
it('should load config module', function() {
24+
expect(hasModule('growlNotifications.config')).toBeTruthy();
25+
});
26+
27+
28+
it('should load filters module', function() {
29+
expect(hasModule('growlNotifications.filters')).toBeTruthy();
30+
});
31+
32+
33+
34+
it('should load directives module', function() {
35+
expect(hasModule('growlNotifications.directives')).toBeTruthy();
36+
});
37+
38+
39+
40+
it('should load services module', function() {
41+
expect(hasModule('growlNotifications.services')).toBeTruthy();
42+
});
43+
44+
45+
});

0 commit comments

Comments
 (0)