ember-cli 7.0.0-alpha.1 → 7.0.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/CHANGELOG.md +197 -317
- package/docs/build/data.json +1 -1
- package/package.json +40 -48
- package/packages/addon-blueprint/package.json +3 -11
- package/packages/app-blueprint/files/package.json +6 -6
- package/packages/app-blueprint/package.json +2 -10
- package/packages/blueprint-blueprint/files/blueprints/__name__/files/.gitkeep +0 -0
- package/packages/blueprint-blueprint/files/blueprints/__name__/index.js +0 -16
- package/packages/blueprint-blueprint/index.js +0 -5
- package/packages/blueprint-blueprint/package.json +0 -13
- package/packages/blueprint-model/package.json +0 -19
- package/packages/blueprint-model/utilities/directory-for-package-name.js +0 -31
- package/packages/blueprint-model/utilities/edit-file-diff.js +0 -64
- package/packages/blueprint-model/utilities/experiments.js +0 -63
- package/packages/blueprint-model/utilities/file-info.js +0 -170
- package/packages/blueprint-model/utilities/open-editor.js +0 -44
- package/packages/blueprint-model/utilities/prepend-emoji.js +0 -12
- package/packages/blueprint-model/utilities/process-template.js +0 -10
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const spawn = require('child_process').spawn;
|
|
4
|
-
|
|
5
|
-
function openEditor(file) {
|
|
6
|
-
if (!openEditor.canEdit()) {
|
|
7
|
-
throw new Error('EDITOR environment variable is not set');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
if (!file) {
|
|
11
|
-
throw new Error('No `file` option provided');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
let editorArgs = openEditor._env().EDITOR.split(' ');
|
|
15
|
-
let editor = editorArgs.shift();
|
|
16
|
-
const args = [file].concat(editorArgs);
|
|
17
|
-
let editProcess = openEditor._spawn(editor, args, { stdio: 'inherit' });
|
|
18
|
-
|
|
19
|
-
return new Promise((resolve, reject) => {
|
|
20
|
-
editProcess.on('close', (code) => {
|
|
21
|
-
if (code === 0) {
|
|
22
|
-
resolve();
|
|
23
|
-
} else {
|
|
24
|
-
reject(
|
|
25
|
-
new Error(`Spawn('${editor}', [${args.join(',')}]) exited with a non zero error status code: '${code}'`)
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
openEditor.canEdit = function () {
|
|
33
|
-
return openEditor._env().EDITOR !== undefined;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
openEditor._env = function () {
|
|
37
|
-
return process.env;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
openEditor._spawn = function () {
|
|
41
|
-
return spawn.apply(this, arguments);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
module.exports = openEditor;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function supportEmoji() {
|
|
4
|
-
const hasEmojiTurnedOff = process.argv.indexOf('--no-emoji') > -1;
|
|
5
|
-
return process.stdout.isTTY && process.platform !== 'win32' && !hasEmojiTurnedOff;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const areEmojiSupported = supportEmoji();
|
|
9
|
-
|
|
10
|
-
module.exports = function prependEmoji(emoji, msg) {
|
|
11
|
-
return areEmojiSupported ? `${emoji} ${msg}` : msg;
|
|
12
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
module.exports = function processTemplate(content, context) {
|
|
4
|
-
let options = {
|
|
5
|
-
evaluate: /<%([\s\S]+?)%>/g,
|
|
6
|
-
interpolate: /<%=([\s\S]+?)%>/g,
|
|
7
|
-
escape: /<%-([\s\S]+?)%>/g,
|
|
8
|
-
};
|
|
9
|
-
return require('lodash/template')(content, options)(context);
|
|
10
|
-
};
|