Jump to content

[1.7] Core.js uncompiled version


roja45

Recommended Posts

Is the core.js file a compressed version of all the files in the _core directory, i.e. can I just combine those files to get an uncompressed version, more developer friendly version so I can actually see what's going on, or is it complied and combined in a special way?

Link to comment
Share on other sites

Is the core.js file a compressed version of all the files in the _core directory, i.e. can I just combine those files to get an uncompressed version, more developer friendly version so I can actually see what's going on, or is it complied and combined in a special way?

Where did you find _core directory???

I wanted to lay my hands on that code long time ago!

Link to comment
Share on other sites

The source code is on github,_core directory is there.

Would be useful to have an uncompressed version when debug is enabled, lots of interesting stuff going on there.

Thanks! Can you give me the link? And how do you think, is there something to be removed to shrink the core.js file size? It's ridiculously large as for me.

PS:

You can remove the js minification in webpack.config.js in _dev folder by playing with the code ( or just deleting it ) :

config.plugins.push(
  new webpack.optimize.UglifyJsPlugin({
    sourceMap: false,
    compress: {
      sequences: true,
      conditionals: true,
      booleans: true,
      if_return: true,
      join_vars: true,
      drop_console: true
    },
    output: {
      comments: false
    },
    minimize: true
  })
);

Here is the explanation how to use webpack in PS1.7.2.0

https://www.prestashop.com/forums/topic/612908-how-to-use-webpack-with-classic-theme/?do=findComment&comment=2591297

Edited by fortuner (see edit history)
  • Like 1
Link to comment
Share on other sites

https://github.com/PrestaShop/PrestaShop/tree/1.7.2.x  You can download the zip.

 

Thanks for the info, I'll check it out.  No idea regarding core.js, only just starting with 1.7, finally getting around to updating my modules.  I'm less concerned about making 1.7 installation more efficient for than having to relearn everything to get the modules to work.

Link to comment
Share on other sites

  • 1 year later...

custom.js not theme.js

I don't think there are any guarantees.  If you're making changes to the default theme, and they make updates to the default theme, you'll likely lose those changes, but I assume changes made in the custom.js file will survive updates.

Maybe you can use the new child theme feature, but I haven't used that myself, so can't comment on how it may work..

Link to comment
Share on other sites

  • 2 years later...

it might help but with prestashop 1.7 i am quoting this post:

https://github.com/PrestaShop/PrestaShop/issues/13562

 

Quote

 

Hi, I guess you are referring to https://github.com/PrestaShop/PrestaShop/blob/develop/themes/core.js ?

This is a bundled JS file, created by webpack. The developer version is splitted into several files, each relevant to one topic. You can find them in https://github.com/PrestaShop/PrestaShop/tree/develop/themes/_core/js

 

https://github.com/PrestaShop/PrestaShop/tree/develop/themes/_core/js

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...