Skip to content

Commit

Permalink
Added package.json (for npm) and component.json (for bower).
Browse files Browse the repository at this point in the history
Building with global variables is successful.
TravisCI should build correctly.
  • Loading branch information
frapontillo committed Feb 25, 2013
1 parent cb9827d commit d17bd2f
Show file tree
Hide file tree
Showing 12 changed files with 13,105 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
components
node_modules
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: node_js
node_js:
- "0.8.11"

before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm install -g grunt-cli recess

script: "grunt build"
65 changes: 65 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-clean');
// grunt.loadNpmTasks('grunt-contrib-uglify');

// Project configuration.
grunt.initConfig({
builddir: 'build',
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: '/**\n' +
' * <%= pkg.description %>\n' +
' * @version v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
' * @link <%= pkg.homepage %>\n' +
' * @license <%= pkg.license %>' + ' */'
},
build: {
cerulean:{}, amelia: {}
},
clean: {
build: {
src: ['*/build.less', '*/build-responsive.less',
'!global/build.less', '!global/build-responsive.less']
}
},
concat: {
dist: {
src: ['global/build.less'],
dest: ''
}
},
recess: {
dist: {
options: {
compile: true
},
files: {}
}
},
min: {
build: {
src: ['<banner:meta.banner>', '<config:concat.build.dest>'],
dest: '<%= builddir %>/<%= pkg.name %>.min.js'
}
}
});

grunt.registerMultiTask('build', 'build a theme', function() {
var theme = this.target;
grunt.log.writeln('building theme ' + this.target);

var concatDest = theme + '/build.less';

var recessDest = theme + '/' + theme + '.css';
var recessSrc = [ theme + '/' + 'build.less' ];

grunt.config('concat.dist.dest', concatDest);
var files = {}; files[recessDest] = recessSrc;
grunt.config('recess.dist.files', files);

grunt.task.run(['concat', 'recess:dist', 'clean:build']);
});
};
Loading

0 comments on commit d17bd2f

Please sign in to comment.