Skip to content

Commit 2014a4e

Browse files
authored
Merge pull request #27 from OpenScriptJs/develop
Develop
2 parents 15363b9 + 80b840d commit 2014a4e

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

OpenScript.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4320,6 +4320,7 @@ const {
43204320
payload,
43214321
} = new OpenScript.Initializer();
43224322

4323+
window.OpenScript = OpenScript;
43234324
const OJS = OpenScript;
43244325

43254326
/**

example/logic.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ bc.counter.listener((state) => {
7878
console.log(`Hello ${state.value}, you are a multiple of 10`);
7979
}
8080
});
81+
8182
bc.counter.listener((state) => {
8283
if (state.value % 20 == 0) {
8384
console.log(`Hello ${state.value}, you are a multiple of 20`);

example/ojs-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,4 @@ broker.requireEventsRegistration(true);
153153
* ---------------------------------------------
154154
*
155155
*/
156-
//router.init();
156+
// router.init();

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ You most likely want to use functional components when you have pure rendering t
664664
##### Grouping Components
665665
You can group components by declaring them in the same file. Both functional and class-based components can be declared in the same file. When the file is loaded, all the components in that file are registered, mounted, and bound.
666666

667-
```js
667+
```javascript
668668
// Main.js
669669
class App extends OpenScript.Component {...}
670670

@@ -681,7 +681,7 @@ function Header() {...}
681681
##### Loading the Component
682682
The components are in different files, therefore, they must be loaded and registered before rendering. To load a file that contains component declarations, ensure that you have set the components path in your `ojs-config` file. Then use the below code in the file you want to load the component in.
683683

684-
```js
684+
```javascript
685685
// folder structure
686686
|-components
687687
|-Blog

0 commit comments

Comments
 (0)