Skip to content

Commit d86506a

Browse files
committed
Grunt Banner
1 parent e2474cc commit d86506a

File tree

4 files changed

+142
-6
lines changed

4 files changed

+142
-6
lines changed

Gruntfile.js

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
module.exports = function(grunt) {
1+
module.exports = function (grunt) {
22

33
grunt.initConfig({
4+
pkg: grunt.file.readJSON('package.json'),
45
less: {
56
development: {
7+
options: {
8+
plugins: [
9+
new (require('less-plugin-autoprefix'))({browsers: ["last 2 versions"]})
10+
],
11+
},
612
files: {
713
'dist/device-mockups.css': 'src/device-mockups.less'
814
}
@@ -14,12 +20,25 @@ module.exports = function(grunt) {
1420
'dist/device-mockups.min.css': ['dist/device-mockups.css']
1521
}
1622
}
23+
},
24+
usebanner: {
25+
taskName: {
26+
options: {
27+
position: 'top',
28+
banner: '/*!\n * <%= pkg.name %> (<%= pkg.link %>)\n * Copyright 2013 - <%= grunt.template.today("yyyy") %> pixelsign\n * Licensed under MIT (https://github.com/pixelsign/html5-device-mockups/blob/master/LICENSE.txt)\n * Last Build: <%= grunt.template.today() %>\n */',
29+
linebreak: true
30+
},
31+
files: {
32+
src: ['dist/device-mockups.css']
33+
}
34+
}
1735
}
1836
});
1937

2038
grunt.loadNpmTasks('grunt-contrib-less');
2139
grunt.loadNpmTasks('grunt-contrib-cssmin');
40+
grunt.loadNpmTasks('grunt-banner');
2241

23-
grunt.registerTask('default', ['less', 'cssmin']);
42+
grunt.registerTask('default', ['less', 'cssmin', 'usebanner']);
2443

25-
};
44+
};

dist/device-mockups.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*!
2+
* html5-device-mockups (https://github.com/pixelsign/html5-device-mockups)
3+
* Copyright 2013 - 2017 pixelsign
4+
* Licensed under MIT (https://github.com/pixelsign/html5-device-mockups/blob/master/LICENSE.txt)
5+
* Last Build: Fri Jul 28 2017 18:38:58
6+
*/
17
.device-wrapper {
28
max-width: 300px;
39
width: 100%;

package-lock.json

Lines changed: 109 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
"license": "ISC",
1111
"devDependencies": {
1212
"grunt": "^1.0.1",
13+
"grunt-banner": "^0.6.0",
1314
"grunt-contrib-cssmin": "^2.1.0",
14-
"grunt-contrib-less": "^1.4.1"
15-
}
15+
"grunt-contrib-less": "^1.4.1",
16+
"less-plugin-autoprefix": "^1.5.1"
17+
},
18+
"link": "https://github.com/pixelsign/html5-device-mockups"
1619
}

0 commit comments

Comments
 (0)