Skip to content

Commit

Permalink
Gruntfile and package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Long committed Mar 23, 2015
1 parent e5daa30 commit 7a2ff7a
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
79 changes: 79 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
module.exports = function(grunt) {

grunt.initConfig({
// Project configuration.
pkg: grunt.file.readJSON('package.json'),

// Compiles our Sass
sass: {
options: {
precision: 6,
sourceComments: false,
outputStyle: 'compressed'
},
dist: {
files: {
// 'css/gitscm.css': 'gitscm.css.scss'
'css/styles.css': 'sass/styles.scss'
}
}
},

// Handle vendor prefixing
autoprefixer: {
options: {
browsers: ['last 2 versions', 'ie 8', 'ie 9']
},
dist: {
src: 'css/*.css'
},
},

// Runs CSS reporting
parker: {
options: {
metrics: [
'TotalStylesheets',
'TotalStylesheetSize',
'TotalRules',
'TotalSelectors',
'TotalIdentifiers',
'TotalDeclarations',
'SelectorsPerRule',
'IdentifiersPerSelector',
'SpecificityPerSelector',
'TopSelectorSpecificity',
'TopSelectorSpecificitySelector',
'TotalIdSelectors',
'TotalUniqueColours',
'TotalImportantKeywords',
'TotalMediaQueries'
],
file: "css-stats.md",
usePackage: true
},
src: [
'css/*.css'
],
},

// Build tooling

watch: {
sass: {
files: 'scss/**/*.scss',
tasks: ['sass', 'autoprefixer', 'parker']
}
},
});

// Load dependencies
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-build-control');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-parker');
grunt.loadNpmTasks('grunt-sass');

// Generate and format the CSS
grunt.registerTask('default', ['sass', 'autoprefixer', 'parker']);
};
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "git-scm",
"version": "1.0.0",
"homepage": "http://git-scm.com",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-autoprefixer": "~2.2.0",
"grunt-build-control": "~0.2.0",
"grunt-parker": "~0.1.0",
"grunt-sass": "~0.18.0",
"grunt-contrib-watch": "~0.6.1"
}
}

0 comments on commit 7a2ff7a

Please sign in to comment.