Skip to content

Commit 3bd21a5

Browse files
committed
update examples
1 parent b3faf12 commit 3bd21a5

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// node hello.js
22

3-
var quranMeta = require("../dist/quran-meta.common.js")
3+
var quranMeta = require("../dist/index.cjs")
44
console.log(" Hello World! ") // => 'Hello World'
55
console.log(`There are ${quranMeta.meta.numSuras} suras in the Holy Quran`) // => '3 red apples'); // => '3 red apples'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// start with
2-
// node hello-es.mjs
2+
// node hello.mjs
33

4-
import { meta } from "../dist/quran-meta.js"
4+
import { meta } from "../dist/index.mjs"
55
console.log("hello")
66
//console.log(`There are ${meta.numSuras} suras in the Holy Quran`)
77
console.log(`There are ${meta.numSuras} suras in the Holy Quran`)

examples/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<html>
2-
<script src="../dist/quran-meta.js" type="text/javascript"></script>
2+
<script src="../dist/index.js" type="text/javascript"></script>
33
Once library is included global variable `quranMeta` is exposed:
44
<script type="text/javascript">
55
console.log("hello")

examples/modern/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Once library is included local variable `quranMeta` is exposed inside module script:
33

44
<script type="module">
5-
import { meta } from "../../dist/quran-meta.esm.js"
5+
import { meta } from "../../dist/index.mjs"
66
console.log("hello")
77
console.log(meta)
88
alert(`There are ${meta.numSuras} suras in the Holy Quran`)

examples/sample-cjs.js renamed to examples/sample.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
22
* This example creates list of [surah,ayah] number pairs in Holy Quran
33
*/
4-
// node sample-cjs.js
4+
// node sample.cjs
55

66
// const quranMeta = require("../dist/quran-meta.common.js")
7-
const quranMeta = require("../lib_cjs/index.js")
7+
const quranMeta = require("../dist/index.cjs")
88
console.log(`There are ${quranMeta.meta.numSuras} suras in the Holy Quran`)
99
const res = []
1010
for (let surah = 1; surah <= quranMeta.meta.numSuras; surah++) {

examples/sample-es.mjs renamed to examples/sample.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
22
* This example creates list of [surah,ayah] number pairs in Holy Quran
33
*/
4-
// node sample-es.mjs
4+
// node sample.mjs
55

6-
import { meta, SuraList } from "../dist/quran-meta.js"
6+
import { meta, SuraList } from "../dist/index.mjs"
77
console.log(`There are ${meta.numSuras} suras in the Holy Quran`)
88
const res = []
99
for (let surah = 1; surah <= meta.numSuras; surah++) {

0 commit comments

Comments
 (0)