Skip to content

Commit afc67a7

Browse files
committed
add build scripts
1 parent b9becd8 commit afc67a7

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed

.jshintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"globals": {
3+
"angular": true,
4+
"document": true
5+
}
6+
}

Gruntfile.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
module.exports = function(grunt) {
2+
3+
// Project configuration.
4+
grunt.initConfig({
5+
pkg: grunt.file.readJSON('package.json'),
6+
banner: '/*! \n * <%= pkg.title || pkg.name %> v<%= pkg.version %>\n' +
7+
' * <%= pkg.homepage %>\n' +
8+
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> <%= pkg.author.url %>\n' +
9+
' * License: <%= pkg.license %>\n' +
10+
' */\n',
11+
12+
uglify: {
13+
options: {
14+
banner: '<%= banner %>'
15+
},
16+
build: {
17+
src: 'src/<%= pkg.name %>.js',
18+
dest: 'build/<%= pkg.name %>.min.js'
19+
}
20+
},
21+
cssmin: {
22+
options: {
23+
banner: '<%= banner %>',
24+
report: 'gzip'
25+
},
26+
minify: {
27+
src: 'src/<%= pkg.name %>.css',
28+
dest: 'build/<%= pkg.name %>.min.css'
29+
}
30+
},
31+
jshint: {
32+
all: [
33+
'./src/*.js', '*.json'
34+
],
35+
options: {
36+
jshintrc: '.jshintrc'
37+
}
38+
}
39+
});
40+
41+
// Load the plugins
42+
grunt.loadNpmTasks('grunt-contrib-uglify');
43+
grunt.loadNpmTasks('grunt-contrib-cssmin');
44+
grunt.loadNpmTasks('grunt-contrib-jshint');
45+
46+
// Default task(s).
47+
grunt.registerTask('default', ['jshint:all', 'uglify', 'cssmin']);
48+
49+
};

package.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "angular-advanced-searchbox",
3+
"version": "1.0.0",
4+
"description": "A directive for AngularJS providing a advanced visual search box",
5+
"main": "Gruntfile.js",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/dnauck/angular-advanced-searchbox"
9+
},
10+
"keywords": [
11+
"search",
12+
"angular",
13+
"bootstrap"
14+
],
15+
"author": {
16+
"name": "Nauck IT KG",
17+
"url": "http://www.nauck-it.de/"
18+
},
19+
"contributors": [
20+
{
21+
"name": "Daniel Nauck",
22+
"email": "[email protected]",
23+
"url": "http://www.nauck-it.de/"
24+
}
25+
],
26+
"license": "MIT",
27+
"bugs": {
28+
"url": "https://github.com/dnauck/angular-advanced-searchbox/issues"
29+
},
30+
"homepage": "https://github.com/dnauck/angular-advanced-searchbox",
31+
"devDependencies": {
32+
"grunt": "^0.4.5",
33+
"grunt-contrib-cssmin": "^0.10.0",
34+
"grunt-contrib-jshint": "^0.10.0",
35+
"grunt-contrib-uglify": "^0.6.0"
36+
}
37+
}

0 commit comments

Comments
 (0)