Welcome to mirror list, hosted at ThFree Co, Russian Federation.

README « js - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js/README
blob: 39939896c4519129ca18a317eda06a69d63df6f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Deployment

* piwik.js is minified using YUICompressor 2.4.2.
  To install YUICompressor run:
    $ cd /path/to/piwik/js/
    $ wget http://www.julienlecomte.net/yuicompressor/yuicompressor-2.4.2.zip
    $ unzip yuicompressor-2.4.2.zip
    
  To compress the code containing the evil "eval", either apply the patch from
  http://yuilibrary.com/projects/yuicompressor/ticket/2343811,
  or run:
    $ cd /path/to/piwik/js/
    $ sed 's/eval/replacedEvilString/' <piwik.js | java -jar yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar --type js --line-break 1000 | sed 's/replacedEvilString/eval/' > piwik-min.js && cp piwik-min.js ../piwik.js
    
  This will generate the minify /path/to/piwik/js/piwik-min.js and copy it to /path/to/piwik/piwik.js

* The uncompressed piwik.js resides in the js/ folder. If you omit the filename,
  js/index.php will serve the minified version.  A side effect of this feature
  is that it is not currently blockable by various AdBlock filters.

	<script src="http"//yoursite/js/" type="text/javascript">

* In a production environment, the tests/javascript folder is not used and can
  be removed (if present).

  Note: if the file "js/tests/enable_sqlite" exists, additional unit tests
        (requires the sqlite extension) are enabled.