Skip to content

Commit

Permalink
feat(Build): added tests, semantic-release, and greenkeeper
Browse files Browse the repository at this point in the history
  • Loading branch information
GarthDB committed Sep 7, 2016
1 parent f9b147f commit a3c4bc1
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 8 deletions.
20 changes: 20 additions & 0 deletions .cz-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'use strict';

module.exports = {

types: [
{value: 'feat', name: 'feat: A new feature'},
{value: 'fix', name: 'fix: A bug fix'},
{value: 'docs', name: 'docs: Documentation only changes'},
{value: 'style', name: 'style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)'},
{value: 'refactor', name: 'refactor: A code change that neither fixes a bug nor adds a feature'},
{value: 'perf', name: 'perf: A code change that improves performance'},
{value: 'test', name: 'test: Adding missing tests'},
{value: 'chore', name: 'chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation'},
{value: 'revert', name: 'revert: Revert to a commit'},
{value: 'WIP', name: 'WIP: Work in progress'}
],

allowBreakingChanges: ['feat', 'fix', 'perf']

};
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.DS_Store
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test
.*
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: node_js
node_js: "6"
after_success:
- npm run semantic-release
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
fonts
=====
# Topcoat Fonts

Fonts for topcoat theme
[![Build Status](https://travis-ci.org/topcoat/fonts.svg?branch=master)](https://travis-ci.org/topcoat/fonts) [![npm version](https://badge.fury.io/js/topcoat-fonts.svg)](https://badge.fury.io/js/topcoat-fonts)

---

Font for use with Topcoat components in the default themes.
44 changes: 39 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,52 @@
{
"name": "topcoat-fonts",
"version": "0.2.4",
"description": "Fonts for use with Topcoat",
"main": "src/fonts.css",
"style": "src/fonts.css",
"scripts": {
"test": "ava",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"repository": {
"type": "git",
"url": "git://github.com/topcoat/fonts.git"
"url": "https://github.com/topcoat/fonts.git"
},
"keywords": [
"fonts",
"topcoat",
"css"
],
"author": "@dam",
"license": "Apache2"
"author": "Kristofer Joseph <[email protected]> (http://kristoferjoseph.com/)",
"contributors": [
"Garth Braithwaite <[email protected]> (http://garthdb.com)"
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/topcoat/topcoat/issues"
},
"ava": {
"require": [
"babel-register"
],
"babel": "inherit"
},
"babel": {
"presets": [
"es2015"
]
},
"devDependencies": {
"ava": "^0.16.0",
"babel-cli": "^6.14.0",
"babel-core": "^6.14.0",
"babel-preset-es2015": "^6.14.0",
"babel-register": "^6.14.0",
"cz-customizable": "^4.0.0",
"resin": "^1.1.0",
"semantic-release": "^4.3.5"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-customizable"
}
}
}
16 changes: 16 additions & 0 deletions test/example.expected.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@font-face {
font-family: "Source Sans Pro";
src: url('../font/SourceSansPro-Regular.otf');
}

@font-face {
font-family: "Source Sans Pro";
src: url('../font/SourceSansPro-Light.otf');
font-weight: 200;
}

@font-face {
font-family: "Source Sans Pro";
src: url('../font/SourceSansPro-Semibold.otf');
font-weight: 600;
}
15 changes: 15 additions & 0 deletions test/fonts.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import test from 'ava';
import resin from 'resin';
import fs from 'fs';

test('compilation', t => {
const input = '../src/fonts.css';
const expected = fs.readFileSync('./example.expected.css','utf-8').trim();
return resin({
src: input,
vars: true,
extend: true
}).then(result => {
t.is(result.css.trim(), expected);
});
});

0 comments on commit a3c4bc1

Please sign in to comment.