Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Refactoring - Bootstrap, Bower, Gulp #41

Merged
merged 14 commits into from
Feb 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "bower_components"
}
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,9 @@ drupal/sites/simpletest
# Ignore SimpleTest multi-site environment.
# simpletest


legacy_files
# ignore bower libs
bower_components
node_modules
legacy_files
css/*.css
css/*.css.map
86 changes: 86 additions & 0 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
var gulp = require('gulp'),
bower = require('gulp-bower'),
sequence = require('gulp-sequence'),
concat = require('gulp-concat'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps'),
prefixer = require('gulp-autoprefixer'),
readlineSync = require('readline-sync'),
browserSync = require('browser-sync').create();

gulp.task('bower', function()
{
return bower({
cmd: 'update',
interactive: false
});
});

gulp.task('copy-fonts', function ()
{
return gulp
.src(["./bower_components/ionicons/fonts/*"])
.pipe(gulp.dest('./fonts/ionicons'));
});


gulp.task('sass', function ()
{
if(process.argv[3] === '--' + 'dev' || process.argv[2] === 'watch')
{
return gulp
.src('./sass/infinite-global.scss')
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(prefixer({
browsers: ['last 3 versions', 'IE 9'],
cascade: false
}))
.pipe(sourcemaps.write())
.pipe(concat('infinite-global.css'))
.pipe(gulp.dest('./css'))
.pipe(browserSync.stream());
}
else
{
return gulp
.src('./sass/infinite-global.scss')
.pipe(sass({
outputStyle: 'compressed'
}))
.pipe(prefixer({
browsers: ['last 3 versions', 'IE 9'],
cascade: false
}))
.pipe(concat('infinite-global.css'))
.pipe(gulp.dest('./css'));
}
});


gulp.task('watch', function ()
{
browserSync.init({
proxy: (
process.argv[3] ?
process.argv[3].split('--')[1] :
readlineSync.question('Virtual host (e.g. http://thunder.dev:8888): ')
)
});

gulp.watch('./sass/**', ['sass'])
.on('change', browserSync.reload);

gulp.watch('./js/**')
.on('change', browserSync.reload);

// basic shared tpls
gulp.watch('./templates/**')
.on('change', browserSync.reload);
});


gulp.task('default', function(callback)
{
sequence('bower', 'copy-fonts', 'sass')(callback)
});
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Infinite

[![Total Downloads](https://poser.pugx.org/burdamagazinorg/infinite_theme/downloads?format=flat-square)](https://packagist.org/packages/burdamagazinorg/infinite_theme)
[![Monthly Downloads](https://poser.pugx.org/burdamagazinorg/infinite_theme/d/monthly?format=flat-square)](https://packagist.org/packages/burdamagazinorg/infinite_theme)
[![License](https://poser.pugx.org/burdamagazinorg/infinite_theme/license?format=flat-square)](https://packagist.org/packages/burdamagazinorg/infinite_theme)

awesome Drupal 8 theme delivered with [Thunder CMS](http://www.thunder.org).

![Theme preview](./images/infinite.png)

### Installation

1. go to theme path in bash: `cd docroot/themes/contrib/infinite_theme`
2. type: `npm install` for build theme for production use

### Development

- `gulp` build theme for production use (starting after npm install)
- `gulp bower` just run bower.json update
- `gulp sass` generate compressed CSS for production use
- `gulp sass --dev` generate readable CSS with source maps
- `gulp watch` auto-builds if detected change in sass / templates / js and reload browser thanks BrowserSync
- `gulp watch --http://yourhost.local:8888` quick way without user input
- `gulp watch --http://yourhost.local:8888 --dev` quick development sass
16 changes: 16 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "infinite",
"version": "0.0.1",
"license": "MIT",
"dependencies": {
"jquery": "^3.1.1",
"bootstrap-sass": "^3.3.7",
"jquery-timeago": "^1.5.4",
"Ionicons": "ionicons#^2.0.1",
"jquery.browser": "^0.1.0",
"swiper": "^3.4.1",
"jquery.easing": "^1.3.1",
"jQuery.dotdotdot": "^1.8.3",
"waypoints": "^4.0.1"
}
}
24 changes: 0 additions & 24 deletions config.rb

This file was deleted.

8 changes: 6 additions & 2 deletions config/install/infinite.settings.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
logo:
path: themes/contrib/infinite_theme/images/logo.svg
use_default: false

gtm_id: ''
facebook_share_button: 'Share'
whatsapp_share_button: 'Share'
whatsapp_share_text: ''
pinterest_share_button: 'Pin'
twitter_share_button: 'Tweet'
twitter_share_via: ''
twitter_share_via: 'ThunderCoreTeam'
email_share_button: 'Mail'
email_share_text: ''
email_subject: ''
email_subject: ''
Empty file added css/.gitkeep
Empty file.
Loading