create-coralite 0.18.2 → 0.18.3

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.18.2",
3
+ "version": "0.18.3",
4
4
  "description": "Coralite scaffolding script",
5
5
  "bin": {
6
6
  "create-coralite": "bin/index.js",
@@ -7,6 +7,6 @@
7
7
  "build": "coralite-scripts build"
8
8
  },
9
9
  "devDependencies": {
10
- "coralite-scripts": "^0.18.2"
10
+ "coralite-scripts": "^0.18.3"
11
11
  }
12
12
  }
@@ -10,10 +10,15 @@
10
10
  export default defineComponent({
11
11
  script ({ values, refs }) {
12
12
  const button = refs('count-button')
13
- let count = 1
13
+ const step = values.step ? parseInt(values.step) : 1
14
+ let count = 0
14
15
 
15
16
  button.addEventListener('click', () => {
16
- button.textContent = `Count is ${count++}`
17
+ // increment the counter by the specified step value
18
+ count += step
19
+
20
+ // update the button's text content to reflect the new count value
21
+ button.textContent = `Count is ${count}`
17
22
  })
18
23
  }
19
24
  })
@@ -7,6 +7,6 @@
7
7
  "build": "coralite-scripts build"
8
8
  },
9
9
  "devDependencies": {
10
- "coralite-scripts": "^0.18.2"
10
+ "coralite-scripts": "^0.18.3"
11
11
  }
12
12
  }
@@ -10,10 +10,15 @@
10
10
  export default defineComponent({
11
11
  script ({ values, refs }) {
12
12
  const button = refs('count-button')
13
- let count = 1
13
+ const step = values.step ? parseInt(values.step) : 1
14
+ let count = 0
14
15
 
15
16
  button.addEventListener('click', () => {
16
- button.textContent = `Count is ${count++}`
17
+ // increment the counter by the specified step value
18
+ count += step
19
+
20
+ // update the button's text content to reflect the new count value
21
+ button.textContent = `Count is ${count}`
17
22
  })
18
23
  }
19
24
  })