React x Kintone Customization Builder & Uploader
-
Create a Kintone App
- YouTube: How to Create a Kintone Database App
-
Initialize with
mkdir new-project cd new-project npm init -y
-
Install the dependencies
npm install --save-dev webpack webpack-cli html-webpack-plugin style-loader css-loader npm install --save-dev babel-loader @babel/core @babel/preset-env @babel/preset-react npm install --save-dev react react-dom npm install --save-dev npm-run-all npm install -g @kintone/customize-uploader
-
Create
webpack.config.js
-
Modify
package.json
by adding the following scripts"scripts": { "start": "node scripts/npm-start.js", "upload": "env-cmd --verbose kintone-customize-uploader --watch dest/customize-manifest.json", "dev": "npm run build -- --watch", "build": "webpack", "production": "webpack --mode production" },
-
Build the customization in the following files inside
./src/
index.css
index.html
index.js
-
Run
npm run dev
to continuously generate testing build -
Run
npm run production
to create a production version- To directly implement the Kintone customization, upload
./dist/KintoneCustomization.js
to Kintone App directly. - For more details, refer to Customizing an App with JavaScript and CSS
- To directly implement the Kintone customization, upload
-
Create the
dest/customize-manifest.json
{ "app": "180", "scope": "ALL", "desktop": { "js": ["dist/KintoneCustomization.js"], "css": [] }, "mobile": { "js": [], "css": [] } }
-
Replace
180
with your App ID indest/customize-manifest.json
- To determine your Kintone App ID: Go inside the App, copy the URL, and extract the digits after
https://YOUR_SUBDOMAIN.kintone.com/k/
- Example:
https://YOUR_SUBDOMAIN.kintone.com/k/1/
-> App ID is1
- To determine your Kintone App ID: Go inside the App, copy the URL, and extract the digits after
-
Create a
.env
file based on the.env.example
file-
Template
KINTONE_BASE_URL=https://example.kintone.com KINTONE_USERNAME=your_username KINTONE_PASSWORD=your_password
-
Example
KINTONE_BASE_URL=https://cafe.kintone.com KINTONE_USERNAME=Administrator KINTONE_PASSWORD=Kintone!Is!Amazing;
-
-
Run
npm run start
- This will trigger webpack & kintone-customize-uploader to run while watching
./src/index.js
for changes - Input Kintone credentials when asked
- This will trigger webpack & kintone-customize-uploader to run while watching
-
Refresh the Kintone App to see the changes!
Good luck coding!
- Verify that you are inputting the exact base URL for Kintone credentials questions
- Correct:
https://example.cybozu.com
✅ - Incorrect:
https://example.cybozu.com/
orexample.cybozu.com
❌