Skip to content

Commit

Permalink
Adding mockup of SF Summit website
Browse files Browse the repository at this point in the history
  • Loading branch information
englehardt committed Mar 11, 2020
1 parent 319b5a1 commit 16b67cc
Show file tree
Hide file tree
Showing 58 changed files with 12,576 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/surf/summits/2020h1sf/huddle/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org

root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
54 changes: 54 additions & 0 deletions test/surf/summits/2020h1sf/huddle/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Compiled source
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases
logs
*.log
npm-debug.log*
*.sql
*.sqlite

# OS or Editor files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
.cache
.project
.settings
.tmproj
*.esproj
nbproject
*.sublime-project
*.sublime-workspace
.idea

# Sass
.sass-cache/
*.css.map

# Gulp/Node
node_modules/

# Other
archive
3 changes: 3 additions & 0 deletions test/surf/summits/2020h1sf/huddle/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License

Licensed under [Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)](https://creativecommons.org/licenses/by-sa/4.0/).
13 changes: 13 additions & 0 deletions test/surf/summits/2020h1sf/huddle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Huddle
Say hello to Huddle, a bold, techy site template.

[Papaya](https://www.papayatemplates.com)
[@jrdnbwmn](https://www.twitter.com/jrdnbwmn)

Demo images from [Unsplash](https://unsplash.com/).
Icons from [Entypo](http://entypo.com/).

## Instructions
For local development, run `npm install` on the main directory and then `gulp` to get BrowserSync going along with all the Gulp tasks (see [Pear](https://github.com/jrdnbwmn/Pear)).

Development files are in `src`. Everything is compiled into `dist`—that’s where all your final files reside.
136 changes: 136 additions & 0 deletions test/surf/summits/2020h1sf/huddle/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
// Get things set up
// -------------------------------------------------------------------
// Include Gulp
var gulp = require("gulp"),

// HTML plugins
fileinclude = require("gulp-file-include"),
htmlmin = require("gulp-htmlmin"),

// CSS plugins
sass = require("gulp-sass"),
autoprefixer = require("gulp-autoprefixer"),
cssmin = require("gulp-clean-css"),
rename = require("gulp-rename"),

// JS plugins
concat = require("gulp-concat"),
uglify = require("gulp-uglify"),

// Image plugin
imagemin = require("gulp-imagemin"),

// General plugins
gutil = require("gulp-util"),
plumber = require("gulp-plumber"),
size = require("gulp-size"),
watch = require("gulp-watch"),
browserSync = require("browser-sync"),
reload = browserSync.reload;

// Tasks
// -------------------------------------------------------------------
// Start server
gulp.task("browser-sync", function() {
browserSync({
server: {
baseDir: "dist"
}
});
});

// Notify on error with a beep
var onError = function(error) {
console.log(gutil.colors.red(error.message));
// https://github.com/floatdrop/gulp-plumber/issues/17
this.emit("end");
gutil.beep();
};

// HTML task
gulp.task("html", function() {
return gulp.src("src/html/*.html")
// Prevent gulp.watch from crashing
.pipe(plumber(onError))
// Set up HTML templating
.pipe(fileinclude({
prefix: "@@",
basepath: "src/html"
}))
// Clean up HTML a little
.pipe(htmlmin({
removeCommentsFromCDATA: true,
removeRedundantAttributes: true,
removeEmptyAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true,
caseSensitive: true,
minifyCSS: true
}))
// Where to store the finalized HTML
.pipe(gulp.dest("dist"));
});

// CSS task
gulp.task("css", function() {
return gulp.src("src/scss/main.scss")
// Prevent gulp.watch from crashing
.pipe(plumber(onError))
// Compile Sass
.pipe(sass({ style: "compressed", noCache: true }))
// parse CSS and add vendor-prefixed CSS properties
.pipe(autoprefixer({
browsers: ["last 2 versions"]
}))
// Minify CSS
.pipe(cssmin())
// Rename the file
.pipe(rename("production.css"))
// Show sizes of minified CSS files
.pipe(size({ showFiles: true }))
// Where to store the finalized CSS
.pipe(gulp.dest("dist/css"));
});

// JS task
gulp.task("js", function() {
return gulp.src("src/js/**/*")
// Prevent gulp.watch from crashing
.pipe(plumber(onError))
// Concatenate all JS files into one
.pipe(concat("production.js"))
// Where to store the finalized JS
.pipe(gulp.dest("dist/js"));
});

// Image task
gulp.task("images", function() {
return gulp.src("src/img/**/*.+(png|jpeg|jpg|gif|svg)")
// Prevent gulp.watch from crashing
.pipe(plumber(onError))
// Minify the images
.pipe(imagemin())
// Where to store the finalized images
.pipe(gulp.dest("dist/img"));
});

// Use default task to launch BrowserSync and watch all files
gulp.task("default", gulp.parallel("browser-sync"), function () {
// All browsers reload after tasks are complete
// Watch HTML files
watch("src/html/**/*", function () {
gulp.start("html", reload);
});
// Watch Sass files
watch("src/scss/**/*", function () {
gulp.start('css', reload);
});
// Watch JS files
watch("src/js/**/*", function () {
gulp.start("js", reload);
});
// Watch image files
watch("src/img/**/*.+(png|jpeg|jpg|gif|svg)", function () {
gulp.start("images", reload);
});
});
Loading

0 comments on commit 16b67cc

Please sign in to comment.