Grunt 0.4.
parent
3adc2a586a
commit
cca310a4be
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"browser": true,
|
||||
"white": false,
|
||||
"smarttabs": true,
|
||||
"eqeqeq": true,
|
||||
"immed": true,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"undef": true,
|
||||
"jquery": true,
|
||||
"globals": {
|
||||
"Modernizr": true
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
// gruntjs.com
|
||||
|
||||
/*jshint node:true*/
|
||||
module.exports = function(grunt) {
|
||||
'use strict';
|
||||
|
||||
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
|
||||
|
||||
grunt.initConfig({
|
||||
cmpnt: grunt.file.readJSON('../component.json'),
|
||||
banner: '/*! Social Likes v<%= cmpnt.version %> by Artem Sapegin - ' +
|
||||
'http://sapegin.github.com/social-likes - Licensed MIT */',
|
||||
jshint: {
|
||||
options: {
|
||||
jshintrc: '.jshintrc'
|
||||
},
|
||||
files: [
|
||||
'grunt.js',
|
||||
'social-likes.js'
|
||||
]
|
||||
},
|
||||
uglify: {
|
||||
options: {
|
||||
banner: '<%= banner %>'
|
||||
},
|
||||
dist: {
|
||||
src: 'social-likes.js',
|
||||
dest: '../social-likes.min.js'
|
||||
}
|
||||
},
|
||||
stylus: {
|
||||
compile: {
|
||||
files: {
|
||||
'../social-likes.css': 'styles/index.styl'
|
||||
},
|
||||
options: {
|
||||
'include css': true,
|
||||
'urlfunc': 'embedurl'
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
stylus: {
|
||||
files: 'styles/**',
|
||||
tasks: 'stylus'
|
||||
}
|
||||
},
|
||||
imgo: {
|
||||
imgo: {
|
||||
src: 'icons/*.png',
|
||||
skip: require('os').platform() === 'win32'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.registerTask('default', ['jshint', 'uglify', 'imgo', 'stylus']);
|
||||
|
||||
};
|
85
src/grunt.js
85
src/grunt.js
|
@ -1,85 +0,0 @@
|
|||
/**
|
||||
How to build this project?
|
||||
|
||||
1. Install Grunt:
|
||||
npm install grunt -g
|
||||
mkdir node_modules
|
||||
npm install grunt-stylus grunt-imgo
|
||||
|
||||
2. Build:
|
||||
grunt
|
||||
*/
|
||||
|
||||
/*global module:false*/
|
||||
/*jshint node:true*/
|
||||
module.exports = function(grunt) {
|
||||
'use strict';
|
||||
|
||||
// Project configuration
|
||||
grunt.initConfig({
|
||||
cmpnt: '<json:../component.json>',
|
||||
meta: {
|
||||
banner: "/*! Social Likes v<%= cmpnt.version %> by Artem Sapegin - " +
|
||||
"http://sapegin.github.com/social-likes - " +
|
||||
"Licensed MIT */"
|
||||
},
|
||||
lint: {
|
||||
files: [
|
||||
'grunt.js',
|
||||
'social-likes.js'
|
||||
]
|
||||
},
|
||||
min: {
|
||||
dist: {
|
||||
src: ['<banner:meta.banner>', 'social-likes.js'],
|
||||
dest: '../social-likes.min.js'
|
||||
}
|
||||
},
|
||||
stylus: {
|
||||
compile: {
|
||||
files: {
|
||||
'../social-likes.css': 'styles/index.styl'
|
||||
},
|
||||
options: {
|
||||
'compress': true,
|
||||
'include css': true,
|
||||
'urlfunc': 'embedurl'
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
stylus: {
|
||||
files: 'styles/**',
|
||||
tasks: 'stylus'
|
||||
}
|
||||
},
|
||||
jshint: {
|
||||
options: {
|
||||
browser: true,
|
||||
white: false,
|
||||
smarttabs: true,
|
||||
eqeqeq: true,
|
||||
immed: true,
|
||||
latedef: true,
|
||||
newcap: true,
|
||||
undef: true
|
||||
},
|
||||
globals: {
|
||||
jQuery: true}
|
||||
},
|
||||
imgo: {
|
||||
imgo: {
|
||||
files: 'icons/*.png',
|
||||
skip: require('os').platform() === 'win32'
|
||||
}
|
||||
},
|
||||
uglify: {}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-stylus');
|
||||
grunt.loadNpmTasks('grunt-imgo');
|
||||
|
||||
// Default task
|
||||
grunt.registerTask('default', 'lint min imgo stylus');
|
||||
|
||||
};
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "social-likes",
|
||||
"version": "0.0.0",
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.0",
|
||||
"grunt-contrib-jshint": "~0.1.1",
|
||||
"grunt-contrib-uglify": "~0.1.1",
|
||||
"grunt-contrib-watch": "~0.2.0",
|
||||
"grunt-contrib-stylus": "~0.4.0",
|
||||
"grunt-imgo": "~0.1.0",
|
||||
"matchdep": "~0.1.1"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue