create-coralite 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-coralite",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "Coralite scaffolding script",
5
5
  "bin": {
6
6
  "create-coralite": "bin/index.js",
@@ -3,10 +3,11 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "scripts": {
6
- "start": "coralite-scripts dev",
6
+ "start": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --experimental-import-meta-resolve\" coralite-scripts dev",
7
7
  "build": "coralite-scripts build"
8
8
  },
9
9
  "devDependencies": {
10
- "coralite-scripts": "^0.23.0"
10
+ "coralite-scripts": "^0.24.0",
11
+ "cross-env": "^10.1.0"
11
12
  }
12
13
  }
@@ -1,6 +1,6 @@
1
1
  <template id="coralite-counter">
2
2
  <button ref="count-button" type="button">
3
- Count is 0
3
+ Count is 0
4
4
  </button>
5
5
  </template>
6
6
 
@@ -8,18 +8,20 @@
8
8
  import { defineComponent } from 'coralite'
9
9
 
10
10
  export default defineComponent({
11
- script ({ values }, { refs }) {
12
- const button = refs('count-button')
13
- const step = values.step ? parseInt(values.step) : 1
14
- let count = 0
15
-
16
- button.addEventListener('click', () => {
17
- // increment the counter by the specified step value
18
- count += step
11
+ client: {
12
+ script ({ values, helpers }) {
13
+ const button = helpers.refs('count-button')
14
+ const step = values.step ? parseInt(values.step) : 1
15
+ let count = 0
16
+
17
+ button.addEventListener('click', () => {
18
+ // increment the counter by the specified step value
19
+ count += step
19
20
 
20
- // update the button's text content to reflect the new count value
21
- button.textContent = `Count is ${count}`
22
- })
21
+ // update the button's text content to reflect the new count value
22
+ button.textContent = `Count is ${count}`
23
+ })
24
+ }
23
25
  }
24
26
  })
25
- </script>
27
+ </script>
@@ -3,10 +3,11 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "scripts": {
6
- "start": "coralite-scripts dev",
6
+ "start": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --experimental-import-meta-resolve\" coralite-scripts dev",
7
7
  "build": "coralite-scripts build"
8
8
  },
9
9
  "devDependencies": {
10
- "coralite-scripts": "^0.23.0"
10
+ "coralite-scripts": "^0.24.0",
11
+ "cross-env": "^10.1.0"
11
12
  }
12
13
  }
@@ -1,6 +1,6 @@
1
1
  <template id="coralite-counter">
2
2
  <button ref="count-button" type="button">
3
- Count is 0
3
+ Count is 0
4
4
  </button>
5
5
  </template>
6
6
 
@@ -8,18 +8,20 @@
8
8
  import { defineComponent } from 'coralite'
9
9
 
10
10
  export default defineComponent({
11
- script ({ values }, { refs }) {
12
- const button = refs('count-button')
13
- const step = values.step ? parseInt(values.step) : 1
14
- let count = 0
15
-
16
- button.addEventListener('click', () => {
17
- // increment the counter by the specified step value
18
- count += step
11
+ client: {
12
+ script ({ values, helpers }) {
13
+ const button = refs('count-button')
14
+ const step = values.step ? parseInt(values.step) : 1
15
+ let count = 0
16
+
17
+ button.addEventListener('click', () => {
18
+ // increment the counter by the specified step value
19
+ count += step
19
20
 
20
- // update the button's text content to reflect the new count value
21
- button.textContent = `Count is ${count}`
22
- })
21
+ // update the button's text content to reflect the new count value
22
+ button.textContent = `Count is ${count}`
23
+ })
24
+ }
23
25
  }
24
26
  })
25
- </script>
27
+ </script>