It is possible to re-compress the files after editing by installing a compressor and following the instructions below.
The compressor of choice is 'Uglify', which is also used by jQuery; currently the best compressor available.
Installing Uglify is fairly easy; the batch files to compress our files are installed as standard in the site folder. The intention was that any designers modifying the scripts would be fairly competent and can easily re-compress them prior to shipping to the customer.
To install Uglify:
1. install 'node.js' using the Windows installer at:-
This should set up paths so that 'node.js' can be run from the command line.
NOTE: If that doesn't happen you may need to reboot.
2. Open a cmd command prompt and enter
npm install uglify-js@2 -g
and press return.
If this doesn't run you may have to change to the folder C:\Program Files (x86)\nodejs and run it directly from there.
There is a batch file to create a compressed sellerdeck.min.js in the site folder called:-
NOTE: If there is an error when running the batch file in the site, it's possible that you need to restart your computer so that uglify will work.
If you receive an error message: -
'create_sellerdeck_min.bat' is not recognized as an internal or external command operable program or batch file.
Press any key to continue . . .
Even when running as 'Administrator', this is because Windows is running the process in the 'System32' folder instead of the local directory.
This can be resolved by copying the file 'create_sellerdeck_min_pause.bat' and adding the line: -
Note also that .map files are created and can be used by the debugger in Chrome.
For more information see http://www.elijahmanor.com/the-magic...-9-source-map/ . The jQuery map file has been included as standard as well as the uncompressed jQuery file.
NOTE: It is your responsibility to ensure how safe the files are, as this procedure and the consequences would not be supported by SellerDeck. You will find default copies of all the files within the folder 'Original' that sits under 'SellerDeck 2014' folder within the 'Program Files/Program Files (x86)' folder.
|Thread Tools||Search this Thread|
|Display Modes||Rate This Thread|