Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
07314b54
Commit
07314b54
authored
11 years ago
by
Chris Rebert
Browse files
Options
Download
Email Patches
Plain Diff
enhance customizer to handle transitive Less @import-s
parent
1853e31a
5 merge requests
!28721
Hot test
,
!13047
Fix customizer
,
!16605
Test pull please ignore
,
!22103
test
,
!25326
Adjust examples
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/assets/js/_src/customizer.js
+16
-5
docs/assets/js/_src/customizer.js
with
16 additions
and
5 deletions
+16
-5
docs/assets/js/_src/customizer.js
+
16
-
5
View file @
07314b54
...
...
@@ -181,10 +181,20 @@ window.onload = function () { // wait for load in a dumb way because B-0
var
IMPORT_REGEX
=
/^@import
\"(
.*
?)\"
;$/
var
lessLines
=
__less
[
lessFilename
].
split
(
'
\n
'
)
for
(
var
i
=
0
,
imports
=
[];
i
<
lessLines
.
length
;
i
++
)
{
var
match
=
IMPORT_REGEX
.
exec
(
lessLines
[
i
])
if
(
match
)
imports
.
push
(
match
[
1
])
}
var
imports
=
[]
$
.
each
(
lessLines
,
function
(
index
,
lessLine
)
{
var
match
=
IMPORT_REGEX
.
exec
(
lessLine
)
if
(
match
)
{
var
importee
=
match
[
1
]
var
transitiveImports
=
includedLessFilenames
(
importee
)
$
.
each
(
transitiveImports
,
function
(
index
,
transitiveImportee
)
{
if
(
$
.
inArray
(
transitiveImportee
,
imports
)
===
-
1
)
{
imports
.
push
(
transitiveImportee
)
}
})
imports
.
push
(
importee
)
}
})
return
imports
}
...
...
@@ -192,7 +202,8 @@ window.onload = function () { // wait for load in a dumb way because B-0
function
generateLESS
(
lessFilename
,
lessFileIncludes
,
vars
)
{
var
lessSource
=
__less
[
lessFilename
]
$
.
each
(
includedLessFilenames
(
lessFilename
),
function
(
index
,
filename
)
{
var
lessFilenames
=
includedLessFilenames
(
lessFilename
)
$
.
each
(
lessFilenames
,
function
(
index
,
filename
)
{
var
fileInclude
=
lessFileIncludes
[
filename
]
// Files not explicitly unchecked are compiled into the final stylesheet.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets