Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a Sass version with build test using Gulp #4

Merged
merged 1 commit into from
Apr 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.log
*~
node_modules/
build/
!.travis.yml
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: node_js
node_js:
- "6"
cache:
directories:
- node_modules
before_install:
- npm install -g npm
install:
- npm install
sudo: false
5 changes: 3 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "sportsfont",
"version": "1.0.0",
"version": "1.1.0",
"homepage": "https://github.com/jamesadevine/sportsfont",
"authors": [
"James Devine <[email protected]>"
"James Devine <[email protected]>",
"Émile Bergeron <[email protected]>"
],
"description": "A font that contains a number of sports icons for use in front end development",
"keywords": [
Expand Down
19 changes: 19 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
var gulp = require('gulp'),
sass = require('gulp-sass');

var paths = {
sass: 'scss/sports.scss',
build: 'build/'
};

gulp.task('sass', function() {
return gulp.src(paths.sass)
.pipe(sass({
outputStyle: "compact"
}))
.pipe(gulp.dest(paths.build));
});

gulp.task('test', ['sass']);

gulp.task('default', ['test']);
41 changes: 41 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "sportsfont",
"version": "1.1.0",
"description": "A font that contains a number of sports icons for use in front end development",
"scripts": {
"precommit": "npm test",
"test": "gulp test"
},
"repository": {
"type": "git",
"url": "https://github.com/jamesadevine/sportsfont.git"
},
"keywords": [
"icon",
"sports",
"flat",
"css",
"webfont"
],
"author": {
"name" : "James Devine",
"email": "[email protected]"
},
"contributors": [
{
"name": "Émile Bergeron",
"email": "[email protected]",
"url": "http://www.prismalstudio.com/"
}
],
"license": "MIT",
"bugs": {
"url": "https://github.com/jamesadevine/sportsfont/issues"
},
"homepage": "https://github.com/jamesadevine/sportsfont",
"devDependencies": {
"gulp": "^3.9.1",
"gulp-sass": "^2.3.2",
"husky": "^0.11.8"
}
}
170 changes: 170 additions & 0 deletions scss/sports.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
// Default Variables
$sports-font-path: "../font/" !default;
$sports-font-family: "sports" !default;
$sports-font-prefix: "icon-" !default;

@if $sports-font-family == "sports" {
@font-face {
font-family: '#{$sports-font-family}';
src: url('#{$sports-font-path}sports.eot?46107572');
src: url('#{$sports-font-path}sports.eot?46107572#iefix') format('embedded-opentype'),
url('#{$sports-font-path}sports.woff?46107572') format('woff'),
url('#{$sports-font-path}sports.ttf?46107572') format('truetype'),
url('#{$sports-font-path}sports.svg?46107572#sports') format('svg');
font-weight: normal;
font-style: normal;
}
}
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'sports';
src: url('../font/sports.svg?46107572#sports') format('svg');
}
}
*/

.#{$sports-font-prefix} {
&cricket,
&bicycle,
&baseball,
&golf,
&skiing,
&soccer,
&swimming,
&tennis,
&theatre,
&football,
&basketball-1,
&pitch,
&badminton,
&rowing,
&rugby,
&archery,
&baking,
&dance,
&bouldering,
&canoe,
&shooting,
&climbing,
&bowl,
&cycling,
&volleyball,
&unichallenge,
&trampoline,
&tabletennis,
&squash,
&sail,
&run,
&pool,
&goal,
&lacrosse,
&martial,
&hockey,
&frisbee,
&handball,
&fencing,
&horse,
&netball,
&darts,
&fulltime,
&halftime,
&kickoff,
&debate,
&starttime,
&cheerleader,
&pokemon,
&computer,
&boxing,
&croquet,
&cinema {
font-family: "sports";
font-style: normal;
font-weight: normal;
speak: none;

display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */

/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;

/* fix buttons height, for twitter bootstrap */
line-height: 1em;

/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin-left: .2em;

/* you can be more comfortable with increased icons size */
/* font-size: 120%; */

/* Font smoothing. That was taken from TWBS */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;

/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
}

