Skip to content

Commit

Permalink
Merge pull request #6 from topcoat/resin
Browse files Browse the repository at this point in the history
Updated to resin
  • Loading branch information
GarthDB authored Sep 2, 2016
2 parents 92b9715 + c8ca321 commit 3f1aba5
Show file tree
Hide file tree
Showing 19 changed files with 156 additions and 220 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 .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test
.*
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
language: node_js
node_js:
- "0.8.23"
before_install:
- "npm install -g mocha"
- "npm install -g grunt-cli"
node_js: "6"
after_success:
- npm run semantic-release
71 changes: 0 additions & 71 deletions Gruntfile.js

This file was deleted.

3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -200,4 +199,4 @@ Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
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.
limitations under the License.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Button Base
===========
# Topcoat Button Base

This is the base for all Topcoat buttons.
Look at the button file in src to see an example usage of the mixins.
Expand Down
1 change: 0 additions & 1 deletion test/expected/button.css → css/button-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
}

.button {
-moz-box-sizing: border-box;
box-sizing: border-box;
background-clip: padding-box;
}
Expand Down
1 change: 0 additions & 1 deletion css/button.min.css

This file was deleted.

49 changes: 49 additions & 0 deletions css/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.button {
padding: 0;
margin: 0;
font: inherit;
color: inherit;
background: transparent;
border: none;
}

.button--quiet {
background: transparent;
border: 1px solid transparent;
box-shadow: none;
}

.button {
cursor: default;
user-select: none;
}

.button {
box-sizing: border-box;
background-clip: padding-box;
}

.button {
white-space: nowrap;
overflow: hidden;
}

.button {
position: relative;
display: inline-block;
vertical-align: top;
}

.button {
text-overflow: ellipsis;
}

.button--disabled {
opacity: 0.3;
cursor: default;
pointer-events: none;
}

.button {
text-decoration: none;
}
13 changes: 0 additions & 13 deletions index.html

This file was deleted.

57 changes: 34 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,54 @@
{
"name": "topcoat-button-base",
"version": "0.7.0",
"description": "Topcoat button base. Reset styles for buttons.",
"main": "index.html",
"style": "src/button.css",
"style": "src/",
"directories": {
"test": "test",
"lib": "src",
"bin": "css"
"test": "test"
},
"scripts": {
"test": "grunt test",
"prepublish": "grunt"
"test": "ava test",
"prepublish": "rsn -p './src/button-base.css' -o ./css/button-base.css ./test/button-base.fixture.css",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"repository": {
"type": "git",
"url": "git://github.com/topcoat/button-base.git"
"url": "https://github.com/topcoat/button-base.git"
},
"keywords": [
"button",
"css",
"topcoat",
"base",
"reset",
"adobe"
"reset"
],
"author": "@dam Kristofer Joseph",
"license": "Apache",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-watch": "~0.4.4",
"grunt-contrib-cssmin": "~0.6.1",
"grunt-contrib-jade": "~0.7.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-simple-mocha": "~0.4.0",
"grunt-rework": "0.0.5",
"grunt-topcoat": "~0.1.0"
"author": "Kristofer Joseph <[email protected]> (http://kristoferjoseph.com/)",
"contributors": [
"Garth Braithwaite <[email protected]> (http://garthdb.com)",
"Andrei Oprea <[email protected]> (http://andreio.net/)"
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/topcoat/topcoat/issues"
},
"homepage": "http://topcoat.io",
"dependencies": {
"topcoat-utils": "~0.3.0"
"topcoat-utils": "^1.0.0"
},
"devDependencies": {
"autoprefixer": "^6.4.0",
"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",
"mocha": "^3.0.2",
"resin": "^1.1.0",
"semantic-release": "^4.3.5"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-customizable"
}
}
}
18 changes: 18 additions & 0 deletions src/button-base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@import "topcoat-utils";

%button {
@extend: %inline-block;
@extend: %reset-box-model;
@extend: %reset-base;
@extend: %reset-cursor;
@extend: %ellipsis;
text-decoration: none;
}

%button--quiet {
@extend: %reset-quiet;
}

%button--disabled {
@extend: %disabled;
}
36 changes: 0 additions & 36 deletions src/button.css

This file was deleted.

3 changes: 1 addition & 2 deletions css/button.css → test/button-base.expected.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
}

.button {
-moz-box-sizing: border-box;
box-sizing: border-box;
background-clip: padding-box;
}
Expand Down Expand Up @@ -50,4 +49,4 @@

.button {
text-decoration: none;
}
}
11 changes: 11 additions & 0 deletions test/button-base.fixture.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.button {
@extend: %button;
}

.button--quiet {
@extend: %button--quiet;
}

.button--disabled {
@extend: %button--disabled;
}
16 changes: 16 additions & 0 deletions test/button-base.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 = './button-base.fixture.css';
const expected = fs.readFileSync('./button-base.expected.css','utf-8').trim();
return resin({
src: input,
vars: true,
extend: true,
prepend: '../src/button-base.css'
}).then(result => {
t.is(result.css.trim(), expected);
});
});
Loading

0 comments on commit 3f1aba5

Please sign in to comment.