Skip to content

Commit

Permalink
fix js asset localization
Browse files Browse the repository at this point in the history
  • Loading branch information
michelegiorgi committed Jun 28, 2021
1 parent 2e0086c commit f143ba3
Show file tree
Hide file tree
Showing 4 changed files with 3,059 additions and 3,278 deletions.
2 changes: 1 addition & 1 deletion includes/class-formality.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Formality {
*/
public function __construct() {

$this->version = defined( 'FORMALITY_VERSION' ) ? FORMALITY_VERSION : '1.3.3';
$this->version = defined( 'FORMALITY_VERSION' ) ? FORMALITY_VERSION : '1.3.4';
$this->formality = 'formality';
$this->fse = version_compare( $GLOBALS['wp_version'], '5.7.9', '>' );

Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ You can extend Formality plugin functionality with its custom hooks. Formality h

= Translations =

Formality is now available in 3 languages. You can now choose between English, Italian and Indonesian (Thanks to [Kharis Sulistiyono](https://profiles.wordpress.org/kharisblank/)). You can help translating Formality to your language on [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/formality)
Formality is now available in 5 languages. You can now choose between English, Italian, Indonesian, Czech and Swedish (Thanks to WordPress Community). You can help translating Formality to your language on [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/formality)

== Installation ==

Expand Down
42 changes: 26 additions & 16 deletions webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mix

mix
.sass('assets/styles/public.scss', 'styles/formality-public.css')
.sass('assets/styles/admin.scss', 'styles/formality-admin.css')
.sass('assets/styles/admin.scss', 'styles/formality-admin.css');

mix
.js('assets/scripts/public.js', 'scripts/formality-public.js')
Expand All @@ -27,19 +27,29 @@ mix
], 'dist/fonts');

mix
.webpackConfig({
externals: {
wp: 'wp',
react: 'React',
jquery: 'jQuery',
'react-dom': 'ReactDOM',
lodash: 'lodash',
.webpackConfig({
externals: {
wp: 'wp',
react: 'React',
jquery: 'jQuery',
'react-dom': 'ReactDOM',
lodash: 'lodash',
},
})
.autoload({ jquery: ['$', 'window.jQuery'] })
.options({
processCssUrls: false,
terser: {
terserOptions: {
mangle: {
reserved:['__']
},
output: {
comments: false
}
},
})
.autoload({ jquery: ['$', 'window.jQuery'] })
.options({
processCssUrls: false,
terser: { extractComments: false }
})
.sourceMaps(false, 'source-map')
.version();
extractComments: false
}
})
.sourceMaps(false, 'source-map')
.version();
Loading

0 comments on commit f143ba3

Please sign in to comment.