Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
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
0
Merge Requests
0
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
Boris Kocherov
web-apps
Commits
1ea6ec32
Commit
1ea6ec32
authored
Sep 05, 2016
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add css requirejs plugin
parent
ee45f22f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
apps/css.js
apps/css.js
+23
-0
No files found.
apps/css.js
0 → 100644
View file @
1ea6ec32
/** `css` is a requirejs plugin
that loads a css file and inject it into a page.
note that this loader will return immediately,
regardless of whether the browser had finished parsing the stylesheet.
this css loader is implemented for file optimization and depedency managment
*/
define
({
load
:
function
(
name
,
require
,
load
,
config
)
{
function
inject
(
filename
)
{
var
head
=
document
.
getElementsByTagName
(
'
head
'
)[
0
];
var
link
=
document
.
createElement
(
'
link
'
);
link
.
href
=
filename
;
link
.
rel
=
'
stylesheet
'
;
link
.
type
=
'
text/css
'
;
head
.
appendChild
(
link
);
}
inject
(
requirejs
.
toUrl
(
name
));
load
(
true
);
},
pluginBuilder
:
'
./css-build
'
});
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