milkee 0.0.6 → 0.0.7
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/main.js +4 -3
- package/package.json +1 -1
- package/temp/coffee.config.js +8 -2
package/dist/main.js
CHANGED
@@ -41,7 +41,7 @@
|
|
41
41
|
};
|
42
42
|
|
43
43
|
compile = function() {
|
44
|
-
var command, commandParts, compilerProcess, config, error, i, item, itemPath, items, len, options, otherOptionStrings, targetDir;
|
44
|
+
var command, commandParts, compilerProcess, config, error, i, item, itemPath, items, len, milkee, milkeeOptions, options, otherOptionStrings, targetDir;
|
45
45
|
if (!fs.existsSync(CONFIG_PATH)) {
|
46
46
|
consola.error(`\`${CONFIG_FILE}\` not found in this directory: ${CWD}`);
|
47
47
|
consola.info('Please run `milkee --setup` to create a configuration file.');
|
@@ -54,6 +54,8 @@
|
|
54
54
|
process.exit(1);
|
55
55
|
}
|
56
56
|
options = config.options || {};
|
57
|
+
milkee = config.milkee || {};
|
58
|
+
milkeeOptions = config.milkee.options || {};
|
57
59
|
commandParts = ['coffee'];
|
58
60
|
if (options.join) {
|
59
61
|
commandParts.push('--join');
|
@@ -62,9 +64,8 @@
|
|
62
64
|
commandParts.push('--output');
|
63
65
|
commandParts.push(`\"${config.output}\"`);
|
64
66
|
}
|
65
|
-
delete options.join;
|
66
67
|
otherOptionStrings = [];
|
67
|
-
if (
|
68
|
+
if (milkeeOptions.refresh) {
|
68
69
|
targetDir = path.join(CWD, config.output);
|
69
70
|
if (!fs.existsSync(targetDir)) {
|
70
71
|
consola.info("Refresh skipped.");
|
package/package.json
CHANGED
package/temp/coffee.config.js
CHANGED
@@ -2,12 +2,10 @@ module.exports = {
|
|
2
2
|
// The entry point for compilation.
|
3
3
|
// This can be a single file or a directory.
|
4
4
|
entry: 'src',
|
5
|
-
|
6
5
|
// The output for the compiled JavaScript files.
|
7
6
|
// If 'join' is true, this should be a single file path (e.g., 'dist/app.js').
|
8
7
|
// If 'join' is false, this should be a directory (e.g., 'dist').
|
9
8
|
output: 'dist',
|
10
|
-
|
11
9
|
// (Optional) Additional options for the CoffeeScript compiler.
|
12
10
|
// See `coffee --help` for all available options.
|
13
11
|
// Web: https://coffeescript.org/annotated-source/command.html
|
@@ -22,4 +20,12 @@ module.exports = {
|
|
22
20
|
// literate: false,
|
23
21
|
// watch: false,
|
24
22
|
},
|
23
|
+
// (Optional) Additional options/plugins for the Milkee builder.
|
24
|
+
milkee: {
|
25
|
+
options: {
|
26
|
+
// Before compiling, reset the directory.
|
27
|
+
// refresh: false,
|
28
|
+
},
|
29
|
+
plugins: []
|
30
|
+
},
|
25
31
|
};
|