Skip to content

Commit

Permalink
Adapted the structure better for bower, running grunt will now output…
Browse files Browse the repository at this point in the history
… latest files in dist
  • Loading branch information
robinwassen committed Jun 24, 2014
1 parent 0ecd26d commit 68fce13
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
10 changes: 9 additions & 1 deletion Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = (grunt) ->
# Release
distTasks = ["coffee:release", "sass:release", "uglify", "cssmin"]
distTasks = ["coffee:release", "sass:release", "uglify", "cssmin", "copy:release"]

# Development
defaultTasks = ["coffee:development", "sass:development"]
Expand Down Expand Up @@ -42,6 +42,13 @@ module.exports = (grunt) ->
src: "<%= sass.release.dest %>"
dest: "dist/<%= pkg.version %>/css/<%= pkg.name %>-<%= pkg.version %>.min.css"

copy:
release:
files: [
{ src: "<%= uglify.release.dest %>", dest: "dist/ng-annotate-latest.min.js" }
{ src: "<%= cssmin.release.dest %>", dest: "dist/ng-annotate-latest.min.css" }
]

watch:
release:
files: ["<%= coffee.release.src %>", "<%= sass.release.src %>"]
Expand All @@ -61,6 +68,7 @@ module.exports = (grunt) ->
grunt.loadNpmTasks "grunt-contrib-sass"
grunt.loadNpmTasks "grunt-contrib-cssmin"
grunt.loadNpmTasks "grunt-contrib-connect"
grunt.loadNpmTasks "grunt-contrib-copy"

grunt.registerTask "default", defaultTasks
grunt.registerTask "dist", distTasks
Expand Down
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"example-app",
"dev",
"/css/",
"/js/"
"/js/",
"/dist/**/"
],
"dependencies": {
"angular": "~1.2.6"
Expand Down
1 change: 1 addition & 0 deletions dist/ng-annotate-latest.min.css

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

1 change: 1 addition & 0 deletions dist/ng-annotate-latest.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
Expand Up @@ -19,6 +19,7 @@
"grunt-contrib-watch": "0.6.x",
"grunt-contrib-sass": "0.7.x",
"grunt-contrib-cssmin": "0.9.x",
"grunt-contrib-connect": "0.7.0"
"grunt-contrib-connect": "0.7.0",
"grunt-contrib-copy": "0.5.0"
}
}

0 comments on commit 68fce13

Please sign in to comment.