Split the components registration object into its own file
This commit is contained in:
parent
08143d9f7f
commit
97d57c65d4
95
code.js
95
code.js
|
@ -1,98 +1,3 @@
|
|||
var components = {
|
||||
core: {
|
||||
meta: {
|
||||
path: 'components/prism-core.js',
|
||||
option: 'mandatory'
|
||||
},
|
||||
'core': 'Core'
|
||||
},
|
||||
themes: {
|
||||
meta: {
|
||||
path: '{id}.css',
|
||||
link: 'index.html?theme={id}',
|
||||
exclusive: true
|
||||
},
|
||||
'prism': {
|
||||
title: 'Default',
|
||||
option: 'default'
|
||||
},
|
||||
'prism-dark': 'Dark',
|
||||
'prism-funky': 'Funky',
|
||||
'okaidia': 'Okaidia'
|
||||
},
|
||||
languages: {
|
||||
meta: {
|
||||
path: 'components/prism-{id}'
|
||||
},
|
||||
'markup': {
|
||||
title: 'Markup',
|
||||
option: 'default'
|
||||
},
|
||||
'css': {
|
||||
title: 'CSS',
|
||||
option: 'default'
|
||||
},
|
||||
'clike': {
|
||||
title: 'C-like',
|
||||
option: 'default'
|
||||
},
|
||||
'javascript': {
|
||||
title: 'JavaScript',
|
||||
option: 'default',
|
||||
require: 'clike'
|
||||
},
|
||||
'java' : {
|
||||
title: 'Java',
|
||||
require: 'clike'
|
||||
},
|
||||
'php' : {
|
||||
title: 'PHP',
|
||||
require: 'clike'
|
||||
},
|
||||
'coffeescript': {
|
||||
title: 'CoffeeScript',
|
||||
require: 'javascript'
|
||||
},
|
||||
'scss': {
|
||||
title: 'Sass (Scss)',
|
||||
require: 'css'
|
||||
},
|
||||
'bash' : {
|
||||
title: 'Bash',
|
||||
require: 'clike'
|
||||
},
|
||||
'c': {
|
||||
title: 'C',
|
||||
require: 'clike'
|
||||
},
|
||||
'cpp': {
|
||||
title: 'C++',
|
||||
require: 'c'
|
||||
},
|
||||
'python': {
|
||||
title: 'Python'
|
||||
},
|
||||
'sql': {
|
||||
title: 'SQL'
|
||||
},
|
||||
'groovy': {
|
||||
title: 'Groovy',
|
||||
require: 'clike'
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
meta: {
|
||||
path: 'plugins/{id}/prism-{id}',
|
||||
link: 'plugins/{id}/',
|
||||
hasCSS: true
|
||||
},
|
||||
'line-highlight': 'Line Highlight',
|
||||
'show-invisibles': 'Show Invisibles',
|
||||
'autolinker': 'Autolinker',
|
||||
'wpd': 'WebPlatform Docs'
|
||||
}
|
||||
};
|
||||
|
||||
(function(){
|
||||
|
||||
if(!document.body.addEventListener) {
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
var components = {
|
||||
core: {
|
||||
meta: {
|
||||
path: 'components/prism-core.js',
|
||||
option: 'mandatory'
|
||||
},
|
||||
'core': 'Core'
|
||||
},
|
||||
themes: {
|
||||
meta: {
|
||||
path: '{id}.css',
|
||||
link: 'index.html?theme={id}',
|
||||
exclusive: true
|
||||
},
|
||||
'prism': {
|
||||
title: 'Default',
|
||||
option: 'default'
|
||||
},
|
||||
'prism-dark': 'Dark',
|
||||
'prism-funky': 'Funky',
|
||||
'okaidia': 'Okaidia'
|
||||
},
|
||||
languages: {
|
||||
meta: {
|
||||
path: 'components/prism-{id}'
|
||||
},
|
||||
'markup': {
|
||||
title: 'Markup',
|
||||
option: 'default'
|
||||
},
|
||||
'css': {
|
||||
title: 'CSS',
|
||||
option: 'default'
|
||||
},
|
||||
'clike': {
|
||||
title: 'C-like',
|
||||
option: 'default'
|
||||
},
|
||||
'javascript': {
|
||||
title: 'JavaScript',
|
||||
option: 'default',
|
||||
require: 'clike'
|
||||
},
|
||||
'java' : {
|
||||
title: 'Java',
|
||||
require: 'clike'
|
||||
},
|
||||
'php' : {
|
||||
title: 'PHP',
|
||||
require: 'clike'
|
||||
},
|
||||
'coffeescript': {
|
||||
title: 'CoffeeScript',
|
||||
require: 'javascript'
|
||||
},
|
||||
'scss': {
|
||||
title: 'Sass (Scss)',
|
||||
require: 'css'
|
||||
},
|
||||
'bash' : {
|
||||
title: 'Bash',
|
||||
require: 'clike'
|
||||
},
|
||||
'c': {
|
||||
title: 'C',
|
||||
require: 'clike'
|
||||
},
|
||||
'cpp': {
|
||||
title: 'C++',
|
||||
require: 'c'
|
||||
},
|
||||
'python': {
|
||||
title: 'Python'
|
||||
},
|
||||
'sql': {
|
||||
title: 'SQL'
|
||||
},
|
||||
'groovy': {
|
||||
title: 'Groovy',
|
||||
require: 'clike'
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
meta: {
|
||||
path: 'plugins/{id}/prism-{id}',
|
||||
link: 'plugins/{id}/',
|
||||
hasCSS: true
|
||||
},
|
||||
'line-highlight': 'Line Highlight',
|
||||
'show-invisibles': 'Show Invisibles',
|
||||
'autolinker': 'Autolinker',
|
||||
'wpd': 'WebPlatform Docs'
|
||||
}
|
||||
};
|
|
@ -126,6 +126,7 @@ section.download {
|
|||
|
||||
<script src="prism.js"></script>
|
||||
<script src="utopia.js"></script>
|
||||
<script src="components.js"></script>
|
||||
<script src="code.js"></script>
|
||||
<script src="download.js"></script>
|
||||
|
||||
|
|
|
@ -433,6 +433,7 @@ class CoffeeScript extends Prism.Javascript
|
|||
|
||||
<script src="prism.js"></script>
|
||||
<script src="utopia.js"></script>
|
||||
<script src="components.js"></script>
|
||||
<script src="code.js"></script>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -180,6 +180,7 @@
|
|||
|
||||
<script src="prism.js"></script>
|
||||
<script src="utopia.js"></script>
|
||||
<script src="components.js"></script>
|
||||
<script src="code.js"></script>
|
||||
|
||||
</body>
|
||||
|
|
1
faq.html
1
faq.html
|
@ -175,6 +175,7 @@ entity</pre>
|
|||
});
|
||||
});
|
||||
</script>
|
||||
<script src="components.js"></script>
|
||||
<script src="code.js"></script>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
<section id="features-full">
|
||||
<h1>Full list of features</h1>
|
||||
<ul>
|
||||
<li><strong>Only 1.6KB</strong> minified & gzipped (core). Each language definition adds roughly 300-500 bytes.</li>
|
||||
<li><strong>Only 2KB</strong> minified & gzipped (core). Each language definition adds roughly 300-500 bytes.</li>
|
||||
<li>Encourages good author practices. Other highlighters encourage or even force you to use elements that are semantically wrong,
|
||||
like <code><pre></code> (on its own) or <code><script></code>.
|
||||
Prism forces you to use the correct element for marking up code: <code><code></code>.
|
||||
|
@ -193,6 +193,7 @@
|
|||
|
||||
<script src="prism.js" data-default-language="markup"></script>
|
||||
<script src="utopia.js"></script>
|
||||
<script src="components.js"></script>
|
||||
<script src="code.js"></script>
|
||||
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue