yarn init -y && yarn add katai5plate/mykit-core
- Add ./index.js
const resources = require(`${__dirname}/resources.json`);
const modify = require(`${__dirname}/modify.json`);
module.exports = () => require("mykit-core")(__dirname, resources, modify);
- Add resources to ./resources
- Add ./resources.json
- src: The name of the target file in the resources directory
- require.
- dir: Output destination directory name
- optional. default: "" (Root)
- dist: Output file name
- optional. default: src
[
{ src: "vscode.setting.json", dir: "vscode", dist: "setting.json" },
{ src: "index.html" }
];
- Add ./modify.json
- The contents are merged into the package.json.
scripts.mykit-install
is require. The packages necessary for environment construction.
{
"scripts": {
"mykit-install": "yarn add -D lodash",
"hello": "node -e \"console.log('Hello, World!')\""
},
"main": "action.js"
}
- Write README.md and upload to GitHub or npm.
try {
require("mykit-ts")();
} catch {
require("./index")();
}