Skip to content
This repository was archived by the owner on Nov 2, 2024. It is now read-only.

Commit 5ef72fa

Browse files
committed
Bump to v1.0.0
- Update version to 1.0.0 - Combine files to improve download - Add explanatory readme.md in prism assets directory
1 parent 2636d20 commit 5ef72fa

File tree

4 files changed

+44
-21
lines changed

4 files changed

+44
-21
lines changed

assets/prism/prism-settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Prism.plugins.autoloader.languages_path = settings.pluginUrl + 'assets/prism/prism-components/';
1+
Prism.plugins.autoloader.languages_path = prism_settings.pluginUrl + 'assets/prism/prism-components/';

assets/prism/prism.js

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/prism/readme.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
# About Prism JS Files
3+
4+
The Prism.js file is the minified version from prismjs.com
5+
See the URL in the comments for plugins loaded.
6+
7+
Additionally, prism.js inlcudes the contents of prism-settings.js, and prism-title.js. The files are combined together to avoid mulitple connections and donwloads of files which are small.
8+
9+

index.php

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Code Syntax Block
44
* Plugin URI: https://github.com/mkaz/code-syntax-block
55
* Description: A plugin to extend Gutenberg code block with syntax highlighting
6-
* Version: 0.9.1
6+
* Version: 1.0.0
77
* Author: Marcus Kazmierczak
88
* Author URI: https://mkaz.blog/
99
* License: GPL2
@@ -14,7 +14,7 @@
1414
*/
1515

1616
// version added, used in URL
17-
define( 'MKAZ_CODE_SYNTAX_BLOCK_VERSION', '0.9.1' );
17+
define( 'MKAZ_CODE_SYNTAX_BLOCK_VERSION', '1.0.0' );
1818

1919
/**
2020
* Enqueue assets for editor portion of Gutenberg
@@ -78,25 +78,8 @@ function mkaz_code_syntax_view_assets() {
7878
true // In footer.
7979
);
8080

81-
wp_enqueue_script(
82-
'mkaz-code-syntax-prism-js-title',
83-
plugins_url( 'assets/prism/prism-title.js', __FILE__ ),
84-
[], // No dependencies.
85-
filemtime( plugin_dir_path( __FILE__ ) . 'assets/prism/prism-title.js' ),
86-
true // In footer.
87-
);
88-
89-
// enqueue prism settings script
90-
wp_enqueue_script(
91-
'mkaz-code-syntax-prism-settings',
92-
plugins_url( $prism_settings_path, __FILE__ ),
93-
[], // no dependencies
94-
filemtime( plugin_dir_path(__FILE__) . $prism_settings_path ),
95-
true // in footer
96-
);
97-
9881
// save the plugin path
99-
wp_localize_script('mkaz-code-syntax-prism-settings', 'settings', array(
82+
wp_localize_script('mkaz-code-syntax-prism-js', 'prism_settings', array(
10083
'pluginUrl' => plugin_dir_url(__FILE__),
10184
));
10285
}

0 commit comments

Comments
 (0)