Skip to content

Commit

Permalink
added grunt-uglify. updated version 0.2.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
kelp404 committed Jul 16, 2014
1 parent ca5e511 commit a4029e3
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 46 deletions.
35 changes: 22 additions & 13 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
module.exports = (grunt) ->
# -----------------------------------
# Options
# -----------------------------------
grunt.config.init
compass:
dev:
options:
sassDir: './example'
cssDir: './example'
sassDir: 'example'
cssDir: 'example'
outputStyle: 'compressed'

coffee:
source:
files:
'./dist/angular-validator.js': ['./src/*.coffee']
'dist/angular-validator.js': ['src/*.coffee']
rules:
files:
'./dist/angular-validator-rules.js': ['./rules/*.coffee']
'dist/angular-validator-rules.js': ['rules/*.coffee']
demo:
files:
'./example/demo.js': './example/demo.coffee'
'example/demo.js': 'example/demo.coffee'

uglify:
build:
files:
'dist/angular-validator.min.js': 'dist/angular-validator.js'
'dist/angular-validator-rules.min.js': 'dist/angular-validator-rules.js'

watch:
compass:
files: ['./example/*.scss']
files: ['example/*.scss']
tasks: ['compass']
options:
spawn: no
coffee:
files: ['./src/*.coffee', './rules/*.coffee', './example/*.coffee']
files: ['src/*.coffee', 'rules/*.coffee', 'example/*.coffee']
tasks: ['coffee']
options:
spawn: no
Expand All @@ -43,9 +46,9 @@ module.exports = (grunt) ->

karma:
ng1_2:
configFile: './test/karma-ng1.2.config.coffee'
configFile: 'test/karma-ng1.2.config.coffee'
ng1_2_min:
configFile: './test/karma-ng1.2.min.config.coffee'
configFile: 'test/karma-ng1.2.min.config.coffee'

# -----------------------------------
# register task
Expand All @@ -56,6 +59,11 @@ module.exports = (grunt) ->
'connect'
'watch'
]
grunt.registerTask 'build', [
'compass'
'coffee'
'uglify'
]
grunt.registerTask 'test', ['karma']

# -----------------------------------
Expand All @@ -65,4 +73,5 @@ module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.loadNpmTasks 'grunt-karma'
grunt.loadNpmTasks 'grunt-karma'
grunt.loadNpmTasks 'grunt-contrib-uglify'
15 changes: 2 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,7 @@ $ bower install
```bash
# run the local server and the file watcher to compile CoffeeScript
$ grunt dev
# compile coffee script and minify
$ grunt build
```




###[Closure Compiler](https://code.google.com/p/closure-compiler/)
You could download compiler form [Google Code](https://code.google.com/p/closure-compiler/wiki/BinaryDownloads?tm=2).

**[External Tools](http://www.jetbrains.com/pycharm/webhelp/external-tools.html):**

Settings | value
:---------:|:---------:
Program | java
Parameters | -jar /Volumes/Data/tools/closure-compiler/compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS --js $FileName$ --js_output_file $FileNameWithoutExtension$.min.$FileExt$
Working directory | $FileDir$
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-validator",
"version": "0.2.1",
"version": "0.2.3",
"main": [
"./dist/angular-validator.js",
"./dist/angular-validator-rules.js"
Expand All @@ -21,7 +21,7 @@
"tests"
],
"dependencies": {
"angular": "1.2.18",
"angular-mocks": "1.2.18"
"angular": ">=1.2.18",
"angular-mocks": ">=1.2.18"
}
}
3 changes: 1 addition & 2 deletions dist/angular-validator-rules.min.js

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

15 changes: 1 addition & 14 deletions dist/angular-validator.min.js

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-validator",
"version": "0.2.1",
"version": "0.2.3",
"description": "AngularJS validator.",
"homepage": "https://github.com/kelp404/angular-validator",
"repository": {
Expand Down Expand Up @@ -39,6 +39,7 @@
"grunt-contrib-coffee": "~0.10.0",
"grunt-contrib-compass": "^0.9.0",
"grunt-contrib-connect": "^0.8.0",
"grunt-contrib-uglify": "^0.5.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-karma": "^0.8.3",
"karma": "^0.12.16",
Expand Down

0 comments on commit a4029e3

Please sign in to comment.