Skip to content
This repository has been archived by the owner on Jan 5, 2018. It is now read-only.

Add sass-glob #20

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
acb5a47
intial commit
LukeAskew Apr 3, 2015
cced14c
mvp
LukeAskew Apr 3, 2015
c4c1919
add ga code
LukeAskew Apr 3, 2015
de9d348
start docs
LukeAskew Apr 6, 2015
03caf54
adjust paragraph line-height
LukeAskew Apr 6, 2015
4edc4fe
adjust line-height
LukeAskew Apr 6, 2015
818d85f
build
LukeAskew Apr 6, 2015
d147d5d
adjust heading spacing
LukeAskew Apr 6, 2015
70e9871
add footer link
LukeAskew Apr 6, 2015
5936b14
update docs layout
LukeAskew Apr 7, 2015
c0bc4d0
update social.png
LukeAskew Apr 7, 2015
f6cb783
add twitter meta
LukeAskew Apr 7, 2015
360fe29
update docs
LukeAskew Apr 7, 2015
cdd81bd
add form control styles; remove unused components
LukeAskew Apr 7, 2015
001e778
seo updates
LukeAskew Apr 7, 2015
e44c716
add toggle images
LukeAskew Apr 7, 2015
cc819cc
update toggle-all.png
LukeAskew Apr 7, 2015
b2d1518
update toggle-single.png
LukeAskew Apr 7, 2015
e87368b
add docs
LukeAskew Apr 7, 2015
a089ae8
first draft
LukeAskew Apr 7, 2015
acbd850
proof docs; improve legibility
LukeAskew Apr 8, 2015
9a3f7d7
update
LukeAskew Apr 8, 2015
6f9a3cf
update gulpfile
LukeAskew Apr 8, 2015
795983a
add demo site
LukeAskew Apr 8, 2015
59b2e8e
add links to demo
LukeAskew Apr 8, 2015
ab36309
rearrange third-party page
LukeAskew Apr 9, 2015
eb66244
update third-party docs
LukeAskew Apr 9, 2015
2db0490
update third-party docs
LukeAskew Apr 9, 2015
1292ace
update
LukeAskew Apr 9, 2015
eb4f050
update third-party docs https://github.com/fbrctr/fabricator/pull/110
LukeAskew Apr 13, 2015
4dadf6c
update webpack docs
LukeAskew Apr 13, 2015
d465633
Merge pull request #2 from fbrctr/webpack
LukeAskew Apr 13, 2015
62f00f0
:lipstick: side menu
LukeAskew Apr 17, 2015
c694034
add `http://` to link
LukeAskew Apr 17, 2015
5c736f6
Update to Gulp-Ruby-Sass Docs to use Containers
finecitizens Apr 20, 2015
bffa6e2
Merge pull request #4 from finecitizens/patch-1
LukeAskew Apr 20, 2015
a1ba168
compile; #4
LukeAskew Apr 20, 2015
6e9657a
add error handling docs
LukeAskew May 11, 2015
f312dea
add ordering docs; make headings anchors
LukeAskew May 11, 2015
dd08319
better header links
LukeAskew May 11, 2015
0b65b61
Fix small grammar issues
Jul 27, 2015
836b844
Replace — with semicolon
Jul 27, 2015
45b00cd
Merge pull request #5 from qaidj/qaidj-third-party-character-fix
LukeAskew Jul 27, 2015
d606500
Merge pull request #6 from qaidj/qaidj-working-with-grammar-fix
LukeAskew Jul 27, 2015
02a99e3
build
LukeAskew Jul 27, 2015
bc7c2f9
point markdown headinganchor plugin to my fork; build.
LukeAskew Jul 27, 2015
df26f17
Adding missing word to the last section of documentation.
LukeHowellDev Aug 29, 2015
9a757a1
Fixing small typo on data page changing store to stored.
LukeHowellDev Aug 29, 2015
2f472ea
Correcting typo on on *building-a-toolkit/assets* by adding apostroph…
LukeHowellDev Aug 29, 2015
6f9713b
Merge pull request #9 from snumb130/doc_fix_building_css_js
LukeAskew Aug 31, 2015
2c3e069
Merge pull request #8 from snumb130/doc_fix_building_data
LukeAskew Aug 31, 2015
0988175
Merge pull request #7 from snumb130/doc_fix_building_materials
LukeAskew Aug 31, 2015
2429ae4
Update Browserify reference in assets.html
paultibbetts Sep 23, 2015
d613654
Merge pull request #10 from ptibbetts/patch-1
LukeAskew Sep 28, 2015
dee034b
build
LukeAskew Aug 31, 2015
99fa72d
add media links
LukeAskew Oct 29, 2015
9d34c09
Merge commit 'c2328ee587ccabd1fb540901e081639934adaec0' into fabricator
LukeAskew Oct 29, 2015
d1ddaf1
compile
LukeAskew Oct 29, 2015
cb28c28
"Twitter Bootstrap" => "Bootstrap"
cvrebert Jan 2, 2016
b88a732
Merge pull request #11 from cvrebert/patch-2
LukeAskew Jan 3, 2016
4af102b
compile
LukeAskew Jan 3, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[{*.json,*.yml}]
indent_size = 2
indent_style = space
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.sass-cache
bower_components
22 changes: 22 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"boss": true,
"browser": true,
"curly": true,
"debug": true,
"devel": true,
"eqeqeq": true,
"expr": true,
"forin": true,
"immed": true,
"noarg": true,
"node": true,
"noempty": true,
"nonew": true,
"strict": true,
"trailing": true,
"undef": true,
"unused": true,
"predef": [
"Prism"
]
}
7 changes: 7 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (c) 2014 Resource LLC

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.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<p align="center">
<img src="http://fbrctr.github.io/assets/toolkit/images/masthead.png" width="243">
</p>

