Skip to content

Commit 8d130cd

Browse files
🎉
0 parents  commit 8d130cd

12 files changed

+2995
-0
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
end_of_line = lf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[{package.json,*.yml}]
11+
indent_style = space
12+
indent_size = 2

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

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

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
language: node_js
2+
node_js:
3+
- 'node'

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Tiaan <[email protected]> (tiaan.beer)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<h1 align="center">csscomb-config-dup</h1>
2+
<div align="center">
3+
<strong>My CSScomb config as a module</strong>
4+
</div>
5+
<br>
6+
<div align="center">
7+
<a href="https://npmjs.org/package/csscomb-config-dup">
8+
<img src="https://img.shields.io/npm/v/csscomb-config-dup.svg?style=flat-square" alt="Package version" />
9+
</a>
10+
<a href="https://npmjs.org/package/csscomb-config-dup">
11+
<img src="https://img.shields.io/npm/dm/csscomb-config-dup.svg?style=flat-square" alt="Downloads" />
12+
</a>
13+
<a href="https://github.com/feross/standard">
14+
<img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square" alt="Standard" />
15+
</a>
16+
<a href="https://travis-ci.org/tiaanduplessis/csscomb-config-dup">
17+
<img src="https://img.shields.io/travis/tiaanduplessis/csscomb-config-dup.svg?style=flat-square" alt="Travis Build" />
18+
</a>
19+
<a href="https://github.com/RichardLitt/standard-readme)">
20+
<img src="https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square" alt="Standard Readme" />
21+
</a>
22+
<a href="https://badge.fury.io/gh/tiaanduplessis%2Fcsscomb-config-dup">
23+
<img src="https://badge.fury.io/gh/tiaanduplessis%2Fcsscomb-config-dup.svg?style=flat-square" alt="GitHub version" />
24+
</a>
25+
<a href="https://dependencyci.com/github/tiaanduplessis/csscomb-config-dup">
26+
<img src="https://dependencyci.com/github/tiaanduplessis/csscomb-config-dup/badge?style=flat-square" alt="Dependency CI" />
27+
</a>
28+
<a href="https://github.com/tiaanduplessis/csscomb-config-dup/blob/master/LICENSE">
29+
<img src="https://img.shields.io/npm/l/csscomb-config-dup.svg?style=flat-square" alt="License" />
30+
</a>
31+
<a href="http://makeapullrequest.com">
32+
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="PRs" />
33+
</a>
34+
<a href="https://www.paypal.me/tiaanduplessis/1">
35+
<img src="https://img.shields.io/badge/$-support-green.svg?style=flat-square" alt="Donate" />
36+
</a>
37+
</div>
38+
<br>
39+
<div align="center">
40+
<a href="https://github.com/tiaanduplessis/csscomb-config-dup/watchers">
41+
<img src="https://img.shields.io/github/watchers/tiaanduplessis/csscomb-config-dup.svg?style=social" alt="Github Watch Badge" />
42+
</a>
43+
<a href="https://github.com/tiaanduplessis/csscomb-config-dup/stargazers">
44+
<img src="https://img.shields.io/github/stars/tiaanduplessis/csscomb-config-dup.svg?style=social" alt="Github Star Badge" />
45+
</a>
46+
<a href="https://twitter.com/intent/tweet?text=Check%20out%20csscomb-config-dup!%20https://github.com/tiaanduplessis/csscomb-config-dup%20%F0%9F%91%8D">
47+
<img src="https://img.shields.io/twitter/url/https/github.com/tiaanduplessis/csscomb-config-dup.svg?style=social" alt="Tweet" />
48+
</a>
49+
</div>
50+
<br>
51+
<div align="center">
52+
Built with ❤︎ by <a href="tiaan.beer">Tiaan</a> and <a href="https://github.com/tiaanduplessis/csscomb-config-dup/graphs/contributors">contributors</a>
53+
</div>
54+
55+
<h2>Table of Contents</h2>
56+
<details>
57+
<summary>Table of Contents</summary>
58+
<li><a href="#install">Install</a></li>
59+
<li><a href="#usage">Usage</a></li>
60+
<li><a href="#cli">CLI</a></li>
61+
<li><a href="#contribute">Contribute</a></li>
62+
<li><a href="#license">License</a></li>
63+
</details>
64+
65+
## Install
66+
67+
```sh
68+
$ npm install --save-dev csscomb-config-dup
69+
# OR
70+
$ yarn add --dev csscomb-config-dup
71+
```
72+
73+
## Usage
74+
75+
Module is intended to be used as a `npm script` along with the [`csscomb`](https://github.com/csscomb/csscomb.js) module.
76+
77+
```js
78+
79+
{
80+
"scripts": {
81+
"lint:css": "csscomb --config node_modules/csscomb-config-dup/index.js"
82+
}
83+
}
84+
85+
```
86+
87+
## CLI
88+
89+
```sh
90+
$ npm install --global csscomb-config-dup
91+
# OR
92+
$ yarn global add csscomb-config-dup
93+
```
94+
95+
Then run:
96+
97+
```sh
98+
$ csscomb-config-dup
99+
```
100+
101+
This will create a `.csscomb.json` in the current directory.
102+
103+
## Contribute
104+
105+
Contributions are welcome. Please open up an issue or create PR if you would like to help out.
106+
107+
Note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
108+
109+
## License
110+
111+
Licensed under the MIT License.

cli.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env node
2+
'use strict'
3+
4+
const fs = require('fs')
5+
const path = require('path')
6+
const config = require('./')
7+
8+
fs.writeFileSync(path.join(process.cwd(), '.csscomb.json'), JSON.stringify(config, null, 2))

csscomb.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"remove-empty-rulesets": true,
3+
"always-semicolon": true,
4+
"color-case": "lower",
5+
"block-indent": " ",
6+
"color-shorthand": true,
7+
"element-case": "lower",
8+
"eof-newline": true,
9+
"leading-zero": false,
10+
"quotes": "double",
11+
"sort-order-fallback": "abc",
12+
"space-before-colon": "",
13+
"space-after-colon": " ",
14+
"space-before-combinator": " ",
15+
"space-after-combinator": " ",
16+
"space-between-declarations": "\n",
17+
"space-before-opening-brace": " ",
18+
"space-after-opening-brace": "\n",
19+
"space-after-selector-delimiter": "\n",
20+
"space-before-selector-delimiter": "",
21+
"space-before-closing-brace": "\n",
22+
"strip-spaces": true,
23+
"tab-size": true,
24+
"unitless-zero": true,
25+
"vendor-prefix-align": true
26+
}

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'use strict'
2+
3+
module.exports = require('./csscomb.json')

