From e07beed42422f53a087963f7ebee906cd7274655 Mon Sep 17 00:00:00 2001 From: Spotlight Date: Sun, 8 Apr 2018 11:45:23 -0500 Subject: [PATCH] Delete potential leftovers from copied theme --- Rakefile | 76 ---------------------------------------------------- banner.js | 17 ------------ package.json | 34 ----------------------- 3 files changed, 127 deletions(-) delete mode 100644 Rakefile delete mode 100644 banner.js delete mode 100644 package.json diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 921330e6a..000000000 --- a/Rakefile +++ /dev/null @@ -1,76 +0,0 @@ -require "bundler/gem_tasks" -require "jekyll" -require "listen" - -def listen_ignore_paths(base, options) - [ - /_config\.ya?ml/, - /_site/, - /\.jekyll-metadata/ - ] -end - -def listen_handler(base, options) - site = Jekyll::Site.new(options) - Jekyll::Command.process_site(site) - proc do |modified, added, removed| - t = Time.now - c = modified + added + removed - n = c.length - relative_paths = c.map{ |p| Pathname.new(p).relative_path_from(base).to_s } - print Jekyll.logger.message("Regenerating:", "#{relative_paths.join(", ")} changed... ") - begin - Jekyll::Command.process_site(site) - puts "regenerated in #{Time.now - t} seconds." - rescue => e - puts "error:" - Jekyll.logger.warn "Error:", e.message - Jekyll.logger.warn "Error:", "Run jekyll build --trace for more information." - end - end -end - -task :preview do - base = Pathname.new('.').expand_path - options = { - "source" => base.join('test').to_s, - "destination" => base.join('test/_site').to_s, - "force_polling" => false, - "serving" => true, - "theme" => "minimal-mistakes-jekyll" - } - - options = Jekyll.configuration(options) - - ENV["LISTEN_GEM_DEBUGGING"] = "1" - listener = Listen.to( - base.join("_data"), - base.join("_includes"), - base.join("_layouts"), - base.join("_sass"), - base.join("assets"), - options["source"], - :ignore => listen_ignore_paths(base, options), - :force_polling => options['force_polling'], - &(listen_handler(base, options)) - ) - - begin - listener.start - Jekyll.logger.info "Auto-regeneration:", "enabled for '#{options["source"]}'" - - unless options['serving'] - trap("INT") do - listener.stop - puts " Halting auto-regeneration." - exit 0 - end - - loop { sleep 1000 } - end - rescue ThreadError - # You pressed Ctrl-C, oh my! - end - - Jekyll::Commands::Serve.process(options) -end diff --git a/banner.js b/banner.js deleted file mode 100644 index d03c5f444..000000000 --- a/banner.js +++ /dev/null @@ -1,17 +0,0 @@ -const fs = require('fs'); -const pkg = require('./package.json'); -const filename = 'assets/js/main.min.js'; -const script = fs.readFileSync(filename); -const padStart = str => ('0' + str).slice(-2) -const dateObj = new Date; -const date = `${dateObj.getFullYear()}-${padStart(dateObj.getMonth() + 1)}-${padStart(dateObj.getDate())}`; -const banner = `/*! - * Minimal Mistakes Jekyll Theme ${pkg.version} by ${pkg.author} - * Copyright ${dateObj.getFullYear()} Michael Rose - mademistakes.com | @mmistakes - * Licensed under ${pkg.license} - */ -`; - -if (script.slice(0, 3) != '/**') { - fs.writeFileSync(filename, banner + script); -} \ No newline at end of file diff --git a/package.json b/package.json deleted file mode 100644 index 3935b2461..000000000 --- a/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "minimal-mistakes", - "version": "4.6.0", - "description": "Minimal Mistakes Jekyll theme npm build scripts", - "repository": { - "type": "git", - "url": "git://github.com/mmistakes/minimal-mistakes.git" - }, - "keywords": [ - "jekyll", - "theme", - "minimal" - ], - "author": "Michael Rose", - "license": "MIT", - "bugs": { - "url": "https://github.com/mmistakes/minimal-mistakes/issues" - }, - "homepage": "https://mmistakes.github.io/minimal-mistakes/", - "engines": { - "node": ">= 0.10.0" - }, - "devDependencies": { - "npm-run-all": "^1.7.0", - "onchange": "^2.2.0", - "uglify-js": "^2.6.1" - }, - "scripts": { - "uglify": "uglifyjs assets/js/vendor/jquery/jquery-3.2.1.min.js assets/js/plugins/jquery.fitvids.js assets/js/plugins/jquery.greedy-navigation.js assets/js/plugins/jquery.magnific-popup.js assets/js/plugins/jquery.smooth-scroll.min.js assets/js/_main.js -c -m -o assets/js/main.min.js", - "add-banner": "node banner.js", - "watch:js": "onchange \"assets/js/**/*.js\" -e \"assets/js/main.min.js\" -- npm run build:js", - "build:js": "npm run uglify && npm run add-banner" - } -}