Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Seed
committed
Jul 4, 2016
0 parents
commit 5aaaa4b
Showing
12 changed files
with
251 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.DS_Store | ||
|
||
node_modules/ | ||
bower_components/ | ||
|
||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
# sass-lint config generated by make-sass-lint-config v0.1.2 | ||
# | ||
# The following scss-lint Linters are not yet supported by sass-lint: | ||
# ElsePlacement, SelectorDepth | ||
# | ||
# The following settings/values are unsupported by sass-lint: | ||
# Linter Indentation, option "character" | ||
|
||
files: | ||
include: '**/*.scss' | ||
ignore: | ||
- 'bower_components/**/*' | ||
- 'node_modules/**/*' | ||
- 'vendors/**/*' | ||
- '*/vendors/**/*' | ||
options: | ||
formatter: stylish | ||
merge-default-rules: false | ||
rules: | ||
class-name-format: | ||
- 0 | ||
- convention: strictbem | ||
empty-line-between-blocks: 0 | ||
extends-before-declarations: 0 | ||
extends-before-mixins: 0 | ||
function-name-format: 0 | ||
id-name-format: | ||
- 0 | ||
- convention: strictbem | ||
indentation: | ||
- 1 | ||
- size: 2 | ||
leading-zero: | ||
- 1 | ||
- include: true | ||
mixin-name-format: 0 | ||
mixins-before-declarations: 0 | ||
nesting-depth: | ||
- 1 | ||
- max-depth: 4 | ||
no-color-keywords: 0 | ||
no-color-literals: 0 | ||
no-ids: 0 | ||
no-important: 0 | ||
no-mergeable-selectors: 0 | ||
no-qualifying-elements: 0 | ||
placeholder-in-extend: 0 | ||
placeholder-name-format: | ||
- 0 | ||
- convention: strictbem | ||
property-sort-order: 0 | ||
quotes: | ||
- 1 | ||
- style: double | ||
single-line-per-selector: 0 | ||
variable-name-format: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
language: node_js | ||
node_js: | ||
- "5.0" | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
cache: | ||
directories: | ||
- node_modules | ||
|
||
before_install: | ||
- npm set progress=false | ||
|
||
install: | ||
- npm install | ||
|
||
script: | ||
- npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# seed-spacing | ||
Spacing utility pack for Seed | ||
|
||
utility pack for [Seed](https://github.com/helpscout/seed)! | ||
|
||
## Install | ||
``` | ||
npm install seed-spacing --save-dev | ||
``` | ||
|
||
|
||
## Basic Usage | ||
|
||
### SCSS | ||
This seed pack needs to be imported into your sass pipeline. Below is an example using Gulp: | ||
|
||
|
||
```javascript | ||
var gulp = require('gulp'); | ||
var sass = require('gulp-sass'); | ||
var pack = require('seed-spacing'); | ||
|
||
gulp.task('sass', function () { | ||
return gulp.src('./sass/**/*.scss') | ||
.pipe(sass({ | ||
includePaths: pack | ||
})) | ||
.pipe(gulp.dest('./css')); | ||
}); | ||
``` | ||
|
||
Once that is setup, simply `@import` *seed-spacing* as needed in your `.scss` file: | ||
|
||
```sass | ||
// Packs | ||
@import "pack/seed-spacing"; | ||
``` | ||
|
||
## Options | ||
|
||
The following variables can be found in `_config.scss` | ||
|
||
```sass | ||
seed-spacing config options | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "seed-spacing", | ||
"description": "Spacing utility pack for Seed", | ||
"main": "index.js", | ||
"authors": [ | ||
], | ||
"license": "MIT", | ||
"homepage": "", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test.js" | ||
], | ||
"version": "0.0.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
var path = require('path'); | ||
var includePath = path.join(__dirname, 'scss'); | ||
|
||
module.exports = includePath; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "seed-spacing", | ||
"version": "0.0.1", | ||
"description": "Spacing utility pack for Seed", | ||
"main": "index.js", | ||
"homepage": "", | ||
"scripts": { | ||
"banner": "node ./scripts/banner.js", | ||
"build": "npm run build:main && npm run build:min && npm run banner", | ||
"build:main": "node-sass scss/pack/_seed-spacing.scss dist/seed-spacing.css", | ||
"build:min": "node-sass scss/pack/_seed-spacing.scss dist/seed-spacing.min.css --output-style compressed", | ||
"test": "node ./scripts/test.js && npm run build" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "" | ||
}, | ||
"authors": [ | ||
], | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=0.10.1" | ||
}, | ||
"devDependencies": { | ||
"node-sass": "^3.8.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
var fs = require('fs'); | ||
var pkg = require('../package.json'); | ||
|
||
var banner = ['/**', | ||
' * '+ pkg.name +' v'+ pkg.version +' ('+ pkg.homepage +')', | ||
' * '+ pkg.description, | ||
' * Licensed under '+ pkg.license, | ||
' */', | ||
''].join('\n'); | ||
|
||
var dir = './dist/'; | ||
|
||
fs.readdir(dir, function(err, files) { | ||
if (err) { | ||
console.error('Could not list the directory.', err); | ||
process.exit(1); | ||
} | ||
|
||
files.forEach(function(file, index) { | ||
fs.readFile(dir + file, 'utf-8', function(err, data) { | ||
if (err) { | ||
return console.log(err); | ||
} | ||
|
||
data = banner + data; | ||
|
||
fs.writeFile(dir + file, data, 'utf-8', function(err) { | ||
if (err) { | ||
return console.log(err); | ||
} | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict'; | ||
|
||
var sass = require('node-sass'); | ||
|
||
sass.render({ | ||
file: './scss/pack/_seed-spacing.scss' | ||
}, function(error, result) { | ||
if (error) { | ||
console.error(error); | ||
return process.exit(1); | ||
} | ||
else { | ||
return console.log('Success!'); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// spacing :: Config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// spacing pack for Seed | ||
|
||
@import "./config"; |