{"id":18314312,"url":"https://github.com/agrublev/cssloader","last_synced_at":"2025-04-09T12:41:20.626Z","repository":{"id":142047452,"uuid":"79305422","full_name":"agrublev/cssloader","owner":"agrublev","description":"Loading css like modules","archived":false,"fork":false,"pushed_at":"2017-08-18T14:59:42.000Z","size":1954,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T06:41:26.006Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agrublev.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-18T05:06:52.000Z","updated_at":"2017-01-18T05:09:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"b0f3a212-d2d3-40b7-9259-13e9c8014ef2","html_url":"https://github.com/agrublev/cssloader","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrublev%2Fcssloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrublev%2Fcssloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrublev%2Fcssloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrublev%2Fcssloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agrublev","download_url":"https://codeload.github.com/agrublev/cssloader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045220,"owners_count":21038552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T16:31:41.292Z","updated_at":"2025-04-09T12:41:20.608Z","avatar_url":"https://github.com/agrublev.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"Load by using\n```javascript\ndocReady(function() {\n    // require some stylesheets\n    cssloader.require([\n        {href: \"/fcloader/stylesheets/style1.css\", media: \"screen\"},\n        {href: \"stylesheets/style2.css\", media: \"screen\"},\n        {href: \"stylesheets/style5.css\", media: \"screen\"}\n    ], {devMode: true});\n});\n// Alternatively with jquery\n$(function(){\n    // require some stylesheets\n    cssloader.require([\n        {href: \"/fcloader/stylesheets/style1.css\", media: \"screen\"},\n        {href: \"stylesheets/style2.css\", media: \"screen\"},\n        {href: \"stylesheets/style5.css\", media: \"screen\"}\n    ], {devMode: true});\n});\n```\n\n​\nCompile less\nCompile multiple css to one file\nLoad css using if on same domain checked\nvar client = new XMLHttpRequest();\nclient.open('GET', '/foo.txt');\nclient.onreadystatechange = function() {\nalert(client.responseText);\n}\nclient.send();\nLoad based on url parameter\n// webpack.config.js\nvar ExtractTextPlugin = require(\"extract-text-webpack-plugin\");\nmodule.exports = {\n// The standard entry point and output config\nentry: {\nposts: \"./posts\",\npost: \"./post\",\nabout: \"./about\"\n},\noutput: {\nfilename: \"[name].js\",\nchunkFilename: \"[id].js\"\n},\nmodule: {\nloaders: [\n// Extract css files\n{\ntest: /\\.css$/,\nloader: ExtractTextPlugin.extract(\"style-loader\", \"css-loader\")\n},\n// Optionally extract less files\n// or any other compile-to-css language\n{\ntest: /\\.less$/,\nloader: ExtractTextPlugin.extract(\"style-loader\", \"css-loader!less-loader\")\n}\n// You could also use other loaders the same way. I. e. the autoprefixer-loader\n]\n},\n// Use the plugin to specify the resulting filename (and add needed behavior to the compiler)\nplugins: [\nnew ExtractTextPlugin(\"[name].css\")\n]\n}\n\n\n(c) 2015 MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrublev%2Fcssloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagrublev%2Fcssloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrublev%2Fcssloader/lists"}