Skip to content

Commit

Permalink
Releasing v1.0.0 - #1
Browse files Browse the repository at this point in the history
  • Loading branch information
S1SYPHOS committed Feb 1, 2017
1 parent 9fb123e commit d26b8fc
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 38 deletions.
92 changes: 60 additions & 32 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
'use strict';

/*
---------------------------------------
I. Prerequisites
---------------------------------------
*/

var
browserSync = require('browser-sync').init,
cache = require('gulp-memory-cache'),
Expand Down Expand Up @@ -27,10 +33,19 @@ var
;


// STYLES

/*
* `gulp lint:styles` - lints styles using stylelint (config under 'stylelint' in package.json)
---------------------------------------
II. Assets
---------------------------------------
*/


/*
* 1. Styles
*
* `gulp lint:styles` - lints styles using stylelint (config under 'stylelint' in package.json)
* `gulp make:styles` - compiles sass into css & minifies it (production)
*/

gulp.task('lint:styles', function() {
Expand All @@ -44,11 +59,6 @@ gulp.task('lint:styles', function() {
;
});


/*
* `gulp make:styles` - compiles sass into css & minifies it (production)
*/

gulp.task('make:styles', function() {

var onError = function(err) {
Expand Down Expand Up @@ -78,10 +88,12 @@ gulp.task('styles', gulp.series(
));


// SCRIPTS

/*
* 2. Scripts
*
* `gulp lint:scripts` - lints javascript using eslint & caches results (config under eslintConfig in package.json)
* `gulp make:scripts` - compiles / concatenates javascript & minifies it (production)
*
*/

gulp.task('lint:scripts', function() {
Expand All @@ -92,11 +104,6 @@ gulp.task('lint:scripts', function() {
.pipe(eslint.format())
});


/*
* `gulp make:scripts` - compiles / concatenates javascript & minifies it (production)
*/

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

return gulp.src(config.assets.source + '/scripts/main.js')
Expand All @@ -115,9 +122,9 @@ gulp.task('scripts', gulp.series(
));


// IMAGES

/*
* 3. Images
*
* `gulp images` - compressing images (unless they already got compressed)
*/

Expand All @@ -135,9 +142,9 @@ gulp.task('images', function() {
});


// FONTS

/*
* 4. Fonts
*
* `gulp fonts`
*/

Expand All @@ -150,10 +157,32 @@ gulp.task('fonts', function () {
});


// SERVER
/*
* 5. Fonts
*
* `gulp build` - compiles & collects all assets simultaneously
*/

gulp.task('build', gulp.parallel(
'styles',
'scripts',
'images',
'fonts'
));



/*
---------------------------------------
III. Development / Deployment
---------------------------------------
*/


/*
* gulp server - starts a local development server
* 1. Development Server
*
* gulp server - starts a local development server, using php & live-reload via browsersync
*/

gulp.task('connect', function() {
Expand All @@ -170,10 +199,10 @@ gulp.task('server', gulp.parallel(
));


// WATCH TASKS

/*
* `gulp watch` - watches for changes, recompiles & injects html + assets
* 2. Monitoring
*
* `gulp watch` - watches for changes, recompiles & injects assets
*/

gulp.task('watch:styles', function() {
Expand Down Expand Up @@ -228,9 +257,10 @@ gulp.task('watch', gulp.parallel(
));


// DEPLOY

/*
* 3. Deployment
*
* `gulp deploy` - pushes site content onto a remote repository
*/

Expand All @@ -240,17 +270,15 @@ gulp.task('watch', gulp.parallel(
// });


// GENERAL TASKS

gulp.task('assets', gulp.parallel(
'styles',
'scripts',
'images',
'fonts'
));
/*
---------------------------------------
IV. The best of all possible worlds
---------------------------------------
*/

gulp.task('default', gulp.series(
'assets',
'build',
gulp.parallel(
'server',
'watch'
Expand Down
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,39 @@ If you just want to have a look, feel free to do so with `php -S localhost:8000`


## Features
work in progress
This boilerplate is growing fastly and already provides a solid starting point that you can build upon. For now, just check gulpfile.js or package.json to find out about all the included / planned features!

Workflow:
- Sass / node-sass / libsass
- Webpack
- Bourbon / Bitters
- Image optimization
- Minification (styles & scripts)
- ...

Kirby plugins:
- [Visual Markdown](https://github.com/JonasDoebertin/kirby-visual-markdown)
- [Fingerprint](https://github.com/iksi/KirbyFingerprint)
- ...

_to be continued_


## Getting started
Make sure [Node.js](http://nodejs.org/) is installed on your system, then clone this repository and install its dependencies via [NPM](https://npmjs.org/).
Make sure [Node.js](http://nodejs.org/) is installed on your system, then clone this repository (and all included submodules) and install its dependencies via [NPM](https://npmjs.org/):

```bash
$ git clone --recursive https://github.com/S1SYPHOS/Gulp-Kirby-Starter-Kit.git your-project
$ cd your-project
$ npm install
```

If you want to update all included submodules later on, it's just these two lines:

```bash
$ git submodule foreach --recursive git checkout master
$ git submodule foreach --recursive git pull
```

## Special Thanks
I'd like to thank everybody that's making great software - you people are awesome. Also I'm always thankful for feedback and bug reports :)
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "gulp-kirby-starter-kit",
"version": "0.1.0",
"version": "1.0.0",
"description": "Gulp v4 - Kirby CMS - Starter",
"author": "S1SYPHOS <[email protected]>",
"homepage": "https://github.com/S1SYPHOS/Gulp-Kirby-Starter-Kit#readme",
"main": "gulpfile.js",
"main": "Gulpfile.js",
"repository": {
"type": "git",
"url": "git+https://github.com/S1SYPHOS/Gulp-Kirby-Starter-Kit.git"
Expand All @@ -19,10 +19,10 @@
],
"scripts": {
"start": "gulp",
"stage": "NODE_ENV=production gulp",
"build": "NODE_ENV=production gulp build",
"deploy": "NODE_ENV=production gulp build && gulp deploy",
"stage": "NODE_ENV=production gulp",
"devel": "gulp build",
"check": "gulp lint:styles && gulp lint:scripts",
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
Expand Down

0 comments on commit d26b8fc

Please sign in to comment.