-
Notifications
You must be signed in to change notification settings - Fork 142
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
Showing
30 changed files
with
7,685 additions
and
4,371 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,9 @@ rules: | |
- 'stroustrup' | ||
- | ||
allowSingleLine: false | ||
one-var: 0 | ||
one-var: | ||
- 2 | ||
- never | ||
semi: | ||
- 2 | ||
- never |
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 +1 @@ | ||
>=8.9.0 <11.0.0 | ||
>=10.13.0 <11.0.0 |
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,9 +1,20 @@ | ||
{ | ||
"proxy": "m2test.dev", | ||
"rewriteRules": [ | ||
{ | ||
"match": ".m2test.dev", | ||
"replace": "" | ||
} | ||
] | ||
} | ||
[ | ||
{ | ||
"proxy": "m2test.dev", | ||
"rewriteRules": [ | ||
{ | ||
"match": ".m2test.dev", | ||
"replace": "" | ||
} | ||
] | ||
}, | ||
{ | ||
"proxy": "b2b.m2test.dev", | ||
"rewriteRules": [ | ||
{ | ||
"match": ".b2b.m2test.dev", | ||
"replace": "" | ||
} | ||
] | ||
} | ||
] |
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,30 +1,32 @@ | ||
'use strict'; | ||
'use strict' | ||
// Plugins / Functions / Modules | ||
const plugins = require('gulp-load-plugins')({ | ||
pattern: ['*', '!gulp', '!gulp-load-plugins'], | ||
rename : { | ||
'browser-sync' : 'browserSync', | ||
'fs-extra' : 'fs', | ||
'gulp-multi-dest' : 'multiDest', | ||
'js-yaml' : 'yaml', | ||
'marked-terminal' : 'markedTerminal', | ||
'merge-stream' : 'mergeStream', | ||
'postcss-reporter': 'reporter', | ||
'run-sequence' : 'runSequence' | ||
} | ||
}), | ||
config = {}; | ||
pattern: ['*', '!gulp', '!gulp-load-plugins'], | ||
rename : { | ||
'browser-sync' : 'browserSync', | ||
'fs-extra' : 'fs', | ||
'gulp-multi-dest' : 'multiDest', | ||
'js-yaml' : 'yaml', | ||
'marked-terminal' : 'markedTerminal', | ||
'merge-stream' : 'mergeStream', | ||
'postcss-reporter': 'reporter', | ||
'run-sequence' : 'runSequence' | ||
} | ||
}) | ||
const config = {} | ||
|
||
config.projectPath = plugins.fs.realpathSync('../../../') + '/'; | ||
config.tempPath = config.projectPath + 'var/view_preprocessed/frontools'; | ||
config.themes = require('./helper/config-loader')('themes.json', plugins, config, false); | ||
plugins.path = require('path') | ||
|
||
plugins.errorMessage = require('./helper/error-message')(plugins); | ||
plugins.getThemes = require('./helper/get-themes')(plugins, config); | ||
config.projectPath = plugins.path.join(plugins.fs.realpathSync('../../../'), '/') | ||
config.tempPath = plugins.path.join(config.projectPath, 'var/view_preprocessed/frontools/') | ||
config.themes = require('./helper/config-loader')('themes.json', plugins, config, false) | ||
|
||
plugins.errorMessage = require('./helper/error-message')(plugins) | ||
plugins.getThemes = require('./helper/get-themes')(plugins, config) | ||
|
||
// Tasks loading | ||
require('gulp-task-loader')({ | ||
dir : 'task', | ||
plugins: plugins, | ||
configs: config | ||
}); | ||
}) |
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
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,54 +1,54 @@ | ||
'use strict'; | ||
'use strict' | ||
module.exports = function(plugins, file) { // eslint-disable-line func-names | ||
function findDependencies(file, dependencyTree) { | ||
if (plugins.fs.existsSync(file)) { | ||
const content = plugins.fs.readFileSync(file, 'utf8'), | ||
path = file.replace(/(.*)\/.*/g, '$1'), | ||
regex = /^(?:\s*@import )(?:'|")(.*)(?:'|")/gm; | ||
const content = plugins.fs.readFileSync(file, 'utf8') | ||
const path = file.replace(/(.*)\/.*/g, '$1') | ||
const regex = /^(?:\s*@import )(?:'|")(.*)(?:'|")/gm | ||
|
||
let result = regex.exec(content), | ||
imports = []; | ||
let result = regex.exec(content) | ||
let imports = [] | ||
|
||
while (result) { | ||
let fullPath = ''; | ||
let fullPath = '' | ||
if (result[1].includes('../')) { | ||
let parentPath = path, | ||
filePath = result[1]; | ||
let parentPath = path | ||
let filePath = result[1] | ||
|
||
while (filePath.includes('../')) { | ||
parentPath = parentPath.replace(/\/[^/]+$/g, ''); | ||
filePath = filePath.replace(/\.\.\//, ''); | ||
const filePathParts = /(.*)\/(.*)/g.exec(filePath); | ||
parentPath = parentPath.replace(/\/[^/]+$/g, '') | ||
filePath = filePath.replace(/\.\.\//, '') | ||
const filePathParts = /(.*)\/(.*)/g.exec(filePath) | ||
if (filePathParts) { | ||
fullPath = parentPath + '/' + filePathParts[1] + '/_' + filePathParts[filePathParts.length - 1] + '.scss'; | ||
fullPath = plugins.path.join(parentPath, filePathParts[1], `_${filePathParts[filePathParts.length - 1]}.scss`) | ||
} | ||
else { | ||
fullPath = parentPath + '/_' + filePath + '.scss'; | ||
fullPath = plugins.path.join(parentPath, `_${filePath}.scss`) | ||
} | ||
} | ||
} | ||
else { | ||
if (result[1].includes('/')) { | ||
const filePath = /(.*)\/(.*)/g.exec(result[1]); | ||
fullPath = path + '/' + filePath[1] + '/_' + filePath[filePath.length - 1] + '.scss'; | ||
const filePath = /(.*)\/(.*)/g.exec(result[1]) | ||
fullPath = plugins.path.join(path, filePath[1], `_${filePath[filePath.length - 1]}.scss`) | ||
} | ||
else { | ||
fullPath = path + '/_' + result[1] + '.scss'; | ||
fullPath = plugins.path.join(path, `_${result[1]}.scss`) | ||
} | ||
} | ||
imports.push(fullPath); | ||
result = regex.exec(content); | ||
imports.push(fullPath) | ||
result = regex.exec(content) | ||
} | ||
|
||
imports.forEach(el => { | ||
imports = imports.concat(findDependencies(el, dependencyTree)); | ||
}); | ||
imports = imports.concat(findDependencies(el, dependencyTree)) | ||
}) | ||
|
||
dependencyTree = dependencyTree.concat(file); | ||
dependencyTree = dependencyTree.concat(imports); | ||
dependencyTree = dependencyTree.concat(file) | ||
dependencyTree = dependencyTree.concat(imports) | ||
} | ||
return dependencyTree; | ||
return dependencyTree | ||
} | ||
|
||
return findDependencies(file, []); | ||
}; | ||
return findDependencies(file, []) | ||
} |
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,9 +1,9 @@ | ||
'use strict'; | ||
'use strict' | ||
module.exports = function(plugins) { // eslint-disable-line func-names | ||
return function(message) { // eslint-disable-line func-names | ||
const lineLength = message.length > 50 ? 50 : message.length; | ||
const lineLength = message.length > 50 ? 50 : message.length | ||
return plugins.util.colors.red('\n' + '='.repeat(lineLength) + ' \n') | ||
+ plugins.util.colors.yellow(message) | ||
+ plugins.util.colors.red('\n' + '='.repeat(lineLength)) | ||
} | ||
}; | ||
} |
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
Oops, something went wrong.