Skip to content

Commit

Permalink
Merge pull request #38 from GitScrum/milestone-0.0.8
Browse files Browse the repository at this point in the history
Milestone 0.0.8
  • Loading branch information
Scrum authored Jun 16, 2016
2 parents e4564a5 + 648dbb6 commit 1ff2b4f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 15 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [0.0.8] - 16-06-2016
### Change
- Change babel preset
- Update devDep

## [0.0.7] - 23-05-2016
### Change
- Update devDep
Expand Down
22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "postcss-attribute-selector-prefix",
"version": "0.0.7",
"version": "0.0.8",
"description": "A attribute selector prefixer for postcss",
"main": "./lib/index.js",
"main": "lib/index.js",
"files": "lib/index.js",
"scripts": {
"test": "eslint --format=node_modules/eslint-formatter-pretty ./src/*.js ./test/*.js && nyc ava",
Expand All @@ -22,15 +22,18 @@
"prefix",
"css"
],
"author": "Scrum",
"author": {
"name": "GitScrum",
"email": "scrum@list.ru"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/GitScrum/postcss-attribute-selector-prefix/issues"
},
"homepage": "https://github.com/GitScrum/postcss-attribute-selector-prefix#readme",
"babel": {
"presets": [
"es2015-node6"
"es2015-node"
],
"plugins": [
"add-module-exports"
Expand All @@ -56,26 +59,25 @@
]
},
"dependencies": {
"babel-preset-node5": "^11.1.0",
"postcss": "^5.0.21"
},
"devDependencies": {
"ava": "^0.15.0",
"ava": "^0.15.2",
"ava-codemods": "^0.2.1",
"babel-cli": "^6.9.0",
"babel-cli": "^6.10.1",
"babel-eslint": "^6.0.4",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-es2015-node6": "^0.2.0",
"babel-preset-es2015-node": "^6.1.0",
"babel-register": "^6.9.0",
"coveralls": "^2.11.9",
"eslint": "^2.10.2",
"eslint-config-xo": "^0.14.1",
"eslint-config-xo": "^0.15.0",
"eslint-formatter-pretty": "^0.2.2",
"eslint-plugin-ava": "^2.3.1",
"eslint-plugin-babel": "^3.2.0",
"eslint-plugin-require-path-exists": "^1.1.5",
"eslint-plugin-xo": "^0.5.0",
"nyc": "^6.6.0",
"nyc": "^6.4.4",
"package-config-checker": "^1.0.0",
"updtr": "^0.1.15"
}
Expand Down
25 changes: 20 additions & 5 deletions test/test-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,44 @@ test('processing options prefix and attribute selector', t => {
test('processing options prefix, filter and attribute selector', t => {
const expected = '.class, [type="text"], [class*="test-lorem"] { color:red; }';
const fixtures = '.class, [type="text"], [class*="lorem"] { color:red; }';
t.is(processing(fixtures, {prefix: 'test-', filter: ['class']}), expected);
t.is(processing(fixtures, {
prefix: 'test-',
filter: ['class']
}), expected);
});

test('processing options prefix, filter and attribute selector witch indentical class filter', t => {
const expected = '.class, [type="text"], [alt*="class"] { color:red; }';
const fixtures = '.class, [type="text"], [alt*="class"] { color:red; }';
t.is(processing(fixtures, {prefix: 'test-', filter: ['class']}), expected);
t.is(processing(fixtures, {
prefix: 'test-',
filter: ['class']
}), expected);
});

test('processing options filter and attribute selector', t => {
const expected = '.class, [type="text"], [class*="lorem"] { color:red; }';
const fixtures = '.class, [type="text"], [class*="lorem"] { color:red; }';
t.is(processing(fixtures, {filter: ['class']}), expected);
t.is(processing(fixtures, {
filter: ['class']
}), expected);
});

test('processing options prefix, filter, ignore and attribute selector', t => {
const expected = '.class, [type="text"], [class*="lorem"] { color:red; }';
const fixtures = '.class, [type="text"], [class*="lorem"] { color:red; }';
t.is(processing(fixtures, {prefix: 'test', filter: ['class'], ignore: ['class']}), expected);
t.is(processing(fixtures, {
prefix: 'test',
filter: ['class'],
ignore: ['class']
}), expected);
});

test('processing options prefix, ignore and attribute selector', t => {
const expected = '.class, [type="text"], [class*="test-lorem"] { color:red; }';
const fixtures = '.class, [type="text"], [class*="lorem"] { color:red; }';
t.is(processing(fixtures, {prefix: 'test-', ignore: ['type']}), expected);
t.is(processing(fixtures, {
prefix: 'test-',
ignore: ['type']
}), expected);
});

0 comments on commit 1ff2b4f

Please sign in to comment.