Skip to content

Commit 5255796

Browse files
committed
feat(Build): added semantic-release and greenkeeper
1 parent b05044a commit 5255796

File tree

10 files changed

+178
-60
lines changed

10 files changed

+178
-60
lines changed

.cz-config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
'use strict';
2+
3+
module.exports = {
4+
5+
types: [
6+
{value: 'feat', name: 'feat: A new feature'},
7+
{value: 'fix', name: 'fix: A bug fix'},
8+
{value: 'docs', name: 'docs: Documentation only changes'},
9+
{value: 'style', name: 'style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)'},
10+
{value: 'refactor', name: 'refactor: A code change that neither fixes a bug nor adds a feature'},
11+
{value: 'perf', name: 'perf: A code change that improves performance'},
12+
{value: 'test', name: 'test: Adding missing tests'},
13+
{value: 'chore', name: 'chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation'},
14+
{value: 'revert', name: 'revert: Revert to a commit'},
15+
{value: 'WIP', name: 'WIP: Work in progress'}
16+
],
17+
18+
allowBreakingChanges: ['feat', 'fix', 'perf']
19+
20+
};

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.DS_Store

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
test
2+
.*

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
node_js: "6"
3+
after_success:
4+
- npm run semantic-release

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
Topcoat Variables Shared
2-
========================
1+
# Topcoat Variables Shared
32

