Skip to content

Commit

Permalink
Merge pull request #162 from kintone-labs/v0.5.0_new
Browse files Browse the repository at this point in the history
v0.5.0
  • Loading branch information
nmanhit authored Sep 12, 2023
2 parents e01850f + 6cf485e commit d69052d
Show file tree
Hide file tree
Showing 94 changed files with 15,999 additions and 4,848 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
extends: ['@cybozu/eslint-config/presets/typescript-prettier']
extends: ['@cybozu/eslint-config/presets/typescript-prettier'],
ignorePatterns: ['unit_test/build/*', 'dist/*']
};
31 changes: 31 additions & 0 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Run Unit Test and Linter On Commit

on:
push:
jobs:
run-unit-test:
name: Run unit test and linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install node
uses: actions/setup-node@v3
with:
node-version: 16

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

- name: Run unit test
run: npm test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ typings/

# next.js build output
.next

unit_test/build/
4 changes: 2 additions & 2 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
singleQuote: true,
trailingComma: "none"
singleQuote: true,
trailingComma: "none"
};
45 changes: 39 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,16 @@ After all the above info is inputted, cli will initialize the following folder s
└── .gitignore
```

If --install flag is specified, Kintone CLI will run npm install after initializing folder structure
If --install flag is specified, Kintone CLI will run npm install after initializing folder structure.

If --quick flag is specified, Kintone CLI will init a project with default parameters.
If --quick flag is specified, Kintone CLI will init a project with the following default parameter:
```
--project-name: 'kintone-customization-project'
```
In addition, this boolean option will be set to ``true``:
```
--install
```

Ask if user wants to create-template after finishing init project.
### 2. Create customization / plugin template
Expand All @@ -61,17 +68,43 @@ kintone-cli create-template
[--username <username>]
[--password <password>]
[--type Customization|Plugin]
[--scope ALL|ADMIN|NONE]
[--use-typescript]
[--use-webpack]
[--use-react]
[--use-cybozu-lint]
[--app-name <appName>]
[--app-id <App ID (for Customization) >]
```
If the flag --quick existed, CLI will use all default variable for other flags. You can override some by setting its flag like:
``
kintone-cli create-template --quick --type Plugin
``

The --scope flag is for setting the scope of customization; therefore, setting the value of --scope when creating a plugin template will have no effect on the app.

If the flag --quick is present, CLI will set default values for the following options:
```
--type: 'Customization'
--app-name: `kintone-${Date.now()}`
--scope: 'ALL'
```

In addition, the below boolean options will be set to ``false``:
```
--set-auth
--use-typescript
--use-webpack
--use-cybozu-lint
--use-react
```

You can override some options even when the --quick flag is present:
```
--type
--app-name
--scope
```
Below is an example of overriding some of the --quick default values:
```
kintone-cli create-template --quick --app-name Sample-App --scope ADMIN
```

If value is set for flag --preset, CLI will use preset variable to create folder. If both flag --preset and --quick is set, the config will be merge from both --quick config and --preset config.

Expand Down
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript'
]
};
90 changes: 28 additions & 62 deletions dist/commands/Auth/authCommand.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/commands/Auth/authCommand.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions dist/commands/Auth/helper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/commands/Auth/helper.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d69052d

Please sign in to comment.