@contentful/create-contentful-app 1.1.0-alpha.1 → 1.1.0-alpha.4
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/README.md +1 -1
- package/lib/index.js +11 -11
- package/lib/logger.js +3 -3
- package/package.json +6 -2
package/README.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -28,10 +28,10 @@ function successMessage(folder) {
|
|
|
28
28
|
console.log(`
|
|
29
29
|
${(0, logger_1.success)('Success!')} Created a new Contentful app in ${(0, logger_1.highlight)((0, tildify_1.default)(folder))}.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Now kick it off by running
|
|
32
32
|
|
|
33
|
-
${(0, logger_1.
|
|
34
|
-
${(0, logger_1.
|
|
33
|
+
${(0, logger_1.code)(`cd ${folder}`)}
|
|
34
|
+
${(0, logger_1.code)(`npm start`)}
|
|
35
35
|
`);
|
|
36
36
|
}
|
|
37
37
|
function updatePackageName(appFolder) {
|
|
@@ -102,27 +102,27 @@ function initProject(appName, options) {
|
|
|
102
102
|
(function main() {
|
|
103
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
104
104
|
commander_1.program
|
|
105
|
-
.name(`npx ${(0, logger_1.
|
|
105
|
+
.name(`npx ${(0, logger_1.code)('create-contentful-app')}`)
|
|
106
106
|
.helpOption(true)
|
|
107
107
|
.description([
|
|
108
108
|
'Bootstrap your app inside a new folder `my-app`',
|
|
109
109
|
'',
|
|
110
|
-
(0, logger_1.code)(' create-contentful-app
|
|
110
|
+
(0, logger_1.code)(' create-contentful-app my-app'),
|
|
111
111
|
'',
|
|
112
|
-
'or
|
|
112
|
+
'or specify your own template',
|
|
113
113
|
'',
|
|
114
|
-
(0, logger_1.code)(' create-contentful-app
|
|
114
|
+
(0, logger_1.code)(' create-contentful-app my-app --source "github:user/repo"'),
|
|
115
115
|
'',
|
|
116
|
-
`Contentful
|
|
116
|
+
`Official Contentful templates are hosted at ${(0, logger_1.highlight)('https://github.com/contentful/apps/tree/master/examples')}.`,
|
|
117
117
|
].join('\n'))
|
|
118
118
|
.argument('[app-name]', 'app name')
|
|
119
|
-
.option('--npm', 'use
|
|
119
|
+
.option('--npm', 'use npm')
|
|
120
120
|
.option('--yarn', 'use Yarn')
|
|
121
121
|
.option('--javascript, -js', 'use default JavaScript template')
|
|
122
122
|
.option('--typescript, -ts', 'use default TypeScript template')
|
|
123
123
|
.option('-s, --source <url>', [
|
|
124
|
-
`
|
|
125
|
-
`
|
|
124
|
+
`provide a template by its source repository.`,
|
|
125
|
+
`format: URL (HTTPS or SSH) or ${(0, logger_1.code)('vendor:user/repo')} (e.g., ${(0, logger_1.code)('github:user/repo')})`,
|
|
126
126
|
].join('\n'))
|
|
127
127
|
.option('-e, --example <example-name>', 'bootstrap an example app from https://github.com/contentful/apps/tree/master/examples')
|
|
128
128
|
.action(initProject);
|
package/lib/logger.js
CHANGED
|
@@ -21,14 +21,14 @@ function highlight(str) {
|
|
|
21
21
|
}
|
|
22
22
|
exports.highlight = highlight;
|
|
23
23
|
function choice(str) {
|
|
24
|
-
return chalk_1.default.
|
|
24
|
+
return chalk_1.default.cyan(str);
|
|
25
25
|
}
|
|
26
26
|
exports.choice = choice;
|
|
27
27
|
function success(str) {
|
|
28
|
-
return chalk_1.default.
|
|
28
|
+
return chalk_1.default.greenBright(str);
|
|
29
29
|
}
|
|
30
30
|
exports.success = success;
|
|
31
31
|
function code(str) {
|
|
32
|
-
return chalk_1.default.
|
|
32
|
+
return chalk_1.default.bold(str);
|
|
33
33
|
}
|
|
34
34
|
exports.code = code;
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/create-contentful-app",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.4",
|
|
4
4
|
"description": "A template for building Contentful Apps",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"contentful",
|
|
7
|
+
"create-contentful-app"
|
|
8
|
+
],
|
|
5
9
|
"author": "Contentful GmbH",
|
|
6
10
|
"license": "MIT",
|
|
7
11
|
"repository": {
|
|
@@ -66,5 +70,5 @@
|
|
|
66
70
|
"@types/tildify": "^2.0.2",
|
|
67
71
|
"@types/validate-npm-package-name": "^3.0.3"
|
|
68
72
|
},
|
|
69
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "5b69e40f29b6bd14c04611109e88ecaf886c6176"
|
|
70
74
|
}
|