4-
Shared variables for the Topcoat theme.
3+
[![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)
54

6-
[![NPM](https://nodei.co/npm/topcoat-variables-shared.png)](https://nodei.co/npm/topcoat-variables-shared/)
5+
---
6+
7+
Shared variables for theme.

package.json

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,52 @@
11
{
22
"name": "topcoat-variables-shared",
3-
"version": "0.1.4",
43
"description": "Shared variables for Topcoat theme",
5-
"main": "index.html",
64
"style": "src/variables-shared",
75
"scripts": {
8-
"test": "echo \"Error: no test specified\" && exit 1"
6+
"test": "ava",
7+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
98
},
109
"repository": {
1110
"type": "git",
12-
"url": "git://github.com/topcoat/variables-shared.git"
11+
"url": "https://github.com/topcoat/variables-shared.git"
1312
},
1413
"keywords": [
1514
"variables",
1615
"theme",
1716
"topcoat"
1817
],
19-
"author": "@dam Kristofer Joseph",
20-
"license": "Apache2",
18+
"author": "Kristofer Joseph <kristoferjoseph@gmail.com> (http://kristoferjoseph.com/)",
19+
"contributors": [
20+
"Garth Braithwaite <garthdb@gmail.com> (http://garthdb.com)"
21+
],
22+
"license": "Apache-2.0",
2123
"bugs": {
22-
"url": "https://github.com/topcoat/variables-shared/issues"
24+
"url": "https://github.com/topcoat/topcoat/issues"
25+
},
26+
"ava": {
27+
"require": [
28+
"babel-register"
29+
],
30+
"babel": "inherit"
31+
},
32+
"babel": {
33+
"presets": [
34+
"es2015"
35+
]
36+
},
37+
"devDependencies": {
38+
"ava": "^0.16.0",
39+
"babel-cli": "^6.14.0",
40+
"babel-core": "^6.14.0",
41+
"babel-preset-es2015": "^6.14.0",
42+
"babel-register": "^6.14.0",
43+
"cz-customizable": "^4.0.0",
44+
"resin": "^1.1.0",
45+
"semantic-release": "^4.3.5"
46+
},
47+
"config": {
48+
"commitizen": {
49+
"path": "./node_modules/cz-customizable"
50+
}
2351
}
2452
}

src/variables-shared.css

Lines changed: 30 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,32 @@
1-
/**
2-
*
3-
* Copyright 2012 Adobe Systems Inc.;
4-
*
5-
* Licensed under the Apache License, Version 2.0 (the "License");
6-
* you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
8-
*
9-
* http://www.apache.org/licenses/LICENSE-2.0
10-
*
11-
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS,
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
* See the License for the specific language governing permissions and
15-
* limitations under the License.
16-
*
17-
*/
18-
191
:root {
20-
var-font-weight--cta: 500;
21-
var-overflow: hidden;
22-
var-radio-offset: -109px;
23-
var-radio-offset--checked: -74px;
24-
var-radio-width: 37px;
25-
var-radio-bgsize: var(radio-width);
26-
var-radio-height: 31px;
27-
var-radio-line-height: var(radio-height);
28-
var-radio-margin: 15px;
29-
var-overlay-bg-color: rgba(88, 90, 92, 0.7);
30-
var-overlay-bg-box-shadow: inset 0px 0px 115px 0px #000000;
31-
var-font-size--textarea--large: 1.3rem;
32-
var-line-height--large: 1.3rem;
33-
var-margin: 0;
34-
var-bar-border-radius : 12px;
35-
var-bar-width : 250px;
36-
var-bar-height : 1.25rem;
37-
var-progress-border-radius: 12px 0 0 12px;
38-
var-content--switch__label--left: 'ON';
39-
var-content--switch__label--right: 'OFF';
40-
var-margin-bottom--switch__toggle: -1px;
41-
var-margin-top--switch__toggle: -1px;
42-
var-transition--switch__toggle: margin-left 0.05s ease-in-out;
43-
var-margin-bottom--switch__toggle: -1px;
44-
var-margin-top--switch__toggle: -1px;
45-
var-padding--notification: 0.15em 0.5em 0.2em;
46-
var-margin--notification: 5px;
47-
var-border-radius--notification: 2px;
48-
var-color--notification: #fff;
49-
var-search-icon: url("../img/search.svg");
2+
--font-weight--cta: 500;
3+
--overflow: hidden;
4+
--radio-offset: -109px;
5+
--radio-offset--checked: -74px;
6+
--radio-width: 37px;
7+
--radio-bgsize: var(--radio-width);
8+
--radio-height: 31px;
9+
--radio-line-height: var(--radio-height);
10+
--radio-margin: 15px;
11+
--overlay-bg-color: rgba(88, 90, 92, 0.7);
12+
--overlay-bg-box-shadow: inset 0px 0px 115px 0px #000000;
13+
--font-size--textarea--large: 1.3rem;
14+
--line-height--large: 1.3rem;
15+
--margin: 0;
16+
--bar-border-radius : 12px;
17+
--bar-width : 250px;
18+
--bar-height : 1.25rem;
19+
--progress-border-radius: 12px 0 0 12px;
20+
--content--switch__label--left: 'ON';
21+
--content--switch__label--right: 'OFF';
22+
--margin-bottom--switch__toggle: -1px;
23+
--margin-top--switch__toggle: -1px;
24+
--transition--switch__toggle: margin-left 0.05s ease-in-out;
25+
--margin-bottom--switch__toggle: -1px;
26+
--margin-top--switch__toggle: -1px;
27+
--padding--notification: 0.15em 0.5em 0.2em;
28+
--margin--notification: 5px;
29+
--border-radius--notification: 2px;
30+
--color--notification: #fff;
31+
--search-icon: url("../img/search.svg");
5032
}
51-

test/example.expected.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
:root {
2+
font-weight-cta: 500;
3+
overflow: hidden;
4+
radio-offset: -109px;
5+
radio-offset-checked: -74px;
6+
radio-width: 37px;
7+
radio-bgsize: 37px;
8+
radio-height: 31px;
9+
radio-line-height: 31px;
10+
radio-margin: 15px;
11+
overlay-bg-color: rgba(88, 90, 92, .7);
12+
overlay-bg-box-shadow: inset 0px 0px 115px 0px #000;
13+
font-size-textarea-large: 1.3rem;
14+
line-height-large: 1.3rem;
15+
margin: 0;
16+
bar-border-radius: 12px;
17+
bar-width: 250px;
18+
bar-height: 1.25rem;
19+
progress-border-radius: 12px 0 0 12px;
20+
content-switch__label-left: 'ON';
21+
content-switch__label-right: 'OFF';
22+
margin-bottom-switch__toggle: -1px;
23+
margin-top-switch__toggle: -1px;
24+
transition-switch__toggle: margin-left .05s ease-in-out;
25+
margin-bottom-switch__toggle: -1px;
26+
margin-top-switch__toggle: -1px;
27+
padding-notification: .15em .5em .2em;
28+
margin-notification: 5px;
29+
border-radius-notification: 2px;
30+
color-notification: #fff;
31+
search-icon: url("../img/search.svg");
32+
}

test/example.fixture.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
:root {
2+
font-weight-cta: var(--font-weight--cta);
3+
overflow: var(--overflow);
4+
radio-offset: var(--radio-offset);
5+
radio-offset-checked: var(--radio-offset--checked);
6+
radio-width: var(--radio-width);
7+
radio-bgsize: var(--radio-bgsize);
8+
radio-height: var(--radio-height);
9+
radio-line-height: var(--radio-line-height);
10+
radio-margin: var(--radio-margin);
11+
overlay-bg-color: var(--overlay-bg-color);
12+
overlay-bg-box-shadow: var(--overlay-bg-box-shadow);
13+
font-size-textarea-large: var(--font-size--textarea--large);
14+
line-height-large: var(--line-height--large);
15+
margin: var(--margin);
16+
bar-border-radius: var(--bar-border-radius);
17+
bar-width: var(--bar-width);
18+
bar-height: var(--bar-height);
19+
progress-border-radius: var(--progress-border-radius);
20+
content-switch__label-left: var(--content--switch__label--left);
21+
content-switch__label-right: var(--content--switch__label--right);
22+
margin-bottom-switch__toggle: var(--margin-bottom--switch__toggle);
23+
margin-top-switch__toggle: var(--margin-top--switch__toggle);
24+
transition-switch__toggle: var(--transition--switch__toggle);
25+
margin-bottom-switch__toggle: var(--margin-bottom--switch__toggle);
26+
margin-top-switch__toggle: var(--margin-top--switch__toggle);
27+
padding-notification: var(--padding--notification);
28+
margin-notification: var(--margin--notification);
29+
border-radius-notification: var(--border-radius--notification);
30+
color-notification: var(--color--notification);
31+
search-icon: var(--search-icon);
32+
}

test/variables-shared.test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import test from 'ava';
2+
import resin from 'resin';
3+
import fs from 'fs';
4+
5+
test('compilation', t => {
6+
const input = './example.fixture.css';
7+
const expected = fs.readFileSync('./example.expected.css','utf-8').trim();
8+
return resin({
9+
src: input,
10+
vars: true,
11+
extend: true,
12+
prepend: '../src/variables-shared.css'
13+
}).then(result => {
14+
t.is(result.css.trim(), expected);
15+
});
16+
});

0 commit comments

Comments
 (0)