.#{$sports-font-prefix}cricket:before { content: '\e800'; } /* '' */
.#{$sports-font-prefix}bicycle:before { content: '\e801'; } /* '' */
.#{$sports-font-prefix}baseball:before { content: '\e802'; } /* '' */
.#{$sports-font-prefix}golf:before { content: '\e803'; } /* '' */
.#{$sports-font-prefix}skiing:before { content: '\e804'; } /* '' */
.#{$sports-font-prefix}soccer:before { content: '\e805'; } /* '' */
.#{$sports-font-prefix}swimming:before { content: '\e806'; } /* '' */
.#{$sports-font-prefix}tennis:before { content: '\e807'; } /* '' */
.#{$sports-font-prefix}theatre:before { content: '\e808'; } /* '' */
.#{$sports-font-prefix}football:before { content: '\e809'; } /* '' */
.#{$sports-font-prefix}basketball-1:before { content: '\e80a'; } /* '' */
.#{$sports-font-prefix}pitch:before { content: '\e80b'; } /* '' */
.#{$sports-font-prefix}badminton:before { content: '\e80c'; } /* '' */
.#{$sports-font-prefix}rowing:before { content: '\e80d'; } /* '' */
.#{$sports-font-prefix}rugby:before { content: '\e80e'; } /* '' */
.#{$sports-font-prefix}archery:before { content: '\e80f'; } /* '' */
.#{$sports-font-prefix}baking:before { content: '\e810'; } /* '' */
.#{$sports-font-prefix}dance:before { content: '\e811'; } /* '' */
.#{$sports-font-prefix}bouldering:before { content: '\e812'; } /* '' */
.#{$sports-font-prefix}canoe:before { content: '\e813'; } /* '' */
.#{$sports-font-prefix}shooting:before { content: '\e814'; } /* '' */
.#{$sports-font-prefix}climbing:before { content: '\e815'; } /* '' */
.#{$sports-font-prefix}bowl:before { content: '\e816'; } /* '' */
.#{$sports-font-prefix}cycling:before { content: '\e817'; } /* '' */
.#{$sports-font-prefix}volleyball:before { content: '\e818'; } /* '' */
.#{$sports-font-prefix}unichallenge:before { content: '\e819'; } /* '' */
.#{$sports-font-prefix}trampoline:before { content: '\e81a'; } /* '' */
.#{$sports-font-prefix}tabletennis:before { content: '\e81b'; } /* '' */
.#{$sports-font-prefix}squash:before { content: '\e81c'; } /* '' */
.#{$sports-font-prefix}sail:before { content: '\e81d'; } /* '' */
.#{$sports-font-prefix}run:before { content: '\e81e'; } /* '' */
.#{$sports-font-prefix}pool:before { content: '\e81f'; } /* '' */
.#{$sports-font-prefix}goal:before { content: '\e820'; } /* '' */
.#{$sports-font-prefix}lacrosse:before { content: '\e821'; } /* '' */
.#{$sports-font-prefix}martial:before { content: '\e822'; } /* '' */
.#{$sports-font-prefix}hockey:before { content: '\e823'; } /* '' */
.#{$sports-font-prefix}frisbee:before { content: '\e824'; } /* '' */
.#{$sports-font-prefix}handball:before { content: '\e825'; } /* '' */
.#{$sports-font-prefix}fencing:before { content: '\e826'; } /* '' */
.#{$sports-font-prefix}horse:before { content: '\e827'; } /* '' */
.#{$sports-font-prefix}netball:before { content: '\e828'; } /* '' */
.#{$sports-font-prefix}darts:before { content: '\e829'; } /* '' */
.#{$sports-font-prefix}fulltime:before { content: '\e82a'; } /* '' */
.#{$sports-font-prefix}halftime:before { content: '\e82b'; } /* '' */
.#{$sports-font-prefix}kickoff:before { content: '\e82c'; } /* '' */
.#{$sports-font-prefix}debate:before { content: '\e82d'; } /* '' */
.#{$sports-font-prefix}starttime:before { content: '\e82e'; } /* '' */
.#{$sports-font-prefix}cheerleader:before { content: '\e82f'; } /* '' */
.#{$sports-font-prefix}pokemon:before { content: '\e830'; } /* '' */
.#{$sports-font-prefix}computer:before { content: '\e831'; } /* '' */
.#{$sports-font-prefix}boxing:before { content: '\e832'; } /* '' */
.#{$sports-font-prefix}croquet:before { content: '\e833'; } /* '' */
.#{$sports-font-prefix}cinema:before { content: '\e834'; } /* '' */