Add option noCSS for load css files.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
diff --git a/components.js b/components.js
index 5cb06e9..5041cc9 100644
--- a/components.js
+++ b/components.js
@@ -24,8 +24,7 @@ var components = {
plugins: {
meta: {
path: 'plugins/{id}/prism-{id}',
- link: 'plugins/{id}/',
- hasCSS: true
+ link: 'plugins/{id}/'
},
'line-highlight': 'Line Highlight',
'line-numbers': 'Line Numbers',
@@ -34,7 +33,7 @@ var components = {
'wpd': 'WebPlatform Docs',
'file-highlight': {
title: 'File Highlight',
- hasCSS: false
+ noCSS: true
}
},
languages: {
diff --git a/download.js b/download.js
index d5d8d1e..00a9246 100644
--- a/download.js
+++ b/download.js
@@ -40,7 +40,7 @@ for (var category in components) {
var info = all[id] = {
title: all[id].title || all[id],
- hasCSS: all[id].hasCSS !== undefined? all[id].hasCSS : all.meta.hasCSS,
+ noCSS: all[id].noCSS || true,
enabled: checked,
require: all[id].require,
files: {
@@ -64,7 +64,8 @@ for (var category in components) {
info.files.dev.paths.push(filepath.replace(/(\.js)?$/, '.js'));
}
- if ((all[id].hasCSS && !/\.js$/.test(filepath)) || /\.css$/.test(filepath)) {
+
+ if ((!all[id].noCSS && !/\.js$/.test(filepath)) || /\.css$/.test(filepath)) {
var cssFile = filepath.replace(/(\.css)?$/, '.css');
info.files.minified.paths.push(cssFile);