Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce frontend build system using grunt.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
- Loading branch information
Showing
6 changed files
with
155 additions
and
28 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 |
---|---|---|
|
@@ -53,3 +53,5 @@ pkg | |
*.~*~ | ||
Gemfile.lock | ||
.gems/* | ||
node_modules | ||
public/dist |
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,86 @@ | ||
module.exports = function (grunt) { | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
prefix: 'public/dist/', | ||
name: '<%= pkg.name.toLowerCase() %>', | ||
cssmin: { | ||
options: { | ||
keepSpecialComments: 0 | ||
}, | ||
main: { | ||
files: { | ||
'<%= prefix %>/css/<%= name %>.min.css': | ||
[ | ||
'public/css/bootstrap.min.css', | ||
'public/css/font-awesome.min.css', | ||
'public/css/custom.css' | ||
] | ||
} | ||
} | ||
}, | ||
uglify: { | ||
options: { | ||
}, | ||
main: { | ||
files: { | ||
'<%= prefix %>/js/<%= name %>.min.js': | ||
[ | ||
// Base. | ||
'public/js/underscore.min.js', | ||
'public/js/jquery.min.js', | ||
'public/js/jquery-ui.min.js', | ||
'public/js/bootstrap.min.js', | ||
'public/js/webshims/polyfiller.js', | ||
|
||
// d3 - for visualisation. | ||
'public/js/d3.v3.min.js', | ||
|
||
// Our stuff. | ||
'public/js/sequence.js', | ||
'public/js/sequenceserver.js', | ||
'public/js/jquery.t.js', | ||
'public/js/sequenceserver.blast.js', | ||
] | ||
} | ||
} | ||
}, | ||
copy: { | ||
shims: { | ||
expand: true, | ||
cwd: 'public/js/webshims/shims/', | ||
src: '**', | ||
dest: '<%= prefix %>/js/shims/' | ||
}, | ||
fonts: { | ||
expand: true, | ||
cwd: 'public/fonts/', | ||
src: '**', | ||
dest: '<%= prefix %>/fonts' | ||
} | ||
}, | ||
compress: { | ||
options: { | ||
mode: 'gzip' | ||
}, | ||
js: { | ||
files: { | ||
'<%= prefix %>/js/<%= name %>.min.js.gz': | ||
'<%= prefix %>/js/<%= name %>.min.js' | ||
} | ||
}, | ||
css: { | ||
files: { | ||
'<%= prefix %>/css/<%= name %>.min.css.gz': | ||
'<%= prefix %>/css/<%= name %>.min.css' | ||
} | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-cssmin'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-copy'); | ||
grunt.loadNpmTasks('grunt-contrib-compress'); | ||
|
||
grunt.registerTask('build', ['cssmin', 'uglify', 'copy', 'compress']); | ||
}; |
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
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,24 @@ | ||
{ | ||
"name": "SequenceServer", | ||
"description": "BLAST searching made easy!", | ||
"version": "1.0.0-2", | ||
"homepage": "http://www.sequenceserver.com", | ||
"repository": "https://github.com/yannickwurm/sequenceserver", | ||
"author": { | ||
"name": "Anurag Priyam", | ||
"email": "anurag08priyam@gmail.com" | ||
}, | ||
"dependencies": { | ||
}, | ||
"devDependencies": { | ||
"grunt": "0.4.5", | ||
"grunt-cli": "0.1.13", | ||
"grunt-contrib-cssmin": "0.11.0", | ||
"grunt-contrib-uglify": "0.4.0", | ||
"grunt-contrib-copy": "0.7.0", | ||
"grunt-contrib-compress": "0.13.0" | ||
}, | ||
"scripts": { | ||
"build": "grunt build" | ||
} | ||
} |
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
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