Skip to content

Commit

Permalink
Some CI Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
baseprime committed Dec 12, 2016
1 parent 551ef25 commit 34aa6ee
Show file tree
Hide file tree
Showing 8 changed files with 1,495 additions and 371 deletions.
50 changes: 26 additions & 24 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,49 @@

module.exports = function(grunt){
module.exports = function (grunt) {

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
info : {
banner : "/****\n"+
" * Grapnel\n"+
" * https://github.com/baseprime/grapnel\n"+
" *\n"+
" * @author <%= pkg.author %>\n"+
" * @link <%= pkg.link %>\n"+
" * @version <%= pkg.version %>\n"+
" *\n"+
" * Released under MIT License. See LICENSE.txt or http://opensource.org/licenses/MIT\n"+
"*/\n\n"
info: {
banner: "/****\n" +
" * Grapnel\n" +
" * https://github.com/baseprime/grapnel\n" +
" *\n" +
" * @author <%= pkg.author %>\n" +
" * @link <%= pkg.link %>\n" +
" *\n" +
" * Released under MIT License. See LICENSE.txt or http://opensource.org/licenses/MIT\n" +
"*/\n\n"
},
uglify: {
options: {
banner: '<%= info.banner %>',
},
dist: {
src: 'src/grapnel.js',
dest : 'dist/grapnel.min.js'
files: {
'dist/grapnel.min.js': ['src/grapnel.js']
}
}
},
concat : {
options : {
banner : '<%= info.banner %>'
},
dist: {
src: 'src/grapnel.js',
dest : 'src/grapnel.js'
connect: {
server: {
options: {
port: 3002,
hostname: '*',
base: './test'
}
}
},
qunit: {
files: ['test/index.html']
all: ['test/index.html']
}
});

grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-qunit');

grunt.registerTask('default', ['uglify', 'concat', 'qunit']);
grunt.registerTask('default', ['uglify', 'qunit']);
grunt.registerTask('test', ['qunit']);
grunt.registerTask('serve-tests', ['connect:server:keepalive']);

}
1 change: 0 additions & 1 deletion dist/grapnel.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "The smallest JavaScript Router with PushState & Named Parameter support",
"main": "src/grapnel.js",
"scripts": {
"test": "pushd ./test; python -m SimpleHTTPServer 3002; popd"
"test": "grunt",
"serve-tests": "grunt serve-tests"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -36,9 +37,10 @@
},
"homepage": "http://grapnel.js.org",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-qunit": "^0.5.2",
"grunt-contrib-uglify": "^0.7.0"
"grunt": "^1.0.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-qunit": "^1.2.0",
"grunt-contrib-uglify": "^2.0.0"
}
}
1 change: 0 additions & 1 deletion src/grapnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*
* @author Greg Sabia Tucker <greg@narrowlabs.com>
* @link http://basepri.me
* @version 0.6.4
*
* Released under MIT License. See LICENSE.txt or http://opensource.org/licenses/MIT
*/
Expand Down
2 changes: 1 addition & 1 deletion test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="./qunit.css">
<script src="./jquery-2.1.3.min.js"></script>
<script src="./qunit.js"></script>
<script src="./require.js"></script>
<script src="./grapnel.js"></script>
<script src="./main.js"></script>
</head>
<body>
Expand Down
Loading

0 comments on commit 34aa6ee

Please sign in to comment.