coralite-scripts 0.21.0 → 0.22.1

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.
Files changed (2) hide show
  1. package/libs/server.js +8 -5
  2. package/package.json +2 -2
package/libs/server.js CHANGED
@@ -41,6 +41,14 @@ async function server (config, options) {
41
41
  await coralite.initialise()
42
42
  displaySuccess('Coralite initialized successfully')
43
43
 
44
+ if (config.plugins) {
45
+ for (const plugin of config.plugins) {
46
+ if (typeof plugin.server === 'function') {
47
+ await plugin.server(app, coralite)
48
+ }
49
+ }
50
+ }
51
+
44
52
  const watchPath = [
45
53
  config.public,
46
54
  config.pages,
@@ -75,8 +83,6 @@ async function server (config, options) {
75
83
  next()
76
84
  })
77
85
 
78
- let initWatcher = true
79
-
80
86
  // check if Sass is configured and add its input directory to watchPath for file changes.
81
87
  if (config.styles) {
82
88
  if (config.styles.input) {
@@ -103,7 +109,6 @@ async function server (config, options) {
103
109
  start
104
110
  })
105
111
 
106
- initWatcher = false
107
112
  let dash = colours.gray(' ─ ')
108
113
 
109
114
  for (let i = 0; i < results.length; i++) {
@@ -120,8 +125,6 @@ async function server (config, options) {
120
125
  plugins: config.cssPlugins,
121
126
  start
122
127
  })
123
-
124
- initWatcher = false
125
128
  } else {
126
129
  displayError('Coralite config styles type must not be empty')
127
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coralite-scripts",
3
- "version": "0.21.0",
3
+ "version": "0.22.1",
4
4
  "description": "Configuration and scripts for Create Coralite.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -57,7 +57,7 @@
57
57
  "portfinder": "^1.0.38",
58
58
  "postcss": "^8.5.6",
59
59
  "sass": "^1.91.0",
60
- "coralite": "0.21.0"
60
+ "coralite": "0.22.1"
61
61
  },
62
62
  "scripts": {
63
63
  "build": "premove dist && pnpm build-types",