-
Notifications
You must be signed in to change notification settings - Fork 10
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
0 parents
commit 233d699
Showing
9 changed files
with
246 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": "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,4 @@ | ||
.idea | ||
*.iml | ||
node_modules | ||
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,37 @@ | ||
{ | ||
"bitwise": true, | ||
"browser": true, | ||
"camelcase": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"eqnull": true, | ||
"forin": true, | ||
"freeze": true, | ||
"immed": true, | ||
"indent": 4, | ||
"jquery": true, | ||
"latedef": true, | ||
"maxcomplexity": 10, | ||
"maxdepth": 2, | ||
"maxlen": 160, | ||
"maxparams": 20, | ||
"maxstatements": 0, | ||
"newcap": true, | ||
"noarg": true, | ||
"noempty": true, | ||
"nonbsp": true, | ||
"nonew": true, | ||
"plusplus": false, | ||
"quotmark": "single", | ||
"strict": true, | ||
"trailing": true, | ||
"undef": true, | ||
"unused": true, | ||
"devel": true, | ||
"globals": { | ||
"beforeEach": true, | ||
"describe": true, | ||
"expect": true, | ||
"it": 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,70 @@ | ||
/*jshint camelcase:false*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = function (grunt) | ||
{ | ||
|
||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-connect'); | ||
|
||
var config = { | ||
app: 'app' | ||
}; | ||
|
||
grunt.initConfig({ | ||
config: config, | ||
jshint: { | ||
options: { | ||
jshintrc: true | ||
}, | ||
all: ['app/**/*.js', 'test/**/*.js'] | ||
}, | ||
watch: { | ||
livereload: { | ||
options: { | ||
livereload: '<%= connect.options.livereload %>' | ||
}, | ||
files: [ | ||
'<%= config.app %>/**/*.html', '<%= config.app %>/**/*.js' | ||
] | ||
} | ||
}, | ||
connect: { | ||
options: { | ||
port: 9000, livereload: 35729, hostname: 'localhost' | ||
}, | ||
livereload: { | ||
options: { | ||
open: true, middleware: function (connect) | ||
{ | ||
return [ | ||
connect().use('/bower_components', connect.static('./bower_components')), connect.static(config.app) | ||
|
||
]; | ||
} | ||
} | ||
} | ||
}, | ||
karma: { | ||
unit: { | ||
configFile: 'test/karma.conf.js', | ||
singleRun: true | ||
}, | ||
dev: { | ||
configFile: 'test/karma.conf.js', | ||
singleRun: false | ||
} | ||
} | ||
}); | ||
|
||
grunt.registerTask('serve', function () | ||
{ | ||
grunt.task.run([ | ||
'connect:livereload', 'watch' | ||
]); | ||
}); | ||
|
||
grunt.registerTask('default', ['serve']); | ||
}; |
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 @@ | ||
##JavaScript Workshop |
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,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head lang="en"> | ||
<meta charset="UTF-8"> | ||
<title>JavaScript Workshop</title> | ||
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css"> | ||
</head> | ||
<body class="container"> | ||
<div class="page-header"> | ||
<h1>JavaScript | ||
<small>Workshop</small> | ||
</h1> | ||
</div> | ||
|
||
</body> | ||
</html> |
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,10 @@ | ||
{ | ||
"name": "js-workshop", | ||
"version": "0.0.0", | ||
"dependencies": { | ||
"bootstrap": "~3.1.1" | ||
}, | ||
"devDependencies": { | ||
}, | ||
"appPath": "app" | ||
} |
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,28 @@ | ||
{ | ||
"name": "js-workshop", | ||
"description": "JavaScript Workshop", | ||
"version": "0.0.0", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"grunt": "~0.4.2", | ||
"grunt-contrib-jshint": "~0.8.0", | ||
"grunt-contrib-watch": "^0.6.1", | ||
"grunt-contrib-connect": "^0.7.1", | ||
"karma-phantomjs-launcher": "~0.1.4", | ||
"karma": "~0.12.16", | ||
"karma-coverage": "~0.2.4", | ||
"karma-jasmine": "~0.1.5", | ||
"karma-spec-reporter": "0.0.13" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/aniaw/js-workshop" | ||
}, | ||
"scripts": { | ||
"start": "grunt karma:dev", | ||
"test": "grunt karma:unit" | ||
} | ||
} |
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,77 @@ | ||
/*global module*/ | ||
module.exports = function (config) { | ||
'use strict'; | ||
|
||
config.set({ | ||
// enable / disable watching file and executing tests whenever any file changes | ||
autoWatch: true, | ||
|
||
// base path, that will be used to resolve files and exclude | ||
basePath: '../', | ||
|
||
// testing framework to use (jasmine/mocha/qunit/...) | ||
frameworks: ['jasmine'], | ||
|
||
// list of files / patterns to load in the browser | ||
files: [ | ||
'app/**/*.js', | ||
'test/spec/**/*.js' | ||
], | ||
|
||
// list of files / patterns to exclude | ||
exclude: [], | ||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' | ||
reporters: ['spec', 'coverage'], | ||
|
||
preprocessors: { | ||
'app/**/*.js': 'coverage' | ||
}, | ||
|
||
coverageReporter: { | ||
dir: 'target/coverage/', | ||
type: 'html' | ||
}, | ||
|
||
// web server port | ||
port: 8080, | ||
|
||
// Start these browsers, currently available: | ||
// - Chrome | ||
// - ChromeCanary | ||
// - Firefox | ||
// - Opera | ||
// - Safari (only Mac) | ||
// - PhantomJS | ||
// - IE (only Windows) | ||
browsers: [ | ||
'PhantomJS' | ||
], | ||
|
||
// Which plugins to enable | ||
plugins: [ | ||
'karma-phantomjs-launcher', 'karma-coverage', 'karma-jasmine', 'karma-spec-reporter' | ||
], | ||
|
||
// Continuous Integration mode | ||
// if true, it capture browsers, run tests and exit | ||
singleRun: false, | ||
|
||
colors: true, | ||
|
||
// level of logging | ||
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG | ||
logLevel: config.LOG_INFO, | ||
|
||
//https://github.com/karma-runner/karma/issues/895 | ||
usePolling: true | ||
|
||
// Uncomment the following lines if you are using grunt's server to run the tests | ||
// proxies: { | ||
// '/': 'http://localhost:9000/' | ||
// }, | ||
// URL root prevent conflicts with the site root | ||
// urlRoot: '_karma_' | ||
}); | ||
}; |