This is the [Fabricator](https://github.com/fbrctr/fabricator) instance used to build [http://fbrctr.github.io](http://fbrctr.github.io).

## Development

Checkout the `fabricator` branch:

```
$ git checkout fabricator
```

Start local dev server:

```
$ npm start
```

Build for release:

```
$ npm run build
```

Publish:

```
$ git subtree push --prefix dist origin master
```
1 change: 0 additions & 1 deletion assets/toolkit/styles/toolkit.css

This file was deleted.

21 changes: 21 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "fbrctr.github.io",
"version": "0.0.0",
"homepage": "https://github.com/fbrctr/fbrctr.github.io",
"authors": [
"Luke Askew <[email protected]>"
],
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"devDependencies": {
"neat": "~1.7.2",
"css-utils": "~0.1.4"
}
}
File renamed without changes.

Large diffs are not rendered by default.

Binary file added dist/assets/toolkit/images/alistapart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/assets/toolkit/images/net-magazine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/assets/toolkit/images/smashing-magazine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/assets/toolkit/styles/toolkit.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h1 id="stylesheets-and-javascript"><a name="stylesheets-and-javascript" class="
<p>How to work with CSS and JS within Fabricator</p>
</blockquote>
<p>Fabricator comes with little opinion about how you should architect your Stylesheets and JavaScript. Each use case is different, so it's up to you to define what works best.</p>
<p>Out of the box, you'll find a single <code>.scss</code> and <code>.js</code> file. These are the entry points for Sass compilation and Browserify respectively. It is recommended that you leverage the module importing features of each preprocessor to compile your toolkit down to a single <code>.css</code> and <code>.js</code> file. Practically speaking, you should be able to drop these two files into any application and have full access to your entire toolkit.</p>
<p>Out of the box, you'll find a single <code>.scss</code> and <code>.js</code> file. These are the entry points for Sass compilation and Webpack respectively. It is recommended that you leverage the module importing features of each preprocessor to compile your toolkit down to a single <code>.css</code> and <code>.js</code> file. Practically speaking, you should be able to drop these two files into any application and have full access to your entire toolkit.</p>