package.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "csscomb-config-dup",
3+
"version": "1.0.0",
4+
"description": "My CSScomb config as a module",
5+
"license": "MIT",
6+
"main": "index.js",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/tiaanduplessis/csscomb-config-dup.git"
10+
},
11+
"homepage": "https://github.com/tiaanduplessis/csscomb-config-dup",
12+
"bugs": "https://github.com/tiaanduplessis/csscomb-config-dup/issues",
13+
"author": {
14+
"name": "Tiaan",
15+
"email": "[email protected]",
16+
"url": "tiaan.beer"
17+
},
18+
"bin": {
19+
"csscomb-config-dup": "cli.js"
20+
},
21+
"scripts": {
22+
"start": "npm run dev",
23+
"pretest": "npm run lint:fix",
24+
"test": "jest --env=node",
25+
"test:watch": "npm test -- --watch",
26+
"coverage": "npm test -- --coverage",
27+
"lint": "standard --verbose",
28+
"lint:fix": "standard --fix --verbose",
29+
"precommit": "npm test"
30+
},
31+
"keywords": [
32+
"csscomb",
33+
"config",
34+
"csscomb-config-dup"
35+
],
36+
"dependencies": {},
37+
"devDependencies": {
38+
"husky": "^0.13.3",
39+
"jest": "^19.0.2",
40+
"standard": "^10.0.1"
41+
}
42+
}

test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* eslint-env jest */
2+
'use strict'
3+
4+
const config = require('./')
5+
6+
test('should export config', () => {
7+
expect(config).toBeDefined()
8+
expect(typeof config).toBe('object')
9+
})

0 commit comments

Comments
 (0)