forked from laurihy/angular-payments
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated to work with angularjs 1.2.6 * Added watch and jsHint tasks to the grunt file. * Corrected code to pass jsHint.
- Loading branch information
1 parent
95133c1
commit 3fdd4a0
Showing
15 changed files
with
1,716 additions
and
1,696 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 |
---|---|---|
@@ -1,46 +1,69 @@ | ||
module.exports = function(grunt) { | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
concat: { | ||
options: { | ||
separator: ';' | ||
}, | ||
dist: { | ||
src: ['src/module.js', | ||
'src/common.js', | ||
'src/cards.js', | ||
'src/format.js', | ||
'src/validate.js', | ||
'src/form.js'], | ||
dest: 'lib/<%= pkg.name %>.js' | ||
} | ||
}, | ||
uglify: { | ||
options: { | ||
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n' | ||
}, | ||
dist: { | ||
files: { | ||
'lib/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>'] | ||
} | ||
} | ||
}, | ||
connect: { | ||
server: { | ||
options: { | ||
port: 8000, | ||
base: '.', | ||
keepalive: true | ||
} | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-contrib-connect'); | ||
|
||
grunt.registerTask('default', ['concat', 'uglify']); | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
files : { | ||
src: [ 'src/module.js', | ||
'src/common.js', | ||
'src/cards.js', | ||
'src/format.js', | ||
'src/validate.js', | ||
'src/form.js'], | ||
}, | ||
|
||
jshint: { | ||
all: { | ||
src: '<%= files.src %>' | ||
} | ||
}, | ||
|
||
concat: { | ||
dist: { | ||
src: '<%= files.src %>', | ||
dest: 'lib/<%= pkg.name %>.js' | ||
} | ||
}, | ||
|
||
uglify: { | ||
options: { | ||
preserveComments: false, | ||
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n', | ||
report: 'min', | ||
compress: { | ||
drop_console: true | ||
} | ||
}, | ||
dist: { | ||
files: { | ||
'lib/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>'] | ||
} | ||
} | ||
}, | ||
|
||
watch : { | ||
js: { | ||
files: '<%= files.src %>', | ||
tasks: ['jshint', 'concat'] | ||
} | ||
}, | ||
|
||
connect: { | ||
server: { | ||
options: { | ||
port: 8000, | ||
base: '.', | ||
keepalive: true | ||
} | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-contrib-connect'); | ||
|
||
grunt.registerTask('default', ['jshint', 'concat', 'uglify']); | ||
}; |
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
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
Oops, something went wrong.