</div>
</div>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h2 id="toolkit-driven-development"><a name="toolkit-driven-development" class="
<p>When done well, a mature toolkit can be used to build a large number of unique pages and layouts. Once a baseline of materials has been built, designers can compose new pages by selecting existing materials, then design to fill the gaps. The need to produce a layout artifact for each new page is eliminated. The time it takes to layout new pages dramatically decreases as the toolkit matures.</p>
<h2 id="style-guide-vs-toolkit"><a name="style-guide-vs-toolkit" class="" href="#style-guide-vs-toolkit">Style guide vs toolkit</a></h2>
<p>Website style guides have evolved over the years, first starting as an outreach of the tradition (print) branding style guides, and eventually maturing into interactive examples of how a brand should be look and feel on the web. See <a href="http://www.starbucks.com/static/reference/styleguide/">Starbucks</a>, <a href="http://www.yelp.com/styleguide">Yelp</a>, <a href="http://sfdc-styleguide.herokuapp.com/">Salesforce</a>, <a href="http://style.codeforamerica.org">Code For America</a>, and <a href="http://www.google.com/design/spec/material-design/">Google's Material Design</a>.</p>
<p>A toolkit is more focused on code - specifically the modularity of website interfaces. Toolkits break down websites into small, repeatable chunks, then use those chunks to build an infinite number of layouts. <a href="http://getbootstrap.com/">Twitter Bootstrap</a>, <a href="http://topcoat.io/topcoat/">Topcoat</a>, and <a href="http://foundation.zurb.com/">Zurb's Foundation</a> are popular toolkits.</p>
<p>A toolkit is more focused on code - specifically the modularity of website interfaces. Toolkits break down websites into small, repeatable chunks, then use those chunks to build an infinite number of layouts. <a href="http://getbootstrap.com/">Bootstrap</a>, <a href="http://topcoat.io/topcoat/">Topcoat</a>, and <a href="http://foundation.zurb.com/">Zurb's Foundation</a> are popular toolkits.</p>
<p>Both are great and can be extremely useful. Fabricator gives you a way to combine both concepts into one deliverable.</p>
<p>When you work with Fabricator, you develop a brand's look and feel on the web while also producing a code toolkit.</p>
<p>Next, <a href="/getting-started/working-with-fabricator.html">learn how to use Fabricator</a>.</p>
Expand Down
17 changes: 17 additions & 0 deletions index.html → dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,23 @@ <h3 class="white">Rapid Prototyping</h3>
</div>
</div>

<div class="bg-grey1 pt-s pb-xl">
<div class="row ta-c">
<h3 class="blue">Featured In</h3>
</div>
<div class="row ta-c feature-row">
<a href="http://alistapart.com/blog/post/style-guide-generator-roundup" target="_blank">
<img src="/assets/toolkit/images/alistapart.png" alt="A List Apart">
</a>
<a href="http://www.smashingmagazine.com/2015/04/an-in-depth-overview-of-living-style-guide-tools/" target="_blank">
<img src="/assets/toolkit/images/smashing-magazine.png" alt="Smashing Magazine">
</a>
<a href="https://twitter.com/barrymcgee/status/618807894138601472" target="_blank">
<img src="/assets/toolkit/images/net-magazine.png" alt="Net Magazine">
</a>
</div>
</div>

<div class="row pb-xl">
<div class="ta-c">
<h2>Quick Start</h2>
Expand Down
204 changes: 204 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
'use strict';

// modules
var assemble = require('fabricator-assemble');
var browserify = require('browserify');
var browserSync = require('browser-sync');
var concat = require('gulp-concat');
var csso = require('gulp-csso');
var del = require('del');
var gulp = require('gulp');
var gutil = require('gulp-util');
var gulpif = require('gulp-if');
var imagemin = require('gulp-imagemin');
var prefix = require('gulp-autoprefixer');
var rename = require('gulp-rename');
var reload = browserSync.reload;
var runSequence = require('run-sequence');
var sass = require('gulp-sass');
var source = require('vinyl-source-stream');
var streamqueue = require('streamqueue');
var streamify = require('gulp-streamify');
var uglify = require('gulp-uglify');


// configuration
var config = {
dev: gutil.env.dev,
src: {
scripts: {
fabricator: [
'src/assets/fabricator/scripts/prism.js',
'src/assets/fabricator/scripts/fabricator.js'
],
vendor: [
'src/assets/fabricator/scripts/prism.js'
],
toolkit: './src/assets/toolkit/scripts/toolkit.js'
},
styles: {
fabricator: 'src/assets/fabricator/styles/fabricator.scss',
toolkit: 'src/assets/toolkit/styles/toolkit.scss'
},
images: 'src/assets/toolkit/images/**/*',
views: 'src/toolkit/views/*.html'
},
dest: 'dist'
};


