milkee 3.1.3-dev.0 → 3.2.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/dist/commands/compile.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by CoffeeScript 2.7.0
|
|
2
|
-
var CONFIG_FILE, CONFIG_PATH, CWD, checkCoffee, checkLatest, clearBackups, compile, confirmContinue, consola, crypto, exec, executeCopy, executeRefresh, fs, path, restoreBackups, runPlugins, spawn;
|
|
2
|
+
var CONFIG_FILE, CONFIG_PATH, CWD, checkCoffee, checkLatest, checkVersion, clearBackups, compile, confirmContinue, consola, crypto, exec, executeCopy, executeRefresh, fs, path, restoreBackups, runPlugins, spawn;
|
|
3
3
|
|
|
4
4
|
fs = require('fs');
|
|
5
5
|
|
|
@@ -24,8 +24,8 @@ confirmContinue = require('../options/confirm');
|
|
|
24
24
|
executeCopy = require('../options/copy');
|
|
25
25
|
|
|
26
26
|
// async
|
|
27
|
-
|
|
28
|
-
var action,
|
|
27
|
+
checkVersion = async function() {
|
|
28
|
+
var action, cl, installCmd;
|
|
29
29
|
cl = (await checkLatest());
|
|
30
30
|
if (cl) {
|
|
31
31
|
action = (await consola.prompt('Do you want to update now?', {
|
|
@@ -60,13 +60,18 @@ compile = async function() {
|
|
|
60
60
|
return cp.on('close', resolve);
|
|
61
61
|
});
|
|
62
62
|
consola.success('Update finished! Please run the command again.');
|
|
63
|
-
process.exit(0);
|
|
63
|
+
return process.exit(0);
|
|
64
64
|
} else if (action === 'skip') {
|
|
65
|
-
consola.info('Skipped!');
|
|
65
|
+
return consola.info('Skipped!');
|
|
66
66
|
} else if (!action) {
|
|
67
|
-
process.exit(1);
|
|
67
|
+
return process.exit(1);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// async
|
|
73
|
+
compile = async function() {
|
|
74
|
+
var backupFiles, compilerProcess, config, debounceTimeout, enabledOptions, enabledOptionsList, error, execCommand, execCommandParts, execOtherOptionStrings, lastError, milkee, milkeeOptions, options, spawnArgs, summary, toContinue;
|
|
70
75
|
checkCoffee();
|
|
71
76
|
if (!fs.existsSync(CONFIG_PATH)) {
|
|
72
77
|
consola.error(`\`${CONFIG_FILE}\` not found in this directory: ${CWD}`);
|
|
@@ -82,6 +87,9 @@ compile = async function() {
|
|
|
82
87
|
options = {...(config.options || {})};
|
|
83
88
|
milkee = config.milkee || {};
|
|
84
89
|
milkeeOptions = config.milkee.options || {};
|
|
90
|
+
if (!milkeeOptions.ignoreUpdate) {
|
|
91
|
+
await checkVersion();
|
|
92
|
+
}
|
|
85
93
|
execCommandParts = ['coffee'];
|
|
86
94
|
if (options.join) {
|
|
87
95
|
execCommandParts.push('--join');
|
package/dist/commands/setup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by CoffeeScript 2.7.0
|
|
2
|
-
var CONFIG_FILE, CONFIG_PATH, checkCoffee, consola, fs, path, setup;
|
|
2
|
+
var CONFIG_FILE, CONFIG_PATH, checkCoffee, checkLatest, consola, fs, path, setup;
|
|
3
3
|
|
|
4
4
|
fs = require('fs');
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ consola = require('consola');
|
|
|
9
9
|
|
|
10
10
|
({CONFIG_FILE, CONFIG_PATH} = require('../lib/constants'));
|
|
11
11
|
|
|
12
|
-
({checkCoffee} = require('../lib/checks'));
|
|
12
|
+
({checkLatest, checkCoffee} = require('../lib/checks'));
|
|
13
13
|
|
|
14
14
|
// async
|
|
15
15
|
setup = async function() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "milkee",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "A simple CoffeeScript build tool with coffee.config.cjs",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"bin": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
},
|
|
38
38
|
"homepage": "https://milkee.org",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@milkee/d": "^0.
|
|
40
|
+
"@milkee/d": "^0.3.0",
|
|
41
41
|
"consola": "^3.4.2",
|
|
42
|
-
"is-package-latest": "^
|
|
42
|
+
"is-package-latest": "^2.0.0",
|
|
43
43
|
"yargs": "^18.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
package/temp/coffee.config.cjs
CHANGED
|
@@ -25,6 +25,8 @@ module.exports = {
|
|
|
25
25
|
// (Optional) Additional options/plugins for the Milkee builder.
|
|
26
26
|
milkee: {
|
|
27
27
|
options: {
|
|
28
|
+
// Ignore update notifications.
|
|
29
|
+
// ignoreUpdate: false,
|
|
28
30
|
// Before compiling, reset the directory.
|
|
29
31
|
// refresh: false,
|
|
30
32
|
// Before compiling, confirm "Do you want to Continue?"
|
|
@@ -25,6 +25,8 @@ module.exports = {
|
|
|
25
25
|
// (Optional) Additional options/plugins for the Milkee builder.
|
|
26
26
|
milkee: {
|
|
27
27
|
options: {
|
|
28
|
+
// Ignore update notifications.
|
|
29
|
+
// ignoreUpdate: false,
|
|
28
30
|
// Before compiling, reset the directory.
|
|
29
31
|
// refresh: false,
|
|
30
32
|
// Before compiling, confirm "Do you want to Continue?"
|