Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

++ bootstrap for reactjs, nuxtjs, nextjs, angular and gatsby #43

Merged
merged 12 commits into from
May 24, 2021
11 changes: 11 additions & 0 deletions packages/contentstack-bootstrap/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
Empty file.
13 changes: 13 additions & 0 deletions packages/contentstack-bootstrap/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": [
"oclif",
"oclif-typescript"
],
"rules": {
"unicorn/no-abusive-eslint-disable": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"indent": "off",
"object-curly-spacing": "off"
}
}
10 changes: 10 additions & 0 deletions packages/contentstack-bootstrap/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*-debug.log
*-error.log
/.nyc_output
/dist
/lib
/tmp
/yarn.lock
node_modules
.DS_Store
coverage
5 changes: 5 additions & 0 deletions packages/contentstack-bootstrap/.nycrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"inlcude": [
"lib/**/*.js"
]
}
31 changes: 31 additions & 0 deletions packages/contentstack-bootstrap/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Description

It is Contentstack’s CLI plugin bootstrap contentstack apps with a single command.

[![License](https://img.shields.io/npm/l/@contentstack/cli)](https://github.com/contentstack/cli/blob/main/LICENSE)


<!-- usagestop -->
## Commands
<!-- commands -->
* [`csdx cm:bootstrap`](#csdx-bootstrap)

## `csdx cm:bootstrap`


```
USAGE
$ csdx cm:bootstrap

OPTIONS
none

```

### Steps
* Bootstrap command would list the sample apps available
* Clone the selected sample app to the given location (folder path)
* Asks the user create/select an existing stack.
* Import the sample app contents to the stack.
* App is ready to use!

4 changes: 4 additions & 0 deletions packages/contentstack-bootstrap/bin/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env node

require('@oclif/command').run()
.catch(require('@oclif/errors/handle'))
3 changes: 3 additions & 0 deletions packages/contentstack-bootstrap/bin/run.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node "%~dp0\run" %*
18 changes: 18 additions & 0 deletions packages/contentstack-bootstrap/messages/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"CLI_BOOTSTRAP_INVALID_APP_NAME": "Invalid app name received, use cm:bootstrap see the list of apps supported",
"CLI_BOOTSTRAP_LOGIN_FAILED": "You need to login, first. See: auth:login --help",
"CLI_BOOTSTRAP_GITHUB_ACCESS_NOT_FOUND": "No Github access token found",
"CLI_BOOTSTRAP_START_CLONE_APP": "Cloning the selected app",
"CLI_BOOTSTRAP_REPO_NOT_FOUND": "Unable to find a repo for \"%s\"",
"CLI_BOOTSTRAP_NO_API_KEY_FOUND": "No API key generated for the stack",
"CLI_BOOTSTRAP_STACK_CREATION_FAILED": "Unable to create stack for content \"%s\"",
"CLI_BOOTSTRAP_APP_SELECTION_ENQUIRY": "Select an App",
"CLI_BOOTSTRAP_APP_COPY_SOURCE_CODE_DESTINATION_TYPE_ENQUIRY": "Where do you want to copy the source code?",
"CLI_BOOTSTRAP_APP_COPY_SOURCE_CODE_DESTINATION_ENQUIRY": "Provide the destionation path",
"CLI_BOOTSTRAP_NO_ACCESS_TOKEN_CREATED": "Note: Access token not created already, check out this link https://github.com/settings/tokens \n Provide github access token",
"CLI_BOOTSTRAP_TYPE_OF_APP_ENQUIRY": "Which type of app you want to clone?",
"CLI_BOOTSTRAP_APP_FAILED_TO_CREATE_TOKEN_FOR_ENV": "Failed to create delivery token for env \"%s\"",
"CLI_BOOTSTRAP_APP_FAILED_TO_CREATE_ENV_FILE_FOR_ENV": "Failed to setup env file for \"%s\"",
"CLI_BOOTSTRAP_APP_ENV_NOT_FOUND_FOR_THE_STACK": "No environments found for the stack",
"CLI_BOOTSTRAP_SUCCESS": "Successfully setup the project"
}
Loading