chocola 1.2.0 → 1.2.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.
- package/compiler/index.js +8 -8
- package/package.json +1 -1
package/compiler/index.js
CHANGED
|
@@ -127,13 +127,13 @@ async function processAssets(doc, rootDir, srcDir, outDirPath) {
|
|
|
127
127
|
* }
|
|
128
128
|
* >} config
|
|
129
129
|
*/
|
|
130
|
-
export default async function runtime(rootDir,
|
|
131
|
-
!
|
|
130
|
+
export default async function runtime(rootDir, buildConfig) {
|
|
131
|
+
!buildConfig.isHotReload && logBanner();
|
|
132
132
|
|
|
133
133
|
// Load Configuration
|
|
134
134
|
const config = await loadConfig(rootDir);
|
|
135
135
|
const paths = resolvePaths(rootDir, config);
|
|
136
|
-
!
|
|
136
|
+
!buildConfig.isHotReload && console.log(logSeparation);
|
|
137
137
|
|
|
138
138
|
// Setup Output Directory
|
|
139
139
|
await setupOutputDirectory(paths.outDir, config.emptyOutDir);
|
|
@@ -147,9 +147,9 @@ export default async function runtime(rootDir, config) {
|
|
|
147
147
|
!config.isHotReload && console.log(logSeparation);
|
|
148
148
|
|
|
149
149
|
// Create and Validate DOM
|
|
150
|
-
!
|
|
151
|
-
!
|
|
152
|
-
!
|
|
150
|
+
!buildConfig.isHotReload && console.log(` BUNDLING STATIC BUILD`);
|
|
151
|
+
!buildConfig.isHotReload && console.log(chalk.bold.green(">"), "Creating Chocola static build in directory", chalk.green.underline(paths.outDir) + "\n");
|
|
152
|
+
!buildConfig.isHotReload && console.log(logSeparation);
|
|
153
153
|
|
|
154
154
|
const dom = createDOM(srcIndexContent);
|
|
155
155
|
const doc = dom.window.document;
|
|
@@ -174,6 +174,6 @@ export default async function runtime(rootDir, config) {
|
|
|
174
174
|
await copyResources(rootDir, config.srcDir, paths.outDir);
|
|
175
175
|
|
|
176
176
|
// Success Message
|
|
177
|
-
!
|
|
178
|
-
|
|
177
|
+
!buildConfig.isHotReload && logSuccess(paths.outDir);
|
|
178
|
+
buildConfig.isHotReload && console.log("Dev server updated");
|
|
179
179
|
}
|