Skip to content

Commit

Permalink
feat(Build): added semantic-release and greenkeeper
Browse files Browse the repository at this point in the history
  • Loading branch information
GarthDB committed Sep 6, 2016
1 parent b05044a commit 5255796
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 60 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: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Topcoat Variables Shared
========================
# Topcoat Variables Shared

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

[![NPM](https://nodei.co/npm/topcoat-variables-shared.png)](https://nodei.co/npm/topcoat-variables-shared/)
---

Shared variables for theme.
42 changes: 35 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,52 @@
{
"name": "topcoat-variables-shared",
"version": "0.1.4",
"description": "Shared variables for Topcoat theme",
"main": "index.html",
"style": "src/variables-shared",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "ava",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"repository": {
"type": "git",
"url": "git://github.com/topcoat/variables-shared.git"
"url": "https://github.com/topcoat/variables-shared.git"
},
"keywords": [
"variables",
"theme",
"topcoat"
],
"author": "@dam Kristofer Joseph",
"license": "Apache2",
"author": "Kristofer Joseph <kristoferjoseph@gmail.com> (http://kristoferjoseph.com/)",
"contributors": [
"Garth Braithwaite <garthdb@gmail.com> (http://garthdb.com)"
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/topcoat/variables-shared/issues"
"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"
}
}
}
79 changes: 30 additions & 49 deletions src/variables-shared.css
Original file line number Diff line number Diff line change
@@ -1,51 +1,32 @@
/**
*
* Copyright 2012 Adobe Systems Inc.;
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

:root {
var-font-weight--cta: 500;
var-overflow: hidden;
var-radio-offset: -109px;
var-radio-offset--checked: -74px;
var-radio-width: 37px;
var-radio-bgsize: var(radio-width);
var-radio-height: 31px;
var-radio-line-height: var(radio-height);
var-radio-margin: 15px;
var-overlay-bg-color: rgba(88, 90, 92, 0.7);
var-overlay-bg-box-shadow: inset 0px 0px 115px 0px #000000;
var-font-size--textarea--large: 1.3rem;
var-line-height--large: 1.3rem;
var-margin: 0;
var-bar-border-radius : 12px;
var-bar-width : 250px;
var-bar-height : 1.25rem;
var-progress-border-radius: 12px 0 0 12px;
var-content--switch__label--left: 'ON';
var-content--switch__label--right: 'OFF';
var-margin-bottom--switch__toggle: -1px;
var-margin-top--switch__toggle: -1px;
var-transition--switch__toggle: margin-left 0.05s ease-in-out;
var-margin-bottom--switch__toggle: -1px;
var-margin-top--switch__toggle: -1px;
var-padding--notification: 0.15em 0.5em 0.2em;
var-margin--notification: 5px;
var-border-radius--notification: 2px;
var-color--notification: #fff;
var-search-icon: url("../img/search.svg");
--font-weight--cta: 500;
--overflow: hidden;
--radio-offset: -109px;
--radio-offset--checked: -74px;
--radio-width: 37px;
--radio-bgsize: var(--radio-width);
--radio-height: 31px;
--radio-line-height: var(--radio-height);
--radio-margin: 15px;
--overlay-bg-color: rgba(88, 90, 92, 0.7);
--overlay-bg-box-shadow: inset 0px 0px 115px 0px #000000;
--font-size--textarea--large: 1.3rem;
--line-height--large: 1.3rem;
--margin: 0;
--bar-border-radius : 12px;
--bar-width : 250px;
--bar-height : 1.25rem;
--progress-border-radius: 12px 0 0 12px;
--content--switch__label--left: 'ON';
--content--switch__label--right: 'OFF';
--margin-bottom--switch__toggle: -1px;
--margin-top--switch__toggle: -1px;
--transition--switch__toggle: margin-left 0.05s ease-in-out;
--margin-bottom--switch__toggle: -1px;
--margin-top--switch__toggle: -1px;
--padding--notification: 0.15em 0.5em 0.2em;
--margin--notification: 5px;
--border-radius--notification: 2px;
--color--notification: #fff;
--search-icon: url("../img/search.svg");
}

32 changes: 32 additions & 0 deletions test/example.expected.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
:root {
font-weight-cta: 500;
overflow: hidden;
radio-offset: -109px;
radio-offset-checked: -74px;
radio-width: 37px;
radio-bgsize: 37px;
radio-height: 31px;
radio-line-height: 31px;
radio-margin: 15px;
overlay-bg-color: rgba(88, 90, 92, .7);
overlay-bg-box-shadow: inset 0px 0px 115px 0px #000;
font-size-textarea-large: 1.3rem;
line-height-large: 1.3rem;
margin: 0;
bar-border-radius: 12px;
bar-width: 250px;
bar-height: 1.25rem;
progress-border-radius: 12px 0 0 12px;
content-switch__label-left: 'ON';
content-switch__label-right: 'OFF';
margin-bottom-switch__toggle: -1px;
margin-top-switch__toggle: -1px;
transition-switch__toggle: margin-left .05s ease-in-out;
margin-bottom-switch__toggle: -1px;
margin-top-switch__toggle: -1px;
padding-notification: .15em .5em .2em;
margin-notification: 5px;
border-radius-notification: 2px;
color-notification: #fff;
search-icon: url("../img/search.svg");
}
32 changes: 32 additions & 0 deletions test/example.fixture.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
:root {
font-weight-cta: var(--font-weight--cta);
overflow: var(--overflow);
radio-offset: var(--radio-offset);
radio-offset-checked: var(--radio-offset--checked);
radio-width: var(--radio-width);
radio-bgsize: var(--radio-bgsize);
radio-height: var(--radio-height);
radio-line-height: var(--radio-line-height);
radio-margin: var(--radio-margin);
overlay-bg-color: var(--overlay-bg-color);
overlay-bg-box-shadow: var(--overlay-bg-box-shadow);
font-size-textarea-large: var(--font-size--textarea--large);
line-height-large: var(--line-height--large);
margin: var(--margin);
bar-border-radius: var(--bar-border-radius);
bar-width: var(--bar-width);
bar-height: var(--bar-height);
progress-border-radius: var(--progress-border-radius);
content-switch__label-left: var(--content--switch__label--left);
content-switch__label-right: var(--content--switch__label--right);
margin-bottom-switch__toggle: var(--margin-bottom--switch__toggle);
margin-top-switch__toggle: var(--margin-top--switch__toggle);
transition-switch__toggle: var(--transition--switch__toggle);
margin-bottom-switch__toggle: var(--margin-bottom--switch__toggle);
margin-top-switch__toggle: var(--margin-top--switch__toggle);
padding-notification: var(--padding--notification);
margin-notification: var(--margin--notification);
border-radius-notification: var(--border-radius--notification);
color-notification: var(--color--notification);
search-icon: var(--search-icon);
}
16 changes: 16 additions & 0 deletions test/variables-shared.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import test from 'ava';
import resin from 'resin';
import fs from 'fs';

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

0 comments on commit 5255796

Please sign in to comment.