File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,19 @@ var pattern_assembler = function () {
244
244
245
245
function processPatternIterative ( relPath , patternlab ) {
246
246
247
+ var relativeDepth = relPath . match ( / \w (? = \\ ) | \w (? = \/ ) / g || [ ] ) . length ;
248
+ if ( relativeDepth > 2 ) {
249
+ console . log ( '' ) ;
250
+ plutils . logOrange ( 'Warning:' ) ;
251
+ plutils . logOrange ( 'A pattern file: ' + relPath + ' was found greater than 2 levels deep from ' + patternlab . config . paths . source . patterns + '.' ) ;
252
+ plutils . logOrange ( 'It\'s strongly suggested to not deviate from the following structure under _patterns/' ) ;
253
+ plutils . logOrange ( '[patternType]/[patternSubtype]/[patternName].[patternExtension]' ) ;
254
+ console . log ( '' ) ;
255
+ plutils . logOrange ( 'While Pattern Lab may still function, assets may 404 and frontend links may break. Consider yourself warned. ' ) ;
256
+ plutils . logOrange ( 'Read More: http://patternlab.io/docs/pattern-organization.html' ) ;
257
+ console . log ( '' ) ;
258
+ }
259
+
247
260
//check if the found file is a top-level markdown file
248
261
var fileObject = path . parse ( relPath ) ;
249
262
if ( fileObject . ext === '.md' ) {
You can’t perform that action at this time.
0 commit comments