Skip to content

Commit

Permalink
Compile files to dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorsmith committed Apr 11, 2014
1 parent a40b283 commit 55ddea1
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions Gruntfile.js
@@ -1,7 +1,7 @@
module.exports = function (grunt) {
'use strict';

var addBanner = function (content, srcPath) {
var addBanner = function (content) {
var banner = grunt.config.get('banner');
banner = grunt.template.process(banner);
return banner.concat('\n', content);
Expand All @@ -18,20 +18,9 @@ module.exports = function (grunt) {
clean: ['build', 'pkg'],

copy: {
README: {
src: 'README.md',
dest: 'build/README.md'
},
js: {
src: 'src/retina.js',
dest: 'build/js/retina-<%= pkg.version %>.js',
options: {
process: addBanner
}
},
less: {
src: 'src/retina.less',
dest: 'build/less/retina-<%= pkg.version %>.less',
dest: 'dist/retina.js',
options: {
process: addBanner
}
Expand All @@ -40,8 +29,11 @@ module.exports = function (grunt) {

uglify: {
build: {
options: {
banner: '<%= banner %>'
},
files: {
'build/js/retina-<%= pkg.version %>.min.js': ['src/retina.js']
'dist/retina.min.js': 'dist/retina.js'
}
}
},
Expand All @@ -51,9 +43,12 @@ module.exports = function (grunt) {
options: {
archive: 'pkg/retina-<%= pkg.version %>.zip'
},
files: [
{src: ['**'], cwd: 'build/', dest: '/', expand: true }
]
files: [{
src: ['**'],
cwd: 'dist/',
dest: '/',
expand: true
}]
}
}
});
Expand Down

1 comment on commit 55ddea1

@rbelouin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at #153 ;)

Please sign in to comment.