-
Notifications
You must be signed in to change notification settings - Fork 862
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from alexwolfe/buttons-2
Buttons 2
- Loading branch information
Showing
179 changed files
with
35,324 additions
and
4,056 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
.sass-cache | ||
.DS_Store | ||
*.psd | ||
node_modules | ||
node_modules | ||
showcase/css/showcase.css.map | ||
showcase-dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
language: node_js | ||
node_js: | ||
- 0.10 | ||
before_script: | ||
- npm install -g grunt-cli | ||
|
||
env: | ||
global: | ||
- secure: UpriWPnu18P/BWtqzKCCSta9921Z2947bTuniQoDc/ywFrC1Kpix4BL98fT3IB/8z4B3S+vXLbe+3qSeltjX2tNtYCY0JLkS9gijXrYLp7buphkBMdMPdTmEFM66iTwy2YD71XCqrh7fViuE5uMR4MHKRq3RCBeXrsQO8YcKUig= | ||
- secure: HKlIRHrUj3uTOstiY8BLWAZqpiUXOaS6DhP0IIUCJ6JLWoFGm91l9sr2mR+sRcRdQ13oMTV0rXEZQ3uMJrTpxNv5jt7/QFpwi1m62RkyUwqTWCmPgduQ9HKqPKkw4xA+UXRHqv+I2sLFCamts9OFErqPTEWMJDKEfilLOqmsrUE= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,277 @@ | ||
module.exports = function (grunt) { | ||
/** | ||
* Load Grunt Npm Modules | ||
* | ||
*/ | ||
grunt.loadNpmTasks('grunt-autoprefixer'); | ||
grunt.loadNpmTasks('grunt-contrib-sass'); | ||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-contrib-connect'); | ||
grunt.loadNpmTasks('grunt-contrib-copy'); | ||
grunt.loadNpmTasks('grunt-contrib-cssmin'); | ||
grunt.loadNpmTasks('grunt-saucelabs'); | ||
grunt.loadNpmTasks('grunt-contrib-qunit'); | ||
grunt.loadNpmTasks('grunt-includes'); | ||
|
||
/** | ||
* Grunt Configuration | ||
* | ||
*/ | ||
grunt.initConfig({ | ||
|
||
/* | ||
* Template Includes | ||
* | ||
*/ | ||
|
||
includes: { | ||
build: { | ||
cwd: 'showcase/pages', | ||
src: ['*.html' ], | ||
dest: 'showcase/', | ||
options: { | ||
includePath: 'showcase/includes' | ||
} | ||
} | ||
}, | ||
|
||
|
||
/* | ||
* Sass Compilation | ||
* | ||
*/ | ||
|
||
sass: { | ||
all: { | ||
files: { | ||
'tmp/css/buttons.css': 'scss/buttons.scss', | ||
'tmp/css/showcase.css': 'showcase/scss/showcase.scss' | ||
} | ||
} | ||
}, | ||
|
||
|
||
/* | ||
* Vendor Prefixing | ||
* | ||
*/ | ||
|
||
autoprefixer: { | ||
options: { | ||
browsers: ['last 3 versions', 'safari 5', 'ie 8', 'ie 9', 'Firefox >= 20'] | ||
}, | ||
all: { | ||
expand: true, | ||
flatten: true, | ||
src: 'tmp/css/*.css', | ||
dest: 'tmp/css' | ||
} | ||
}, | ||
|
||
|
||
/* | ||
* Minify files | ||
* | ||
*/ | ||
|
||
cssmin: { | ||
add_banner: { | ||
options: { | ||
banner: '/* Buttons */', | ||
keepSpecialComments: 1 | ||
}, | ||
files: { | ||
'tmp/css/buttons.min.css': ['tmp/css/buttons.css'] | ||
} | ||
} | ||
}, | ||
|
||
/* | ||
* Copy files | ||
* | ||
*/ | ||
|
||
copy: { | ||
css_library: { | ||
files: [{ | ||
expand: true, | ||
cwd: 'tmp/css', | ||
src: ['**/*', '!showcase.css', '!showcase.css.map'], | ||
dest: 'css' | ||
}] | ||
}, | ||
css_showcase: { | ||
files: [{ | ||
expand: true, | ||
cwd: 'tmp/css', | ||
src: ['**/*', '!buttons.min.css', '!buttons.css.map'], | ||
dest: 'showcase/css' | ||
}] | ||
}, | ||
js_showcase: { | ||
files: [{ | ||
expand: true, | ||
cwd: 'js', | ||
src: ['**/*'], | ||
dest: 'showcase/js' | ||
}] | ||
}, | ||
showcase_dist: { | ||
files: [{ | ||
expand: true, | ||
cwd: 'showcase', | ||
src: ['*.html', 'css/**/*', 'fonts/**/*', 'images/**/*', 'js/**/*'], | ||
dest: 'showcase-dist' | ||
}] | ||
} | ||
}, | ||
|
||
|
||
/* | ||
* Clean tmp folders | ||
* | ||
*/ | ||
|
||
clean: { | ||
dev: { | ||
src: ["tmp"] | ||
}, | ||
build: { | ||
src: ["showcase-dist"] | ||
} | ||
}, | ||
|
||
|
||
/* | ||
* Launch local server | ||
* | ||
*/ | ||
|
||
connect: { | ||
livereload: { | ||
options: { | ||
port: 8000, | ||
livereload: 35729, // change this to '0.0.0.0' to access the server from outside | ||
hostname: 'localhost', | ||
base: 'showcase', | ||
open: true | ||
} | ||
}, | ||
sauce: { | ||
options: { | ||
port: 9999, | ||
hostname: 'localhost', | ||
base: '', | ||
} | ||
} | ||
}, | ||
|
||
|
||
/* | ||
* Watch for changes | ||
* | ||
*/ | ||
|
||
watch: { | ||
scripts: { | ||
files: ['js/**/*.js'], | ||
tasks: ['copy:main:js_showcase', 'clean:dev'] | ||
}, | ||
sass: { | ||
files: ['scss/**/*.scss', 'showcase/scss/**/*.scss'], | ||
tasks: ['sass', 'autoprefixer', 'copy:css_showcase', 'copy:css_library', 'clean:dev'] | ||
}, | ||
includes: { | ||
files: ['showcase/includes/**/*.html', 'showcase/pages/**/*.html'], | ||
tasks: ['includes'] | ||
}, | ||
livereload: { | ||
options: { | ||
livereload: '<%= connect.livereload.options.livereload %>' | ||
}, | ||
files: [ | ||
'scss/**/*.scss', | ||
'css/**/*.css', | ||
'js/**/*', | ||
'showcase/**/*' | ||
] | ||
} | ||
}, | ||
|
||
|
||
/* | ||
* QUnit | ||
* | ||
*/ | ||
|
||
qunit: { | ||
options: { | ||
urls:[ | ||
'http://localhost:9999/js/tests/*.html' | ||
] | ||
} | ||
}, | ||
|
||
/* | ||
* Saucelabs | ||
* Requires environment variables set e.g. export SAUCE_USERNAME=XX; export SAUCE_ACCESS_KEY=XX | ||
* | ||
*/ | ||
'saucelabs-qunit': { //DO NOT CHANGE NAME | ||
all: { | ||
options: { | ||
build: process.env.TRAVIS_JOB_ID, | ||
concurrency: 3, | ||
tunnelTimeout: 5, | ||
urls: ['http://localhost:9999/tests/index.html'], | ||
testname: 'Buttons Sauce Unit Tests', | ||
browsers: [ | ||
{ | ||
browserName: 'safari', | ||
version: '6', | ||
platform: 'OS X 10.8' | ||
}, | ||
{ | ||
browserName: 'firefox', | ||
version: '25', | ||
platform: 'OS X 10.6' | ||
}, | ||
{ | ||
browserName: 'chrome', | ||
version: '31', | ||
platform: 'Windows 8.1' | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}); | ||
|
||
|
||
/** | ||
* Grunt Helper Tasks | ||
* | ||
*/ | ||
|
||
grunt.registerTask('test', 'qunit'); | ||
grunt.registerTask('sauceserver', 'connect:sauce'); | ||
grunt.registerTask('sauce', 'saucelabs-qunit'); | ||
var testSubtasks = ['test']; | ||
if (process.env.SAUCE_ACCESS_KEY !== undefined) { | ||
testSubtasks.push('sauceserver'); | ||
testSubtasks.push('sauce'); | ||
} | ||
grunt.registerTask('copyMain', ['copy:css_library', 'copy:css_showcase', 'copy:js_showcase']); | ||
|
||
|
||
/** | ||
* Grunt Core Build Tasks | ||
* | ||
*/ | ||
|
||
grunt.registerTask('default', ['sass', 'autoprefixer', 'cssmin', 'copyMain', 'clean:dev']); | ||
grunt.registerTask('dev', ['includes', 'sass', 'autoprefixer', 'cssmin', 'copyMain', 'clean:dev', 'connect', 'watch']); | ||
grunt.registerTask('dist', ['clean:build', 'includes', 'sass', 'autoprefixer', 'cssmin', 'copyMain', 'copy:showcase_dist', 'clean:dev']); | ||
grunt.registerTask('tests', testSubtasks); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.