// clean
gulp.task('clean', function (cb) {
del(['**'], { ignore: 'demo/**', cwd: config.dest }, cb);
});


// styles
gulp.task('styles:fabricator', function () {
return gulp.src(config.src.styles.fabricator)
.pipe(sass({
errLogToConsole: true
}))
.pipe(prefix('last 1 version'))
.pipe(gulpif(!config.dev, csso()))
.pipe(rename('f.css'))
.pipe(gulp.dest(config.dest + '/assets/fabricator/styles'))
.pipe(gulpif(config.dev, reload({stream:true})));
});

gulp.task('styles:toolkit', function () {
return gulp.src(config.src.styles.toolkit)
.pipe(sass({
errLogToConsole: true
}))
.pipe(prefix('last 1 version'))
.pipe(gulpif(!config.dev, csso()))
.pipe(gulp.dest(config.dest + '/assets/toolkit/styles'))
.pipe(gulpif(config.dev, reload({stream:true})));
});

gulp.task('styles', ['styles:fabricator', 'styles:toolkit']);


// scripts
gulp.task('scripts:fabricator', function () {
return gulp.src(config.src.scripts.fabricator)
.pipe(concat('f.js'))
.pipe(gulpif(!config.dev, uglify()))
.pipe(gulp.dest(config.dest + '/assets/fabricator/scripts'));
});

gulp.task('scripts:toolkit', function() {

var toolkit = function() {
return browserify(config.src.scripts.toolkit).bundle()
.on('error', function(error) {
gutil.log(gutil.colors.red(error));
this.emit('end');
})
.pipe(source('toolkit.js'));
};

var vendor = function() {
return gulp.src(config.src.scripts.vendor)
.pipe(concat('vendor.js'));
};

return streamqueue({
objectMode: true
}, vendor(), toolkit())
.pipe(streamify(concat('toolkit.js')))
.pipe(gulpif(!config.dev, streamify(uglify())))
.pipe(gulp.dest(config.dest + '/assets/toolkit/scripts'));

});

gulp.task('scripts', ['scripts:fabricator', 'scripts:toolkit']);


// images
gulp.task('images', ['favicon'], function () {
return gulp.src(config.src.images)
.pipe(imagemin())
.pipe(gulp.dest(config.dest + '/assets/toolkit/images'));
});

gulp.task('favicon', function () {
return gulp.src('./src/favicon.ico')
.pipe(gulp.dest(config.dest));
});


// assemble
gulp.task('assemble', function(done) {
assemble({
helpers: {
markdown: function (str, opts) {
if (typeof str === 'object') {
opts = str;
str = null;
}
str = str || opts.fn(this);
return require('markdown-it')()
.use(require('markdown-it-headinganchor'), {
linkify: true,
anchorClass: '',
slugify: function(str) {
return require('string')(str).slugify().s;
}
})
.render(str);
},
decode: function (val) {
return decodeURIComponent(val);
},
raw: function (options) {
return options.fn();
}
}
});
done();
});


// server
gulp.task('serve', function () {

var reload = browserSync.reload;

browserSync({
server: {
baseDir: config.dest
},
notify: false,
logPrefix: 'FABRICATOR'
});

gulp.watch('src/**/*.{html,md,json,yml}', ['assemble']).on('change', reload);
gulp.watch('src/assets/fabricator/styles/**/*.scss', ['styles:fabricator']);
gulp.watch('src/assets/toolkit/styles/**/*.scss', ['styles:toolkit']);
gulp.watch('src/assets/fabricator/scripts/**/*.js', ['scripts:fabricator']).on('change', reload);
gulp.watch('src/assets/toolkit/scripts/**/*.js', ['scripts:toolkit']).on('change', reload);
gulp.watch(config.src.images, ['images']).on('change', reload);
});


// default build task
gulp.task('default', ['clean'], function () {

// define build tasks
var tasks = [
'styles',
'scripts',
'images',
'assemble'
];

// run build
runSequence(tasks, function () {
if (config.dev) {
gulp.start('serve');
}
});

});
Loading