@contentful/create-contentful-app 1.4.4 → 1.5.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/lib/constants.js +5 -0
- package/lib/index.js +12 -3
- package/package.json +3 -3
package/lib/constants.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXAMPLES_REPO_URL = exports.CREATE_APP_DEFINITION_GUIDE_URL = void 0;
|
|
4
|
+
exports.CREATE_APP_DEFINITION_GUIDE_URL = 'https://ctfl.io/app-tutorial#embed-your-app-in-the-contentful-web-app';
|
|
5
|
+
exports.EXAMPLES_REPO_URL = 'https://github.com/contentful/apps/tree/master/examples';
|
package/lib/index.js
CHANGED
|
@@ -24,12 +24,21 @@ const template_1 = require("./template");
|
|
|
24
24
|
const utils_1 = require("./utils");
|
|
25
25
|
const logger_1 = require("./logger");
|
|
26
26
|
const chalk_1 = __importDefault(require("chalk"));
|
|
27
|
+
const constants_1 = require("./constants");
|
|
27
28
|
const DEFAULT_APP_NAME = 'contentful-app';
|
|
28
29
|
function successMessage(folder, useYarn) {
|
|
29
30
|
console.log(`
|
|
30
31
|
${(0, logger_1.success)('Success!')} Created a new Contentful app in ${(0, logger_1.highlight)((0, tildify_1.default)(folder))}.`);
|
|
31
32
|
(0, logger_1.wrapInBlanks)((0, logger_1.highlight)('---- Next Steps'));
|
|
32
|
-
console.log(`Now
|
|
33
|
+
console.log(`Now create an app definition for your app by running
|
|
34
|
+
|
|
35
|
+
${(0, logger_1.code)(`cd ${(0, tildify_1.default)(folder)}`)}
|
|
36
|
+
${(0, logger_1.code)(useYarn ? 'yarn create-app-definition' : 'npm run create-app-definition')}
|
|
37
|
+
|
|
38
|
+
or you can create it manually in web app:
|
|
39
|
+
${(0, logger_1.highlight)(constants_1.CREATE_APP_DEFINITION_GUIDE_URL)}
|
|
40
|
+
`);
|
|
41
|
+
console.log(`Then kick it off by running
|
|
33
42
|
|
|
34
43
|
${(0, logger_1.code)(`cd ${(0, tildify_1.default)(folder)}`)}
|
|
35
44
|
${(0, logger_1.code)(`${useYarn ? 'yarn' : 'npm'} start`)}
|
|
@@ -116,14 +125,14 @@ function initProject(appName, options) {
|
|
|
116
125
|
'',
|
|
117
126
|
(0, logger_1.code)(' create-contentful-app my-app --source "github:user/repo"'),
|
|
118
127
|
'',
|
|
119
|
-
`Official Contentful templates are hosted at ${(0, logger_1.highlight)(
|
|
128
|
+
`Official Contentful templates are hosted at ${(0, logger_1.highlight)(constants_1.EXAMPLES_REPO_URL)}.`,
|
|
120
129
|
].join('\n'))
|
|
121
130
|
.argument('[app-name]', 'app name')
|
|
122
131
|
.option('--npm', 'use npm')
|
|
123
132
|
.option('--yarn', 'use Yarn')
|
|
124
133
|
.option('-ts, --typescript', 'use TypeScript template (default)')
|
|
125
134
|
.option('-js, --javascript', 'use JavaScript template')
|
|
126
|
-
.option('-e, --example <example-name>',
|
|
135
|
+
.option('-e, --example <example-name>', `bootstrap an example app from ${constants_1.EXAMPLES_REPO_URL}`)
|
|
127
136
|
.option('-s, --source <url>', [
|
|
128
137
|
`provide a template by its source repository.`,
|
|
129
138
|
`format: URL (HTTPS or SSH) or ${(0, logger_1.code)('vendor:user/repo')} (e.g., ${(0, logger_1.code)('github:user/repo')})`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/create-contentful-app",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "A template for building Contentful Apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contentful",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"build": "tsc"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@contentful/app-scripts": "1.
|
|
38
|
+
"@contentful/app-scripts": "1.6.0",
|
|
39
39
|
"chalk": "4.1.2",
|
|
40
40
|
"commander": "9.4.1",
|
|
41
41
|
"degit": "2.8.4",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"@types/tildify": "2.0.2",
|
|
67
67
|
"@types/validate-npm-package-name": "4.0.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "9db3c2b2fb5289ea3c17f6d9ad85cf0c184ed531"
|
|
70
70
|
}
|