Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
09ca2506
Commit
09ca2506
authored
Jul 23, 2021
by
KunQian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the scss file overwriting works in jh folder
parent
64a920f2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
0 deletions
+20
-0
app/assets/stylesheets/_jh/application_jh.scss
app/assets/stylesheets/_jh/application_jh.scss
+5
-0
app/assets/stylesheets/application.scss
app/assets/stylesheets/application.scss
+3
-0
config/application.rb
config/application.rb
+2
-0
storybook/config/webpack.config.js
storybook/config/webpack.config.js
+10
-0
No files found.
app/assets/stylesheets/_jh/application_jh.scss
0 → 100644
View file @
09ca2506
/*
This is a noop-file. In JH:
jh/app/assets/stylesheets/_jh/application_jh.scss
will take precedence over it and import more styles
*/
app/assets/stylesheets/application.scss
View file @
09ca2506
...
...
@@ -24,6 +24,9 @@
// EE-only stylesheets
@import
'application_ee'
;
// JH-only stylesheets
@import
'application_jh'
;
/* print styles */
@media
print
{
@import
'print'
;
...
...
config/application.rb
View file @
09ca2506
...
...
@@ -264,7 +264,9 @@ module Gitlab
# Import path for EE specific SCSS entry point
# In CE it will import a noop file, in EE a functioning file
# Order is important, so that the ee file takes precedence:
config
.
assets
.
paths
<<
"
#{
config
.
root
}
/jh/app/assets/stylesheets/_jh"
if
Gitlab
.
jh?
config
.
assets
.
paths
<<
"
#{
config
.
root
}
/ee/app/assets/stylesheets/_ee"
if
Gitlab
.
ee?
config
.
assets
.
paths
<<
"
#{
config
.
root
}
/app/assets/stylesheets/_jh"
config
.
assets
.
paths
<<
"
#{
config
.
root
}
/app/assets/stylesheets/_ee"
config
.
assets
.
paths
<<
"
#{
config
.
root
}
/vendor/assets/javascripts/"
...
...
storybook/config/webpack.config.js
View file @
09ca2506
...
...
@@ -5,6 +5,7 @@ const path = require('path');
const
sass
=
require
(
'
node-sass
'
);
// eslint-disable-line import/no-unresolved
const
{
buildIncludePaths
,
resolveGlobUrl
}
=
require
(
'
node-sass-magic-importer/dist/toolbox
'
);
// eslint-disable-line import/no-unresolved
const
webpack
=
require
(
'
webpack
'
);
const
IS_JH
=
require
(
'
../../config/helpers/is_jh_env
'
);
const
gitlabWebpackConfig
=
require
(
'
../../config/webpack.config
'
);
const
ROOT
=
path
.
resolve
(
__dirname
,
'
../../
'
);
...
...
@@ -13,11 +14,20 @@ const TRANSPARENT_1X1_PNG =
const
SASS_INCLUDE_PATHS
=
[
'
app/assets/stylesheets
'
,
'
app/assets/stylesheets/_ee
'
,
'
app/assets/stylesheets/_jh
'
,
'
ee/app/assets/stylesheets
'
,
'
ee/app/assets/stylesheets/_ee
'
,
'
node_modules
'
,
].
map
((
p
)
=>
path
.
resolve
(
ROOT
,
p
));
if
(
IS_JH
)
{
SASS_INCLUDE_PATHS
.
push
(
...[
'
jh/app/assets/stylesheets
'
,
'
jh/app/assets/stylesheets/_jh
'
].
map
((
p
)
=>
path
.
resolve
(
ROOT
,
p
),
),
);
}
/**
* Custom importer for node-sass, used when LibSass encounters the `@import` directive.
* Doc source: https://github.com/sass/node-sass#importer--v200---experimental
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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