Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
519 commits
Select commit Hold shift + click to select a range
986197a
Updated dependencies
Mar 4, 2014
79ad00f
Removed some todo's
Mar 4, 2014
6cbb5c0
Big clean-up, dropped conditional comments in favor of js method
Mar 4, 2014
a65c74b
Removed redundant files
Mar 4, 2014
6bea10d
Moved log.js to libs folder
Mar 4, 2014
6f23fc7
Added fastclick library
Mar 4, 2014
d097970
Added favicon for IE
Mar 4, 2014
a8ee7cf
Added favicon for modern browsers
Mar 4, 2014
cb2e979
Added plumber to clean up with continuous watches
Mar 4, 2014
f82aae4
Cleaned up
Mar 4, 2014
3fe1482
Cleaned up
Mar 4, 2014
6db3e95
Cleaned up
Mar 4, 2014
fb16168
Cleaned up
Mar 4, 2014
a45d69f
Optimised reloading (now supporting removed/added files)
Mar 4, 2014
f0d9bd3
No longer allowing comma-first coding
Mar 4, 2014
843bd15
Updated deps
Mar 5, 2014
184af28
Added todo
Mar 5, 2014
b1daf5a
Updated todos
Mar 6, 2014
c555eba
Added todo's
Mar 7, 2014
15df2cd
Updated todo's
Mar 7, 2014
1416e42
Cleaned up app
Mar 7, 2014
d4dd98a
Cleaned uo
Mar 7, 2014
9fde798
Cleaned up
Mar 7, 2014
e81a855
Removed compass from imports in favor of plugeable libs and autoprefixer
Mar 7, 2014
80068a0
Added tint and shade function
Mar 7, 2014
2adb5c4
Removed compass module reference
Mar 7, 2014
af9b74d
Removed compass module reference, removed left-over file extension
Mar 7, 2014
391a10f
Cleaned up button module
Mar 7, 2014
30a8398
deleted compass config file
Mar 7, 2014
d4e89c3
Defaulted autoprefixer to true, better error handling
Mar 7, 2014
e902d9c
Updated dependencies
Mar 7, 2014
d4e7209
Updated todo's
Mar 9, 2014
ec7a0e9
Added todo's
Mar 11, 2014
ed99b87
Added support for 'auto' value
Mar 11, 2014
7792a6c
Added GA
Mar 12, 2014
91fccb1
Updated Todos
Mar 12, 2014
8ad2188
Cleared a bunch of todo's. Refer to that file for specifics.
Mar 12, 2014
68318d5
Fixed typo
Mar 13, 2014
54d62f0
Replaced custom livereloading with easier module
Mar 13, 2014
6efdfc1
Fixed some todo's
Mar 13, 2014
083cf17
Better sass compiling
Mar 13, 2014
94957a7
Cleaned up TODO's
Mar 13, 2014
91f32d3
Merge branch 'wip'
Mar 13, 2014
69bc9ce
Bumped version
Mar 13, 2014
1150384
Merge branch 'master' into wip
Mar 13, 2014
26e7ed4
Merge branch 'master' of https://github.com/flovan/headstart
Mar 14, 2014
f63bfe5
Reimplemented gulp-ruby-sass
Mar 14, 2014
1dcf8e5
Merge branch 'wip'
Mar 14, 2014
bd51400
Moved function import before config_site
Mar 14, 2014
87ea7d1
Merge branch 'master' into wip
Mar 14, 2014
e4e73c0
Added h6 selector to _text module
Mar 14, 2014
0ef9b82
Merge branch 'master' into wip
Mar 14, 2014
361d42c
Added empty placeholder folders
Mar 14, 2014
a8f3d74
Merge branch 'master' into wip
Mar 14, 2014
53071ef
Added fix that prevents the sass watch from crashing after a syntax e…
Mar 15, 2014
a82d9c4
Merge branch 'wip'
Mar 15, 2014
7cba7e3
Added minimal-ui value to viewport tag
Mar 17, 2014
3483a54
Updates
Mar 17, 2014
3857672
Updated dependency
Mar 17, 2014
a8b49fb
Merge branch 'wip'
Mar 17, 2014
7b7e793
Updated todo's
Mar 17, 2014
329cb4a
Deleted Github docs
Mar 17, 2014
6efb71a
Update README.md
Mar 17, 2014
e0296e7
Update TODO.md
Mar 17, 2014
3f9236c
Merge branch 'master' into wip
Mar 17, 2014
76cdec3
Added to-do
Mar 27, 2014
4873dfc
Fixed gitignore that caused a bug due to missing file
Apr 9, 2014
55e1307
Fixed gitignore that caused a bug due to missing file
Apr 9, 2014
76a559b
Added missing file
Apr 9, 2014
c24a7cd
Initial commit (untested)
Apr 26, 2014
5e18c46
New package apparently
Apr 26, 2014
f9eb0a8
Pruning and bugfixes, added custom $ lib
Apr 26, 2014
8199979
Bumped version, matched description to package
Apr 26, 2014
af74808
Fixes and optimizations
Apr 27, 2014
b7d3281
Prepared download and unzip
Apr 27, 2014
1b2fd3c
Bugfixes and tweaks
Apr 27, 2014
c3bb584
Updated list
Apr 27, 2014
258475e
Clean up and new download process (wip)
Apr 28, 2014
5ed1b71
Fixed scaffolding process
Apr 28, 2014
0633397
Updated deps
Apr 28, 2014
575a54b
New ascii for info logs
Apr 28, 2014
83c7d2b
Cleaned up, fixed sass dep reloads
Apr 28, 2014
fd0b08e
Removed boilerplate files
Apr 28, 2014
1874efd
Better Q/A flow, now loading wip boilerplate files
Apr 28, 2014
3dba66c
Added item
Apr 29, 2014
8a027a2
Added todo
Apr 30, 2014
50c2d7d
Extended info log
Apr 30, 2014
7092249
Made template system more flexible
Apr 30, 2014
46427c2
Removed redundant file
Apr 30, 2014
04db4bc
Updated deps
Apr 30, 2014
4d8cb96
Better ascii
Apr 30, 2014
2db49ca
Fix for Winblows paths
Apr 30, 2014
fdfa663
Pruning, fixed info task
Apr 30, 2014
1f0bdbe
Tweaks
Apr 30, 2014
65aa109
Updated deps
Apr 30, 2014
0769d96
Updated to-do list
Apr 30, 2014
90dffa5
Merge branch 'cli'
Apr 30, 2014
47025b3
Removed redundant files
Apr 30, 2014
c3ed781
1.0.0
Apr 30, 2014
8c9a5da
Bumped version, updated content
Apr 30, 2014
f699618
Checklisted
May 1, 2014
ceb5082
Update .travis.yml
May 1, 2014
db8e1a0
Update .travis.yml
May 1, 2014
28b6839
Update .travis.yml
May 1, 2014
f08e241
Removed leftover file
May 1, 2014
9270170
Fixed bug that crashed process when --serve'ing
May 1, 2014
98b7ec6
Merge branch 'hotfix'
May 1, 2014
65f59de
Merge branch 'master' into minor-rev
May 1, 2014
2c849ef
Fine-tuned html minification
May 4, 2014
e694131
Updated todos
May 4, 2014
780d04d
Working Handlebars templating
May 5, 2014
f222463
Minor bump, fixed deps
May 5, 2014
237b762
Fixes for templating, added deporder to scripts
May 6, 2014
2ae4a8f
Fixed url
May 6, 2014
6bb3dba
Fixed bug with deporder
May 7, 2014
9d74ee1
Updated
May 7, 2014
41957fc
Updated deps, switched to fork of gulp-connect
May 8, 2014
595eb84
Cleaned up README
May 8, 2014
5ff1112
Updated
May 8, 2014
3235535
Revert 9d74ee1..5ff1112
May 8, 2014
da48000
Cleaned up
May 8, 2014
362f914
_ exclusions for ALL the files, custom repo init
May 8, 2014
84a2e97
Trying out uncss and combine-media-queries
May 9, 2014
25e28cf
Added uncss, better globbing and deporder
May 11, 2014
f6fe9f9
Updated
May 11, 2014
41b6863
Merge branch 'minor-rev'
May 11, 2014
ecf3e69
Updated deps
May 11, 2014
5644831
Made uncss optional
May 11, 2014
a97bbe9
1.1.1
May 11, 2014
f2ce71d
Less files for NPM installs
May 27, 2014
330fc15
Fixed error crash issue
May 27, 2014
4e88a04
Updated deps
May 27, 2014
a9ce428
Plumbered ALL the streams
May 27, 2014
0553ef0
Updated list
May 27, 2014
d48975c
Merge branch 'bugfixes'
May 27, 2014
192b839
Fixed sass reload bug
May 27, 2014
647741e
Updated packages
Jun 1, 2014
6c46785
Expanded readme
Jun 1, 2014
8d89b3b
Updated
Jun 1, 2014
4303e7a
Added W3C, revisioning, cleaned up
Jun 1, 2014
03002f8
Fixed a whoopsie with the latest Liftoff update
Jun 1, 2014
13ff8d8
Fixed link
Jun 1, 2014
5153325
Added feedback request
Jun 1, 2014
ae6dd1d
Merge branch 'minor-features' into patch-ie-patches-fix
Jun 7, 2014
e7a3b50
Fixes for better ie support
Jun 7, 2014
2eb0b4a
Merge branch 'patch-ie-patches-fix'
Jun 17, 2014
a004c53
Fixes npm install bug and reintroduces conditional comments
Jun 17, 2014
9b1926b
Moar todo's
Jun 17, 2014
9b072e6
Fixed typos
bradcerasani Jun 23, 2014
57afbdb
Merge pull request #10 from bradcerasani/patch-1
Jun 23, 2014
e1b3d98
Now checking for updates
Jun 23, 2014
1ab3982
Updated
Jun 23, 2014
9143304
Fixed some todos
Jun 23, 2014
67b30d0
New livereloading module, started log stripping
Jun 23, 2014
cbc8f86
Trying to fix strip-debug .. without success
Jun 24, 2014
312bd0c
strip-debug now working
Jun 25, 2014
2fa6e0d
Cleaned up CLI
Jun 25, 2014
ce3984f
auto prefix by default, broader globbing, and more
Jun 25, 2014
f075568
Updated deps
Jun 25, 2014
f5dad5d
Cleared todo in favour of GH issue
Jun 25, 2014
29fb255
Added `--base` reference to info print
Jul 5, 2014
9103123
Fixed typo, better scaffolding w/ some validation
Jul 5, 2014
ac55825
Updated deps
Jul 5, 2014
6f9384a
Tweaked and added comments
Jul 5, 2014
364c76f
Updated readme
Jul 5, 2014
7ae2b87
Added direct links to subpages
Jul 5, 2014
ef9253d
Final tweaks
Jul 5, 2014
3458599
Merge branch 'patch-bugfixes'
Jul 5, 2014
59a2332
Bugfixes and small feature additions
Jul 5, 2014
5d9c5b9
Merge branch 'master' into minor-features
Jul 17, 2014
49bbda0
Removed redundant line
Jul 17, 2014
ee84636
Fixes for update notifier and cleaner cli
Jul 19, 2014
edce765
Added item
Jul 19, 2014
1463206
Updated reps
Jul 19, 2014
4b686c5
Cleaned up a bit
Jul 19, 2014
46beda5
Replacing manual require's with lazyload module
Jul 19, 2014
532fdda
Cleaned up
Jul 19, 2014
4518ab3
Prettier CLI output
Jul 19, 2014
2001aa3
Included PageSpeed Insights (+ Ngrok)
Jul 19, 2014
09dea78
Fixes for PSI
Jul 19, 2014
6156814
Fixes for PSI, closes #18
Jul 19, 2014
aa95a71
Re-reverting
Jul 19, 2014
56556c7
Added some todos
Jul 23, 2014
d0e7f10
Small fixes for revision caching
Jul 23, 2014
801e1c7
WIP; Cleaned up, fixed deps, optimisations
Jul 24, 2014
af1bdae
Added shorthand command 'hs'
mistermark Jul 27, 2014
a387fd3
Merge pull request #25 from mistermark/minor-features
Jul 27, 2014
325ad8d
Updated dep, small cleanup
Jul 28, 2014
238efbb
Updated reps, small cleanup, updated cli info
Jul 28, 2014
da80d58
Fixes for revisioned css files, tweaks to cli
Jul 28, 2014
84b82b7
Cleanup, updated deps, added crude muting for Gulp
Aug 1, 2014
b23e076
Code style + cleanup
Aug 3, 2014
6a9b4b3
Fixed issue with views-specifics, added tunnelling
Aug 6, 2014
24c7a6e
Cleaned up, updated deps
Aug 8, 2014
3d59d29
Merge branch 'minor-features'
Aug 8, 2014
0d21c1b
1.2.0
Aug 8, 2014
28b7d2f
Fix for missing css in `--production` mode
Aug 8, 2014
ddcfcdd
1.2.1
Aug 8, 2014
6d0d6dc
Hotfix removed leftover code
Aug 8, 2014
2122f9f
1.2.2
Aug 8, 2014
c194053
Fixes #32
Aug 16, 2014
7b700a0
Fixes page specific assets bug
Aug 16, 2014
d061e73
Updated deps, looser muting (fixes #33)
Aug 24, 2014
3bba878
(indenting) tweaks, added progress bar to build
Aug 26, 2014
20391cb
Expose htmlmin opts in `config.json`, fixes 29
Aug 27, 2014
5777d55
Formatting, cleaning up uncss
Aug 27, 2014
3c3246d
Fixes for uncss, code style, css minifyer, todo's
Aug 31, 2014
2bf21a3
Update README.md
Aug 31, 2014
1cd717b
Update README.md
Aug 31, 2014
dccc25d
Updated deps, sync'd tweaks to Readme (master)
Sep 1, 2014
2f920a1
Added todo's
Sep 1, 2014
7552900
Added todo's
Sep 2, 2014
325b080
Added to-do
Sep 2, 2014
0521e0b
Sass errors now showing up again
Sep 2, 2014
05a377a
Fixed some todo's
Sep 2, 2014
b2b0734
Fix #36
Sep 11, 2014
248f8bb
Added todo
Sep 11, 2014
92136f1
Custom server port through optional config setting
Sep 15, 2014
51375ca
Added Todo
Sep 23, 2014
8218bd4
Catch during-build JSHint errors and queue them
Sep 23, 2014
f094d7d
Added configurable proxy, cleanup
Sep 23, 2014
071d9e1
Moved some TODO's around
Sep 23, 2014
635f0ce
Added todo
Sep 24, 2014
37ba30e
Fixed IE sass, some TODO tweaks
Sep 24, 2014
580c50c
Fixed merge conflict with a forgotten commit
Sep 24, 2014
14699e7
made "open" and "ngrok" redundant; fixes #35
Sep 24, 2014
051a1ca
No more revisioning of non-default ("other") files
Sep 25, 2014
5242d7a
No more multiple reloads for templates, todo's
Sep 25, 2014
80c40fd
Added to-do
Sep 26, 2014
393d276
new deps, WIP setting up latest gulp-watch
Oct 3, 2014
916b840
Cleaner log catching/buffering, release checklist
Oct 14, 2014
4e2ce48
More todo's, expanded checklist
Oct 16, 2014
6a32a7c
css-minifier fix for IE8, allow logging of gulp-plumber
Oct 30, 2014
4720222
close #38; added todo and updated browserSync options
Oct 30, 2014
07913da
Fixed some todo's
Oct 30, 2014
23d456f
Tweak to CLI, added deporder to --production
Oct 31, 2014
8151456
Added logging of imagemin and js concat info
Oct 31, 2014
15ebc10
Allowed logging of w3c and uncss messages
Oct 31, 2014
a1059eb
CLI cleanup
Oct 31, 2014
0de82d8
Updated boilerplate ref
Oct 31, 2014
c8274aa
Merge branch 'minor-release-1.3'
Oct 31, 2014
14b00f5
1.3.0
Oct 31, 2014
2b7dfd4
Fix #42
Nov 4, 2014
b176604
Fixed reloading bug
Nov 4, 2014
19448b9
Added Gitter badge
Nov 18, 2014
a454cb1
Fixes #48, closes #46
Dec 27, 2014
8691d73
Merge branch 'patch-release-v1.3.2'
Dec 27, 2014
9a0ffa6
Fixes issue with boilerplate, improves CLI, ads config option
Dec 27, 2014
89a68fa
Updated dependencies
alexanderkwright Apr 1, 2016
682bfcf
Replaced MinifyCSS code with CleanCSS
alexanderkwright Apr 1, 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*node_modules*
*.DS_Store*
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.travis.yml
TODO.md
RELEASE-CHECKLIST.md
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: node_js
node_js:
- "0.10"
- "0.11"
script: ./bin/headstart.js
branches:
only:
- master
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 Florian Vanthuyne <hello@flovan.me>

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.
47 changes: 41 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,42 @@
Boilerplate 0.2
===============
# [Headstart](website-url), an automated front-end setup

An opinionated boilerplate/workflow build on modular snippets, including [Sass](http://sass-lang.com/), [Compass](http://compass-style.org/), [Respond](https://github.com/scottjehl/Respond), [Require](http://requirejs.org/), ... with a mobile-first approach. It's a collection of snippets & best practices combined to a personal workflow, with flexible re-usability and copy-paste-whatever-you-need in mind. Works great as a framework within [CodeKit](http://incident57.com/codekit/), but that's just a personal preference.

Feedback, questions, ...
Get in touch [@gwenvanhee](http://www.twitter.com/gwenvanhee)
> Headstart is an all-in-one task runner that frees front-end developers of the little worries that come along with modern web development. If you ever wanted to use tools like [Grunt](http://gruntjs.com/) or [Gulp](http://gulpjs.com/), but found the configuration too troublesome, you will probably like this pre-configured setup better.

[![NPM version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Gitter][gitter-image]][gitter-url]

## Documentation

- [Getting started][getting-started-url]
- [Base Setup][base-setup-url]
- [Upgrading][ugrading-url]

## ♥ Feedback

What did you like? What didn't you like? Did you get stuck somewhere? Where the docs easy to follow, or did you give up at a certain point?

This is a one-man project, so some approaches might be personated. Nevertheless, Headstart is meant to be used by other people as well, so your feedback is very valuable!

[Mail me anything at all](mailto:hello@flovan.me) or [add an issue][issues-url].

## Updates

For all updates, follow [@headstartio][twitter-url] on Twitter.
Changes can be found on [the changelog page][changelog-url].

[website-url]: http://headstart.io
[getting-started-url]: http://headstart.io/installation
[base-setup-url]: http://headstart.io/base-setup
[changelog-url]: http://www.headstart.io/changelog
[ugrading-url]: http://headstart.io/upgrading-guide
[twitter-url]: https://twitter.com/headstartio
[issues-url]: https://github.com/flovan/headstart/issues
[npm-url]: https://npmjs.org/package/headstart
[npm-image]: https://badge.fury.io/js/headstart.svg
[travis-url]: https://travis-ci.org/flovan/headstart
[travis-image]: https://travis-ci.org/flovan/headstart.svg
[downloads-url]: https://github.com/flovan/headstart
[downloads-image]: http://img.shields.io/npm/dm/headstart.svg
[david-url]: https://david-dm.org/flovan/headstart
[david-image]: https://david-dm.org/flovan/headstart.png?theme=shields.io
[gitter-url]: https://gitter.im/flovan/headstart?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[gitter-image]: https://badges.gitter.im/Join%20Chat.svg
43 changes: 43 additions & 0 deletions RELEASE-CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## Release checklist

A list of things that need to work for each and every release.

### Initialising

- [ ] Boilerplate files have been updated and packaged into a release
- [ ] The latest boilerplate release can be scaffolded through `hs init` *and* `headstart init`
- [ ] Files can be served through the init
- [ ] A browser can be opened from the init
- [ ] An editor can be opened from the init

### CLI testing

- [ ] A build is successfull through `hs build`
- [ ] A production build is success through `hs build --p` *and* `hs build --production`
- [ ] Files can be served in development through `hs build --s` *and* `hs build --serve`
- [ ] Files can be served in production through `hs build --s --p` *and* `hs build --serve --production`
- [ ] A browser can be opened through `hs build --s --o` *and* `hs build --serve --open`
- [ ] A browser can not be opened without `--s`
- [ ] An editor can be opened through `hs build --e` *and* `hs build --edit` *and* `hs build --s --e` *and* `hs build --s --edit`
- [ ] A tunnel can be initiated through `hs build --s --t` *and* `hs build --s --tunnel`
- [ ] A custom tunnel can be initiated through `hs build --s --t=bla` *and* `hs build --s --tunnel=bla` and returns `bla.localtunnel.me` (or something) when available
- [ ] Google PSI can be initiated through `hs build --s --t --psi`
- [ ] The "mobile" PSI strategy can be set through `hs build --s --t --psi --strategy=mobile`
- [ ] Google PSI can not be initiated without both `--s` and `--t`

### Development

- [ ] JS files get injected
- [ ] Changes to JS files reload the page
- [ ] Added/deleted JS files reload the page and update the injected files
- [ ] CSS files get injected
- [ ] Changes to CSS files update the page
- [ ] Added/deleted CSS files reload the page and update the injected files
- [ ] Images get copied over
- [ ] Changes to images trigger a reload

### Production

- [ ] A `.favicon` is generated in the root
- [ ] A `.htaccess` is generated in the root
- [ ] All `./misc` files are copied over to the root
71 changes: 71 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
### TODO's:

- [ ] Fix crash when missing `// requires` file is found
- [ ] Adding new view js files doesn't seem to add them to gaze

### A list of things to explore:

- [ ] Think about fixed size columns for eg ads
- [ ] Try to have revisioned images, even though updating references in other files will be hard (https://github.com/smysnk/gulp-rev-all, maybe https://www.npmjs.org/package/gulp-hash/ + https://www.npmjs.org/package/gulp-hash-references/)
- [ ] Watch changes on config and folders like fonts/video, and rebuild (https://github.com/leny/gulp-supervisor & https://github.com/JacksonGariety/gulp-nodemon & https://www.npmjs.org/package/keepup/)
- [ ] See if Commander is a better alternative to LiftOff (https://github.com/visionmedia/commander.js)
- [ ] Try replacing gulp-inject with gulp-include-source (https://www.npmjs.org/package/gulp-include-source/)
- [ ] See if scripts tasks can be made faster with gulp-remember (https://github.com/ahaurw01/gulp-remember)
- [ ] Maybe do something with icon fonts from SVG files (https://www.npmjs.org/package/gulp-fontcustom/ or https://github.com/nfroidure/gulp-iconfont or https://github.com/nfroidure/gulp-svgicons2svgfont)
- [ ] Make it possible to use LESS (https://www.npmjs.org/package/gulp-less/)
- [ ] Make it possible to use Stylus (https://www.npmjs.org/package/gulp-stylus/)
- [ ] Maybe replace some CSS processing modules with gulp-pleeease (https://www.npmjs.org/package/gulp-pleeease/)
- [ ] Try having critical css inlined (http://css-tricks.com/authoring-critical-fold-css/ & https://github.com/pocketjoso/penthouse/#as-a-node-module OR https://github.com/filamentgroup/criticalcss)
- [ ] Use SassDoc (https://github.com/SassDoc/gulp-sassdoc)
- [ ] Split up gulpfile into task files (https://github.com/whitneyit/gulp-taskify or https://www.npmjs.org/package/gulp-hub/)
- [ ] Remove deleted / renamed files from export folder with gulp-sync-files (https://www.npmjs.org/package/gulp-sync-files/)
- [ ] Replace Ender by Cash when it gets out of alpha (https://github.com/kenwheeler/cash)
- [ ] Check out HeadJS (http://headjs.com)
- [ ] Implement gulp-foreach (https://www.npmjs.org/package/gulp-foreach/)
- [ ] Make sure a key can be used with PSI (without any uncaught TypeError)
- [ ] Simpler watch setup > https://gist.github.com/Snugug/2dc9ff47ce4b4acb28f6


### Take a look at these plugins also

- https://www.npmjs.org/package/del/ instead of gulp-rimraf (will prolly have to use https://www.npmjs.org/package/gulp-filenames)
- CDN Solution https://www.npmjs.org/package/gulp-cdnizer/
- https://www.npmjs.org/package/gulp-log-capture
- https://www.npmjs.org/package/gulp-static-handlebars
- https://www.npmjs.org/package/gulp-if-else
- https://www.npmjs.org/package/gulp-headerfooter
- https://www.npmjs.org/package/gulp-htmlrefs OR https://www.npmjs.org/package/gulp-rev-replace
- https://www.npmjs.org/package/favicons

### Done

- [x] Fix reloading when a layout/partial changes
- [x] Find a better/smarter templating system https://www.npmjs.org/package/gulp-file-insert/
- [x] Find better (smaller, dep-less) way of stripping comments from --production HTML
- [x] Allow custom repo's to be set for scaffolding
- [x] Fix sass and htmlmin error crashes
- [x] Add W3C validation option to config (https://www.npmjs.org/package/gulp-w3cjs/)
- [x] Try out revisions to leverage cache control (https://github.com/sindresorhus/gulp-rev)
- [x] Generate a cache manifeset for --production (https://www.npmjs.org/package/gulp-manifest/ + http://diveintohtml5.info/offline.html)
- [x] Replace livereloading with browser-sync (https://github.com/shakyShane/browser-sync through http://shakyshane.com/gulpjs-sass-browsersync-ftw/)
- [x] ^ Fix logging by gulp-connect (~~muting https://www.npmjs.org/package/mute-stream~~)
- [x] Auto-check for updates (~~http://stackoverflow.com/questions/20686244/install-programmatically-a-npm-package-providing-its-version and http://stackoverflow.com/questions/11949419/nodejs-npm-show-latest-version-of-a-module~~ https://github.com/yeoman/update-notifier)
- [x] Make box-sizing work through inherit (http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice)
- [x] Find a less crude way of muting module output through gulp-util
- [x] Put Liftoff logo on website (https://www.npmjs.org/package/liftoff)
- [x] Make HTML minifier options configurable through `config.json`
- [x] Properly test gulp-combine-media-queries (Result: saves a few KB's, enabling by default in boilerplate v1.1.1)
- [ ] ~~Use a different minifier (https://www.npmjs.org/package/gulp-compressor/ or https://www.npmjs.org/package/gulp-minifier/)~~
- [ ] ~~Check out csscss (https://www.npmjs.org/package/gulp-csscss/)~~
- [x] Properly test Uncss
- [x] Pass gulp-ruby-sass errors instead of uncss notification
- [x] Remove ender and underscore map from underscore.js
- [x] Turn aliasing into state, and extend to doc/button/form module
- [x] Fix url in update notice
- [x] Fix jshint logs appearing in the middle of the progressbar
- [x] Dry out modules
- [x] Drop `open` in favour of opening the browser through `browsersync`
- [x] A build starting with a Sass error will result in pages without (a) css file(s)
- [x] Disable (and warn about disabling of) w3c validation when not ".html"
- [x] Re-add `open` because openEditor won't work otherwise..

190 changes: 190 additions & 0 deletions bin/headstart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
#!/usr/bin/env node
'use strict';

// To see an extended Error Stack Trace, uncomment
// Error.stackTraceLimit = 9000;

// REQUIRES -------------------------------------------------------------------
//
// Note: Gulp related requires are made further down to speed up the first
// part of this script

var
path = require('path'),
fs = require('fs'),
chalk = require('chalk'),
_ = require('lodash'),

pkg = require('../package.json'),
Liftoff = require('liftoff'),
updateNotifier = require('update-notifier'),
argv = require('minimist')(process.argv.slice(2)),
gulp,
gulpFile
;

// CLI CONFIGURATION ----------------------------------------------------------
//

var cli = new Liftoff({
name: 'headstart'
});

// CHECK FOR UPDATES ----------------------------------------------------------
//

var notifier = updateNotifier({
packageName: pkg.name,
packageVersion: pkg.version
});

if (notifier.update) {
// Inlined from the update-notifier source for more control
console.log(
chalk.yellow('\n\n┌──────────────────────────────────────────┐\n|') +
chalk.white(' Update available: ') +
chalk.green(notifier.update.latest) +
chalk.grey(' (current: ' + notifier.update.current + ') ') +
chalk.yellow('|\n|') +
chalk.white(' Instructions can be found on: ') +
chalk.yellow('|\n|') +
chalk.magenta(' http://headstart.io/upgrading-guide ') +
chalk.yellow('|\n') +
chalk.yellow('└──────────────────────────────────────────┘\n')
);
}

// LAUNCH CLI -----------------------------------------------------------------
//

cli.launch({}, launcher);

function launcher (env) {

var
versionFlag = argv.v || argv.version,
infoFlag = argv.i || argv.info || argv.h || argv.help,

allowedTasks = ['init', 'build'],
task = argv._,
numTasks = task.length
;

// Check for version flag
if (versionFlag) {
logHeader(pkg);
process.exit(0);
}

// Log info if no tasks are passed in
if (!numTasks) {
logInfo(pkg);
process.exit(0);
}

// Warn if more than one tasks has been passed in
if (numTasks > 1) {
console.log(chalk.red('\nOnly one task can be provided. Aborting.\n'));
logTasks();
process.exit(0);
}

// We are now sure we only have 1 task
task = task[0];

// Print info if needed
if(infoFlag) {
logInfo(pkg);
process.exit(0);
}

// Check if task is valid
if (_.indexOf(allowedTasks, task) < 0) {
console.log(chalk.red('\nThe provided task "' + task + '" was not recognized. Aborting.\n'));
logTasks();
process.exit(0);
}

// Change directory to where Headstart was called from
if (process.cwd() !== env.cwd) {
process.chdir(env.cwd);
console.log(chalk.cyan('Working directory changed to', chalk.magenta(env.cwd)));
}

// Require gulp assets
gulp = require('gulp');
gulpFile = require(path.join(path.dirname(fs.realpathSync(__filename)), '../gulpfile.js'));

// Start the task through Gulp
process.nextTick(function () {
gulp.start.apply(gulp, [task]);
});
}

// HELPER FUNCTIONS -----------------------------------------------------------
//

function logInfo (pkg) {
logHeader(pkg);
logTasks();
}

function logHeader (pkg) {
console.log(
chalk.cyan(
'\n' +
'| | | |\n' +
'|---.,---.,---.,---|,---.|--- ,---.,---.|---\n' +
'| ||---\',---|| |`---.| ,---|| |\n' +
'` \'`---\'`---^`---\'`---\'`---\'`---^` `---\'\n\n'
) +
chalk.cyan.inverse('➳ http://headstart.io') +
' ' +
chalk.yellow.inverse('v' + pkg.version) + '\n'
);
}

function logTasks () {
console.log(
chalk.grey.underline('To start a new project, run:\n\n') +
chalk.magenta('headstart init [flags]') +
chalk.grey(' or ') +
chalk.magenta('hs init [flags]\n\n') +
chalk.white('--base <source>') +
chalk.grey('\t\tUse a custom boilerplate repo, eg. user/repo#branch\n')
);
console.log(
chalk.grey.underline('To build the project, run:\n\n') +
chalk.magenta('headstart build [flags]') +
chalk.grey(' or ') +
chalk.magenta('hs build [flags]\n\n') +
chalk.white('--s, --serve') +
chalk.grey('\t\tServe the files on a static address\n') +
chalk.white('--o, --open') +
chalk.grey('\t\tOpen up a browser for you (default Google Chrome)\n') +
chalk.white('--e, --edit') +
chalk.grey('\t\tOpen the files in your editor (default Sublime Text)\n') +
chalk.white('--p, --production') +
chalk.grey('\tMake a production ready build\n') +
chalk.white('--t, --tunnel') +
chalk.grey('\t\tTunnel your served files to the web (requires --serve)\n') +
chalk.white('--psi') +
chalk.grey('\t\t\tRun PageSpeed Insights (requires --serve and --tunnel)\n') +
//chalk.white('--key <key>') +
//chalk.grey('\t\tOptional, an API key for PSI\n') +
chalk.white('--strategy <type>') +
chalk.grey('\tRun PSI in either "desktop" (default) or "mobile" mode\n\n') +
chalk.white('--verbose') +
chalk.grey('\t\tOutput extra information while building\n')
);
console.log(
chalk.grey.underline('For information, run:\n\n') +
chalk.magenta('headstart [flags]') +
chalk.grey(' or ') +
chalk.magenta('hs [flags]\n\n') +
chalk.white('--i, --info,\n--h, --help') +
chalk.grey('\t\tPrint out this message\n') +
chalk.white('--v, --version') +
chalk.grey('\t\tPrint out version\n')
);
}
Loading