This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Returns an array of dates between the two dates | |
var getDates = function(startDate, endDate) { | |
var dates = [], | |
currentDate = startDate, | |
addDays = function(days) { | |
var date = new Date(this.valueOf()); | |
date.setDate(date.getDate() + days); | |
return date; | |
}; | |
while (currentDate <= endDate) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Client</title> | |
<base href="/"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="icon" type="image/x-icon" href="favicon.ico"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require("gulp"); | |
var rename = require("gulp-rename"); | |
var clean = require("gulp-clean"); | |
var fs = require("fs"); | |
var cheerio = require("cheerio"); | |
var ts = require("typescript"); | |
gulp.task("dist", function() { | |
// task operations - begin | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// tasks operations - begin | |
var files = [ | |
"./../server/public/*", | |
"!./../server/public/.htaccess", | |
"!./../server/public/index.php", | |
"!./../server/public/storage", | |
"!./../server/public/favicon.ico" | |
]; | |
// remove old dist folder content from the laravel public folder | |
gulp.src(files, { read: false }).pipe(clean({ force: true })); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $ = cheerio.load(fs.readFileSync("./dist/index.html", "utf8")); | |
//get script tags that need to be injected into the laravel view | |
var scripts = $("script").map(function(i, el) { | |
return $("<div>").append($(el)).html(); | |
}).toArray(); | |
//get css tags that need to be injected into main laravel view | |
var styles = $("link").filter(function(i, el) { | |
return $(el).attr("href").indexOf("bundle.css") > -1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Client</title> | |
<base href="/"> | |
<meta name="viewport" content="width=device-width, initial scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<link rel="icon" type="image/x-icon" href="favicon.ico"> | |
{{--angular styles begin--}} | |
{{--angular styles end--}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//js scripts replace regex | |
var jsSearch = /{{ — angular scripts begin — }}[\s\S]*{{ — angular scripts end — }}/; | |
var jsReplaceStr = | |
“{{ — angular scripts begin — }}” + | |
“\n\t\t” + | |
scripts.join(“\n\t\t”) + | |
“\n\t\t{{ — angular scripts end — }}”; | |
//css styles replace regex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require("gulp"); | |
var rename = require("gulp-rename"); | |
var clean = require("gulp-clean"); | |
var fs = require("fs"); | |
var cheerio = require("cheerio"); | |
var ts = require("typescript"); | |
gulp.task("dist", function() { | |
var files = [ | |
"./../server/public/*", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !^public | |
RewriteRule ^(.*)$ public/$1 [L] | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can create a new empty branch like this: | |
$ git checkout --orphan NEWBRANCH | |
--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry. | |
The --orphan command keeps the index and the working tree files intact in order to make it convenient for creating a new history whose trees resemble the ones from the original branch. | |
Since you want to create a new empty branch that has nothing to do with the original branch, you can delete all files in the new working directory: |
OlderNewer