Skip to content

Commit 3f1aba5

Browse files
authored
Merge pull request #6 from topcoat/resin
Updated to resin
2 parents 92b9715 + c8ca321 commit 3f1aba5

19 files changed

+156
-220
lines changed

.cz-config.js

+20
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+
};

.npmignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
test
2+
.*

.travis.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
language: node_js
2-
node_js:
3-
- "0.8.23"
4-
before_install:
5-
- "npm install -g mocha"
6-
- "npm install -g grunt-cli"
2+
node_js: "6"
3+
after_success:
4+
- npm run semantic-release

Gruntfile.js

-71
This file was deleted.

LICENSE

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
21

32
Apache License
43
Version 2.0, January 2004
@@ -200,4 +199,4 @@ Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
200199
distributed under the License is distributed on an "AS IS" BASIS,
201200
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202201
See the License for the specific language governing permissions and
203-
limitations under the License.
202+
limitations under the License.

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Button Base
2-
===========
1+
# Topcoat Button Base
32

43
This is the base for all Topcoat buttons.
54
Look at the button file in src to see an example usage of the mixins.

test/expected/button.css css/button-base.css

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
}
2323

2424
.button {
25-
-moz-box-sizing: border-box;
2625
box-sizing: border-box;
2726
background-clip: padding-box;
2827
}

css/button.min.css

-1
This file was deleted.

css/index.css

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
.button {
2+
padding: 0;
3+
margin: 0;
4+
font: inherit;
5+
color: inherit;
6+
background: transparent;
7+
border: none;
8+
}
9+
10+
.button--quiet {
11+
background: transparent;
12+
border: 1px solid transparent;
13+
box-shadow: none;
14+
}
15+
16+
.button {
17+
cursor: default;
18+
user-select: none;
19+
}
20+
21+
.button {
22+
box-sizing: border-box;
23+
background-clip: padding-box;
24+
}
25+
26+
.button {
27+
white-space: nowrap;
28+
overflow: hidden;
29+
}
30+
31+
.button {
32+
position: relative;
33+
display: inline-block;
34+
vertical-align: top;
35+
}
36+
37+
.button {
38+
text-overflow: ellipsis;
39+
}
40+
41+
.button--disabled {
42+
opacity: 0.3;
43+
cursor: default;
44+
pointer-events: none;
45+
}
46+
47+
.button {
48+
text-decoration: none;
49+
}

index.html

-13
This file was deleted.

package.json

+34-23
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,54 @@
11
{
22
"name": "topcoat-button-base",
3-
"version": "0.7.0",
43
"description": "Topcoat button base. Reset styles for buttons.",
5-
"main": "index.html",
6-
"style": "src/button.css",
4+
"style": "src/",
75
"directories": {
8-
"test": "test",
9-
"lib": "src",
10-
"bin": "css"
6+
"test": "test"
117
},
128
"scripts": {
13-
"test": "grunt test",
14-
"prepublish": "grunt"
9+
"test": "ava test",
10+
"prepublish": "rsn -p './src/button-base.css' -o ./css/button-base.css ./test/button-base.fixture.css",
11+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
1512
},
1613
"repository": {
1714
"type": "git",
18-
"url": "git://github.com/topcoat/button-base.git"
15+
"url": "https://github.com/topcoat/button-base.git"
1916
},
2017
"keywords": [
2118
"button",
2219
"css",
2320
"topcoat",
2421
"base",
25-
"reset",
26-
"adobe"
22+
"reset"
2723
],
28-
"author": "@dam Kristofer Joseph",
29-
"license": "Apache",
30-
"devDependencies": {
31-
"grunt": "~0.4.1",
32-
"grunt-contrib-watch": "~0.4.4",
33-
"grunt-contrib-cssmin": "~0.6.1",
34-
"grunt-contrib-jade": "~0.7.0",
35-
"grunt-contrib-clean": "~0.5.0",
36-
"grunt-simple-mocha": "~0.4.0",
37-
"grunt-rework": "0.0.5",
38-
"grunt-topcoat": "~0.1.0"
24+
"author": "Kristofer Joseph <[email protected]> (http://kristoferjoseph.com/)",
25+
"contributors": [
26+
"Garth Braithwaite <[email protected]> (http://garthdb.com)",
27+
"Andrei Oprea <[email protected]> (http://andreio.net/)"
28+
],
29+
"license": "Apache-2.0",
30+
"bugs": {
31+
"url": "https://github.com/topcoat/topcoat/issues"
3932
},
33+
"homepage": "http://topcoat.io",
4034
"dependencies": {
41-
"topcoat-utils": "~0.3.0"
35+
"topcoat-utils": "^1.0.0"
36+
},
37+
"devDependencies": {
38+
"autoprefixer": "^6.4.0",
39+
"ava": "^0.16.0",
40+
"babel-cli": "^6.14.0",
41+
"babel-core": "^6.14.0",
42+
"babel-preset-es2015": "^6.14.0",
43+
"babel-register": "^6.14.0",
44+
"cz-customizable": "^4.0.0",
45+
"mocha": "^3.0.2",
46+
"resin": "^1.1.0",
47+
"semantic-release": "^4.3.5"
48+
},
49+
"config": {
50+
"commitizen": {
51+
"path": "./node_modules/cz-customizable"
52+
}
4253
}
4354
}

src/button-base.css

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@import "topcoat-utils";
2+
3+
%button {
4+
@extend: %inline-block;
5+
@extend: %reset-box-model;
6+
@extend: %reset-base;
7+
@extend: %reset-cursor;
8+
@extend: %ellipsis;
9+
text-decoration: none;
10+
}
11+
12+
%button--quiet {
13+
@extend: %reset-quiet;
14+
}
15+
16+
%button--disabled {
17+
@extend: %disabled;
18+
}

src/button.css

-36
This file was deleted.

css/button.css test/button-base.expected.css

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
}
2323

2424
.button {
25-
-moz-box-sizing: border-box;
2625
box-sizing: border-box;
2726
background-clip: padding-box;
2827
}
@@ -50,4 +49,4 @@
5049

5150
.button {
5251
text-decoration: none;
53-
}
52+
}

test/button-base.fixture.css

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.button {
2+
@extend: %button;
3+
}
4+
5+
.button--quiet {
6+
@extend: %button--quiet;
7+
}
8+
9+
.button--disabled {
10+
@extend: %button--disabled;
11+
}

test/button-base.test.js

+16
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 = './button-base.fixture.css';
7+
const expected = fs.readFileSync('./button-base.expected.css','utf-8').trim();
8+
return resin({
9+
src: input,
10+
vars: true,
11+
extend: true,
12+
prepend: '../src/button-base.css'
13+
}).then(result => {
14+
t.is(result.css.trim(), expected);
15+
});
16+
});

0 commit comments

Comments
 (0)