Skip to content

Commit 871a862

Browse files
author
carl@connectedbrains.com
committed
Adjust installation doc
1 parent 409525f commit 871a862

File tree

1 file changed

+3
-68
lines changed

1 file changed

+3
-68
lines changed

usage/_posts/2014-01-20-client-side.html

Lines changed: 3 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
## Installation
1212

13-
GSS will go parallel with [Web Workers](http://www.html5rocks.com/en/tutorials/workers/basics/) when the browser supports it. Thus, you need two JS files to get started; `gss.js` & it's helpful `worker.js`. Use the `GSS_CONFIG` object to set worker URL.
14-
1513
If you download via Bower:
1614

1715
{% highlight javascript %}
@@ -21,18 +19,14 @@
2119
Use the following:
2220

2321
{% highlight html %}
24-
<script>
25-
GSS_CONFIG = {
26-
worker: "../bower_components/gss/dist/worker.js"
27-
}
22+
<script src="/bower_components/gss/dist/gss.js"></script>
23+
<script type="text/javascript">
24+
window.engine = new GSS(document);
2825
</script>
29-
<script src="../bower_components/gss/dist/gss.js"></script>
3026
{% endhighlight %}
3127

3228
Otherwise, [download version {{site.version}}](https://github.com/gss/engine/archive/{{ site.version }}.zip) or clone the [github repo](https://github.com/gss/engine).
3329

34-
**IMPORTANT** worker URL must be configured!
35-
3630
## Usage
3731

3832
To load your `.gss` stylesheets, just add `type=text/gss`:
@@ -50,62 +44,3 @@
5044

5145
</style>
5246
{% endhighlight %}
53-
54-
55-
## Configuration
56-
57-
Options can be given on the following global object before the `<script src="gss.js"></script>`:
58-
59-
{% highlight html %}
60-
<script>
61-
GSS_CONFIG = {
62-
63-
// Web Worker
64-
// URL to worker must be set!
65-
worker: '../dist/worker.js',
66-
useWorker: !!window.Worker,
67-
68-
// Cassowary defaults
69-
defaultStrength: 'weak', // 'weak', 'medium', 'strong', 'required'
70-
defaultWeight: 0,
71-
72-
// FOUC prevention
73-
// adds "gss-ready" and removes "gss-not-ready" classes on html tag
74-
readyClass: true,
75-
76-
// Fractional pixels values
77-
// bad for text, good for accuracy
78-
fractionalPixels: true,
79-
80-
// Scrollbar size offset
81-
verticalScroll: true,
82-
horizontalScroll: false,
83-
84-
// Mutation Observer
85-
observe: true,
86-
observerOptions: {
87-
subtree: true,
88-
childList: true,
89-
attributes: true,
90-
characterData: true
91-
},
92-
93-
// Callback to process variables before setting DOM
94-
processBeforeSet: null, // function
95-
96-
// ::window resize debounce time
97-
resizeDebounce: 32, // (ms)
98-
99-
// Logging
100-
debug: false,
101-
warn: false,
102-
perf: false
103-
104-
};
105-
</script>
106-
<script src="gss.js"></script>
107-
{% endhighlight %}
108-
109-
110-
111-

0 commit comments

Comments
 (0)