Next content push
- changed .gitignore for art folder - add gulp processing for art - changed nunjucks templates file structure to reflect demo files - removed file for new styles - renamed most sass variables - added sass function for space classes - great progress with content of the intro page - moved old gulp tasks to DEPRECATED.md
This commit is contained in:
parent
48437cc4f4
commit
92d1609213
37 changed files with 664 additions and 637 deletions
134
DEPRECATED.md
134
DEPRECATED.md
|
|
@ -1,6 +1,8 @@
|
|||
# Deprecated stuff
|
||||
|
||||
## Packages
|
||||
## Gulp
|
||||
|
||||
### Packages
|
||||
|
||||
```
|
||||
"gulp-ruby-sass": "^2.1.1",
|
||||
|
|
@ -11,6 +13,136 @@
|
|||
"gulp-useref": "^3.1.5",
|
||||
```
|
||||
|
||||
### Code
|
||||
|
||||
```
|
||||
// NOTE // to be deleted
|
||||
|
||||
var oldsource = {
|
||||
watch: ['source/style/hippie/**/*.scss', 'source/style/**/*.scss', 'source/templates/**/*.+(html|njk)', 'source/pages/**/*.+(html|njk)'],
|
||||
styles: ['source/style/demo.scss', 'source/style/maintenance.scss'],
|
||||
scripts: ['source/code/hippie/variables.js', 'source/code/hippie/functions.js', 'source/code/hippie/global.js', 'source/code/**/*.coffee', '!source/vendor/**/*', ],
|
||||
images: 'source/art/**/*',
|
||||
pages: 'source/pages/**/*.+(html|njk)',
|
||||
vendor: 'vendor/**/*'
|
||||
};
|
||||
var oldbuild = {
|
||||
styles: 'build/css',
|
||||
scripts: 'build/js',
|
||||
images: 'build/art',
|
||||
vendor: 'build/vendor',
|
||||
root: 'build'
|
||||
}
|
||||
|
||||
// Task - Clean build directory
|
||||
gulp.task('clean', function() {
|
||||
return del([oldbuild.scripts, oldbuild.styles, oldbuild.images]);
|
||||
});
|
||||
|
||||
// Task - Styles
|
||||
gulp.task('styles', () => rubysass(oldsource.styles, {sourcemap: true})
|
||||
.on('error', rubysass.logError)
|
||||
// .pipe(newer({dest: oldbuild.styles, ext: '.css'}))
|
||||
.pipe(prefix('last 2 version'))
|
||||
.pipe(gulp.dest(oldbuild.styles))
|
||||
.pipe(rename({suffix: '.min'}))
|
||||
.pipe(cssnano())
|
||||
.pipe(sourcemap.write('.', {
|
||||
includeContent: false,
|
||||
sourceRoot: 'source'
|
||||
}))
|
||||
.pipe(gulp.dest(oldbuild.styles))
|
||||
.pipe(browsersync.stream({match: '**/*.css'}))
|
||||
// .pipe(notify({message: 'Style task complete'}))
|
||||
);
|
||||
|
||||
// Task - Scripts
|
||||
gulp.task('scripts', function(cb) {
|
||||
pump([
|
||||
gulp.src(oldsource.scripts),
|
||||
cache('scripts'),
|
||||
jshint('.jshintrc'),
|
||||
jshint.reporter('default'),
|
||||
sourcemap.init(),
|
||||
minify(),
|
||||
remember('scripts'),
|
||||
concat('all.min.js'),
|
||||
sourcemap.write(),
|
||||
gulp.dest(oldbuild.scripts),
|
||||
browsersync.stream()
|
||||
], cb);
|
||||
});
|
||||
|
||||
// Task - Images
|
||||
gulp.task('images', function() {
|
||||
return gulp.src(oldsource.images)
|
||||
.pipe(changed(oldbuild.images))
|
||||
// .pipe(cache(imagemin({
|
||||
// optimizationLevel: 3,
|
||||
// progressive: true,
|
||||
// interlaced: true })))
|
||||
// )
|
||||
.pipe(gulp.dest(oldbuild.images))
|
||||
// .pipe(notify({ message: 'Images task complete' }))
|
||||
;
|
||||
});
|
||||
|
||||
// Task - Vendor
|
||||
gulp.task('oldvendor', function() {
|
||||
return gulp.src(oldsource.vendor)
|
||||
.pipe(plumbError())
|
||||
.pipe(gulp.dest(oldbuild.vendor))
|
||||
;
|
||||
});
|
||||
|
||||
//Task - Nunjucks
|
||||
gulp.task('oldnunjucks', function() {
|
||||
return gulp.src(oldsource.pages)
|
||||
// .pipe(changed(oldbuild.root))
|
||||
.pipe(nunjucks({
|
||||
path: ['source/templates'],
|
||||
envOptions: {
|
||||
trimBlocks: true
|
||||
}
|
||||
}))
|
||||
.pipe(gulp.dest(oldbuild.root))
|
||||
});
|
||||
|
||||
// a task that ensures the other task is complete before reloading browsers
|
||||
gulp.task('prewatch', ['oldnunjucks', 'styles'], function(done) {
|
||||
browsersync.reload();
|
||||
done();
|
||||
});
|
||||
|
||||
// Old watch for file changes
|
||||
gulp.task('oldwatch', ['styles', 'scripts', 'oldnunjucks'], function() {
|
||||
browsersync.init({
|
||||
open: false,
|
||||
server: oldbuild.root,
|
||||
// proxy: "http://verser.vrt/virtual/"
|
||||
});
|
||||
|
||||
gulp.watch(oldsource.scripts, ['scripts']).on('change', function(event) {
|
||||
if (event.type === 'deleted') {
|
||||
delete cache.caches['scripts'][event.path];
|
||||
remember.forget('scripts', event.path);
|
||||
}
|
||||
});
|
||||
// gulp.watch(oldsource.watch, ['prewatch']);
|
||||
gulp.watch(oldsource.watch, ['styles', 'oldnunjucks']).on('change', browsersync.reload);
|
||||
// gulp.watch(oldsource.images, ['images']);
|
||||
});
|
||||
|
||||
gulp.task('olddefault', ['clean', 'styles', 'scripts', 'images', 'nunjucks']);
|
||||
|
||||
// function errorHandler(err) {
|
||||
// // Logs out error in the command line
|
||||
// console.log(err.toString());
|
||||
// // Ends the current pipe, so Gulp watch doesn't break
|
||||
// this.emit('end');
|
||||
// }
|
||||
```
|
||||
|
||||
## Style
|
||||
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue