Skip to content

Commit

Permalink
Build keep .min
Browse files Browse the repository at this point in the history
  • Loading branch information
shramee committed May 18, 2020
1 parent c58b06a commit 92bd1ce
Show file tree
Hide file tree
Showing 6 changed files with 364 additions and 366 deletions.
356 changes: 0 additions & 356 deletions assets/blocks.js

This file was deleted.

357 changes: 356 additions & 1 deletion assets/blocks.min.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions assets/caxton.js

This file was deleted.

5 changes: 4 additions & 1 deletion assets/caxton.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ browserify( './assets/blocks.es6' )
.transform( 'babelify', {presets: ['@babel/preset-env']} )
.transform( 'uglifyify' )
.bundle()
.pipe( fs.createWriteStream( './assets/blocks.js' ) );
.pipe( fs.createWriteStream( './assets/blocks.min.js' ) );

browserify( './assets/caxton.es6' )
.transform( 'babelify', {presets: ['@babel/preset-env']} )
.transform( 'uglifyify' )
.bundle()
.pipe( fs.createWriteStream( './assets/caxton.js' ) );
.pipe( fs.createWriteStream( './assets/caxton.min.js' ) );

console.log( 'Compiled' );
4 changes: 2 additions & 2 deletions inc/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public function enqueue() {
Caxton::instance()->public->enqueue();

// wp_enqueue_script( "$token-components", $url . 'assets/caxton-components.build.js', array( 'wp-blocks' ) );
wp_enqueue_script( "caxton", $url . 'caxton.js', array( 'wp-blocks', 'wp-block-library' ) );
wp_enqueue_script( "caxton", $url . 'caxton.min.js', array( 'wp-blocks', 'wp-block-library' ) );

wp_enqueue_script( "caxton-blocks", $url . 'blocks.js', array( "caxton" ) );
wp_enqueue_script( "caxton-blocks", $url . 'blocks.min.js', array( "caxton" ) );
wp_enqueue_style( "caxton-blocks", $url . 'blocks.css' );

$this->localize_scripts( $url );
Expand Down

0 comments on commit 92bd1ce

Please sign in to comment.