-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c696479
commit aa439cb
Showing
13 changed files
with
1,529 additions
and
840 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
{ | ||
"singleAttributePerLine": true, | ||
"tabWidth": 4 | ||
"singleAttributePerLine": 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ define([ | |
null, | ||
function(){} | ||
) | ||
) | ||
); | ||
}).always(() => { | ||
self.loading(false); | ||
}); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ import Foo from "@/components/FooComponent.vue"; | |
</script> | ||
|
||
<template> | ||
<Foo /> | ||
<Foo /> | ||
</template> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ console.log("hello world!"); | |
</script> | ||
|
||
<template> | ||
<h1>Hello World!</h1> | ||
<h1>Hello World!</h1> | ||
</template> |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const Path = require('path'); | ||
const fs = require('fs'); | ||
|
||
function buildCSSFilepathLookup(path, outerAcc, cssDirectoryPath) { | ||
if (!fs.existsSync(path)) { | ||
return; | ||
} | ||
|
||
return fs.readdirSync(path).reduce((acc, name) => { | ||
const outerPath = cssDirectoryPath || path; // original `path` arg is persisted through recursion | ||
|
||
if (fs.lstatSync(Path.join(path, name)).isDirectory() ) { | ||
return buildCSSFilepathLookup( | ||
Path.join(path, name), | ||
acc, | ||
outerPath | ||
); | ||
} | ||
else { | ||
let subPath = Path.join(path, name).split(/css(.*)/s)[1]; // splits only on first occurance | ||
subPath = subPath.substring(1); | ||
const parsedPath = Path.parse(subPath); | ||
|
||
let pathName = parsedPath['name']; | ||
|
||
if (parsedPath['dir']) { | ||
pathName = Path.join(parsedPath['dir'], parsedPath['name']); | ||
} | ||
|
||
if (pathName.includes('.DS_Store')) { | ||
return acc; | ||
} | ||
else { | ||
return { | ||
...acc, | ||
[Path.join('css', pathName.replace(/\\/g, '/'))]: { 'import': Path.join(outerPath, subPath) } | ||
}; | ||
} | ||
} | ||
}, outerAcc); | ||
}; | ||
|
||
module.exports = { buildCSSFilepathLookup }; |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const Path = require('path'); | ||
const fs = require('fs'); | ||
|
||
const buildImageFilePathLookup = function(publicPath, path, outerAcc, imageDirectoryPath) { | ||
if (!fs.existsSync(path)) { | ||
return; | ||
} | ||
|
||
return fs.readdirSync(path).reduce((acc, name) => { | ||
const outerPath = imageDirectoryPath || path; // original `path` arg is persisted through recursion | ||
|
||
if (fs.lstatSync(Path.join(path, name)).isDirectory() ) { | ||
return buildImageFilePathLookup( | ||
publicPath, | ||
Path.join(path, name), | ||
acc, | ||
outerPath | ||
); | ||
} | ||
else { | ||
let subPath = Path.join(path, name).split(/img(.*)/s)[1]; // splits only on first occurance | ||
subPath = subPath.substring(1); | ||
|
||
const parsedPath = Path.parse(subPath); | ||
const filename = parsedPath['dir'] ? Path.join(parsedPath['dir'], parsedPath['base']) : parsedPath['base']; | ||
|
||
return { | ||
...acc, | ||
[Path.join(publicPath, 'img', filename).replace(/\\/g, '/')]: Path.resolve(__dirname, Path.join(outerPath, subPath)) | ||
}; | ||
} | ||
}, outerAcc); | ||
}; | ||
|
||
module.exports = { buildImageFilePathLookup }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const Path = require('path'); | ||
const fs = require('fs'); | ||
|
||
function buildJavascriptFilepathLookup(path, outerAcc, javascriptDirectoryPath) { | ||
if (!fs.existsSync(path)) { | ||
return; | ||
} | ||
|
||
return fs.readdirSync(path).reduce((acc, name) => { | ||
const outerPath = javascriptDirectoryPath || path; // original `path` arg is persisted through recursion | ||
|
||
if (fs.lstatSync(Path.join(path, name)).isDirectory() ) { | ||
return buildJavascriptFilepathLookup( | ||
Path.join(path, name), | ||
acc, | ||
outerPath | ||
); | ||
} | ||
else { | ||
let subPath = Path.join(path, name).split(/js(.*)/s)[1]; // splits only on first occurance | ||
subPath = subPath.substring(1); | ||
const parsedPath = Path.parse(subPath); | ||
|
||
let pathName = parsedPath['name']; | ||
|
||
if (parsedPath['dir']) { | ||
pathName = Path.join(parsedPath['dir'], parsedPath['name']); | ||
} | ||
|
||
if (pathName.includes('.DS_Store')) { | ||
return acc; | ||
} | ||
else { | ||
return { | ||
...acc, | ||
[pathName.replace(/\\/g, '/')]: { 'import': Path.join(outerPath, subPath), 'filename': Path.join('js', '[name].js') } | ||
}; | ||
} | ||
} | ||
}, outerAcc); | ||
}; | ||
|
||
module.exports = { buildJavascriptFilepathLookup }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const Path = require('path'); | ||
const fs = require('fs'); | ||
|
||
const buildTemplateFilePathLookup = function(path, outerAcc, templateDirectoryPath) { | ||
if (!fs.existsSync(path)) { | ||
return; | ||
} | ||
|
||
return fs.readdirSync(path).reduce((acc, name) => { | ||
const outerPath = templateDirectoryPath || path; // original `path` arg is persisted through recursion | ||
|
||
if (fs.lstatSync(Path.join(path, name)).isDirectory() ) { | ||
return buildTemplateFilePathLookup( | ||
Path.join(path, name), | ||
acc, | ||
outerPath | ||
); | ||
} | ||
else { | ||
let subPath = (Path.join(path, name)).split(/templates(.*)/s)[1]; // splits only on first occurance | ||
subPath = subPath.substring(1); | ||
|
||
const parsedPath = Path.parse(subPath); | ||
const filename = parsedPath['dir'] ? Path.join(parsedPath['dir'], parsedPath['base']) : parsedPath['base']; | ||
|
||
if (filename.includes('.DS_Store')) { | ||
return acc; | ||
} | ||
else { | ||
return { | ||
...acc, | ||
[Path.join('templates', filename).replace(/\\/g, '/')]: Path.resolve(__dirname, Path.join(outerPath, subPath)) | ||
}; | ||
} | ||
} | ||
}, outerAcc); | ||
}; | ||
|
||
module.exports = { buildTemplateFilePathLookup }; |
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