Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
13787db3
Commit
13787db3
authored
Dec 08, 2021
by
Lyza Danger Gardner
Committed by
Lyza Gardner
Dec 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tailwind build and config support
parent
c12ae5d5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
14 deletions
+45
-14
gulpfile.mjs
gulpfile.mjs
+24
-14
annotator.scss
src/styles/annotator/annotator.scss
+3
-0
sidebar.scss
src/styles/sidebar/sidebar.scss
+3
-0
tailwind.config.mjs
tailwind.config.mjs
+15
-0
No files found.
gulpfile.mjs
View file @
13787db3
...
...
@@ -10,31 +10,41 @@ import gulp from 'gulp';
import
serveDev
from
'./dev-server/serve-dev.js'
;
import
servePackage
from
'./dev-server/serve-package.js'
;
import
tailwindConfig
from
'./tailwind.config.mjs'
;
gulp
.
task
(
'build-js'
,
()
=>
buildJS
(
'./rollup.config.mjs'
));
gulp
.
task
(
'watch-js'
,
()
=>
watchJS
(
'./rollup.config.mjs'
));
gulp
.
task
(
'build-css'
,
()
=>
buildCSS
([
// Hypothesis client
'./src/styles/annotator/annotator.scss'
,
'./src/styles/annotator/highlights.scss'
,
'./src/styles/annotator/pdfjs-overrides.scss'
,
'./src/styles/sidebar/sidebar.scss'
,
// Vendor
'./node_modules/katex/dist/katex.min.css'
,
// Development tools
'./src/styles/ui-playground/ui-playground.scss'
,
])
buildCSS
(
[
// Hypothesis client
'./src/styles/annotator/annotator.scss'
,
'./src/styles/annotator/highlights.scss'
,
'./src/styles/annotator/pdfjs-overrides.scss'
,
'./src/styles/sidebar/sidebar.scss'
,
// Vendor
'./node_modules/katex/dist/katex.min.css'
,
// Development tools
'./src/styles/ui-playground/ui-playground.scss'
,
],
{
tailwindConfig
}
)
);
gulp
.
task
(
'watch-css'
,
gulp
.
series
(
'build-css'
,
function
watchCSS
()
{
gulp
.
watch
(
[
'node_modules/katex/dist/katex.min.css'
,
'src/styles/**/*.scss'
],
[
'node_modules/katex/dist/katex.min.css'
,
'src/styles/**/*.scss'
,
'src/sidebar/components/**/*.js'
,
'src/annotator/components/**/*.js'
,
'dev-server/ui-playground/components/**/*.js'
,
],
gulp
.
task
(
'build-css'
)
);
})
...
...
src/styles/annotator/annotator.scss
View file @
13787db3
...
...
@@ -29,6 +29,9 @@
// Make the shared package utility styles available
@use
'@hypothesis/frontend-shared/styles/util'
;
@tailwind
base
;
@tailwind
utilities
;
// Styles for all top-level elements in shadow roots.
:host
>
*
{
font-family
:
var
.
$sans-font-family
;
...
...
src/styles/sidebar/sidebar.scss
View file @
13787db3
...
...
@@ -58,6 +58,9 @@
// Local utility classes
@use
'../util'
;
@tailwind
base
;
@tailwind
utilities
;
// Top-level styles
// ----------------
...
...
tailwind.config.mjs
0 → 100644
View file @
13787db3
import
tailwindConfig
from
'@hypothesis/frontend-shared/lib/tailwind.preset.js'
;
export
default
{
presets
:
[
tailwindConfig
],
mode
:
'jit'
,
purge
:
[
'./src/sidebar/components/**/*.js'
,
'./src/annotator/components/**/*.js'
,
'./dev-server/ui-playground/components/**/*.js'
,
],
theme
:
{},
corePlugins
:
{
preflight
:
false
,
// Disable Tailwind's CSS reset in the `base` layer
},
};
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