Run dev server. Target directory is
src/demo.
$ npm run start
or
$ yarn start
Target directory is
src/lib. Output directory isbuild.
$ npm run build
or
$ yarn build
Edit initialize.json to set the information needed to initialize the repository.
{
"repo": "user-id/library-name", // path of repository
"namespace": "user-ns", // libraries namespace(for umd)
"name": "User Name <user0@email>" // your name
}
Values set in initialize.json affect the following files:
- README.md
- LICENSE
- package.json
- rollup.config.js
After modifying initialize.json, install the package.
$ npm install
or
$ yarn
If the package is already installed, run the initialization script directly.
$ node ./scripts/initialization
When initialization is complete, the
scripts/initialize.jsfile is deleted, and thescripts.installvalue inpackage.jsonis also removed.
{
"repo": "user-id/library-name",
"namespace": "user-ns",
"name": "User Name <user0@email>"
}library name: user-ns-library-namenamespace: userNsLICENSE: (c) USER ID / User Name
The case where @ is used in the namespace is as follows:
{
"repo": "user-id/library-name",
"namespace": "@user-ns",
"name": "User Name <user0@email>"
}library name: @user-ns/library-namenamespace: userNsLICENSE: (c) USER ID / User Name
If no namespace is set:
{
"repo": "user-id/library-name",
"namespace": "",
"name": "User Name <user0@email>"
}library name: library-namenamespace: userIdLICENSE: (c) USER ID / User Name
MIT License