Skip to content

Commit

Permalink
update organization files to latest 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
m5o committed Aug 20, 2013
1 parent 800b804 commit 328a768
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 10 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -2,6 +2,7 @@ language: node_js
node_js:
- 0.8
before_script:
- gem install jekyll
- npm install -g grunt-cli
env:
global:
Expand Down
54 changes: 47 additions & 7 deletions Gruntfile.js
Expand Up @@ -83,6 +83,25 @@ module.exports = function(grunt) {
},
src: ['less/bootstrap.less'],
dest: 'dist/css/<%= pkg.name %>.min.css'
},
theme: {
src: ['less/theme.less'],
dest: 'dist/css/<%= pkg.name %>-theme.css'
},
theme_min: {
options: {
compress: true
},
src: ['less/theme.less'],
dest: 'dist/css/<%= pkg.name %>-theme.min.css'
}
},

copy: {
fonts: {
expand: true,
src: ["fonts/*"],
dest: 'dist/'
}
},

Expand All @@ -102,6 +121,19 @@ module.exports = function(grunt) {
}
},

jekyll: {
docs: {}
},

validation: {
options: {
reset: true
},
files: {
src: ["_gh_pages/**/*.html"]
}
},

watch: {
src: {
files: '<%= jshint.src.src %>',
Expand All @@ -123,16 +155,21 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-html-validation');
grunt.loadNpmTasks('grunt-jekyll');
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('browserstack-runner');

// Docs HTML validation task
grunt.registerTask('validate-html', ['jekyll', 'validation']);

// Test task.
var testSubtasks = ['jshint', 'qunit'];
var testSubtasks = ['dist-css', 'jshint', 'qunit', 'validate-html'];
// Only run BrowserStack tests under Travis
if (process.env.TRAVIS) {
// Only run BrowserStack tests if this is a mainline commit in twbs/bootstrap, or you have your own BrowserStack key
Expand All @@ -148,11 +185,14 @@ module.exports = function(grunt) {
// CSS distribution task.
grunt.registerTask('dist-css', ['recess']);

// Fonts distribution task.
grunt.registerTask('dist-fonts', ['copy']);

// Full distribution task.
grunt.registerTask('dist', ['clean', 'dist-css', 'dist-js']);
grunt.registerTask('dist', ['clean', 'dist-css', 'dist-fonts', 'dist-js']);

// Default task.
grunt.registerTask('default', ['test', 'dist']);
grunt.registerTask('default', ['test', 'dist', 'build-customizer']);

// task for building customizer
grunt.registerTask('build-customizer', 'Add scripts/less files to customizer.', function () {
Expand All @@ -162,7 +202,7 @@ module.exports = function(grunt) {
var files = {}
fs.readdirSync(type)
.filter(function (path) {
return new RegExp('\\.' + type + '$').test(path)
return type == 'fonts' ? true : new RegExp('\\.' + type + '$').test(path)
})
.forEach(function (path) {
return files[path] = fs.readFileSync(type + '/' + path, 'utf8')
Expand All @@ -171,7 +211,7 @@ module.exports = function(grunt) {
}

var customize = fs.readFileSync('customize.html', 'utf-8')
var files = '<!-- generated -->\n<script id="files">\n' + getFiles('js') + getFiles('less') + '<\/script>\n<!-- /generated -->'
fs.writeFileSync('customize.html', customize.replace(/<!-- generated -->(.|[\n\r])*<!-- \/generated -->/, files))
var files = getFiles('js') + getFiles('less') + getFiles('fonts')
fs.writeFileSync('assets/js/raw-files.js', files)
});
};
};
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -54,6 +54,8 @@ SASS runs as a local GEM on your system. You can run `sass --watch lib/bootstrap

Have a bug or a feature request? [Please open a new issue](https://github.com/twbs/bootstrap/issues). Before opening any issue, please search for existing issues and read the [Issue Guidelines](https://github.com/necolas/issue-guidelines), written by [Nicolas Gallagher](https://github.com/necolas/).

You may use [this JS Bin](http://jsbin.com/aKiCIDO/1/edit) as a template for your bug reports.



## Documentation
Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,7 +1,7 @@
{
"name": "sass-bootstrap",
"version": "3.0.0",
"main": ["lib/bootstrap.scss" ],
"main": ["./dist/js/bootstrap.js", "./dist/css/bootstrap.css"],
"ignore": [
"**/.*"
],
Expand Down
14 changes: 13 additions & 1 deletion composer.json
Expand Up @@ -4,6 +4,18 @@
, "keywords": ["bootstrap", "css", "sass"]
, "homepage": "http://github.com/jlong/sass-twitter-bootstrap/"
, "author": "John W. Long"
, "authors": [
{
"name": "Mark Otto",
"email": "markdotto@gmail.com"
},
{
"name": "Jacob Thornton",
"email": "jacobthornton@gmail.com"
}
]
, "support": {
"issues": "https://github.com/twbs/bootstrap/issues"
}
, "license": "Apache-2.0"

}
5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -18,13 +18,16 @@
]
, "devDependencies": {
"grunt": "~0.4.1"
, "grunt-contrib-connect": "~0.3.0"
, "grunt-contrib-clean": "~0.5.0"
, "grunt-contrib-connect": "~0.3.0"
, "grunt-contrib-concat": "~0.3.0"
, "grunt-contrib-copy": "~0.4.0"
, "grunt-contrib-jshint": "~0.6.0"
, "grunt-contrib-uglify": "~0.2.2"
, "grunt-contrib-qunit": "~0.2.2"
, "grunt-contrib-watch": "~0.5.1"
, "grunt-html-validation": "git://github.com/praveenvijayan/grunt-html-validation.git"
, "grunt-jekyll": "~0.3.8"
, "grunt-recess": "~0.3.3"
, "browserstack-runner": "~0.0.11"
}
Expand Down

0 comments on commit 328a768

Please sign in to comment.