Skip to content

Commit

Permalink
Merge pull request #180 from ckeditor/new-option-global-name
Browse files Browse the repository at this point in the history
Fix (generator): New flag `--global-name` to define a global name of the package to be used in the UMD build. See ckeditor/ckeditor5#16798.

MINOR BREAKING CHANGE (generator): The global names for the `ckeditor5` and `ckeditor5-premium-features` packages in the UMD builds have been changed to `CKEDITOR` and `CKEDITOR_PREMIUM_FEATURES` respectively.
  • Loading branch information
pszczesniak authored Aug 2, 2024
2 parents e753850 + a9c1db6 commit 0bc5128
Show file tree
Hide file tree
Showing 19 changed files with 841 additions and 48 deletions.
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
- prepare_environment_command
- run:
name: Verify build (JavaScript, npm, current and legacy installation methods)
command: node scripts/ci/verify-build -l js -p npm -m current-and-legacy
command: node scripts/ci/verify-build -l js -p npm -m current-and-legacy -g GLOBAL_NAME

package_js_yarn_both_install_methods:
machine: true
Expand All @@ -160,7 +160,7 @@ jobs:
- prepare_environment_command
- run:
name: Verify build (JavaScript, yarn, current and legacy installation methods)
command: node scripts/ci/verify-build -l js -p yarn -m current-and-legacy
command: node scripts/ci/verify-build -l js -p yarn -m current-and-legacy -g GLOBAL_NAME

package_js_npm_current_install_methods:
machine: true
Expand All @@ -173,7 +173,7 @@ jobs:
- prepare_environment_command
- run:
name: Verify build (JavaScript, npm, current installation methods)
command: node scripts/ci/verify-build -l js -p npm -m current
command: node scripts/ci/verify-build -l js -p npm -m current -g GLOBAL_NAME

package_js_yarn_current_install_methods:
machine: true
Expand All @@ -186,7 +186,7 @@ jobs:
- prepare_environment_command
- run:
name: Verify build (JavaScript, yarn, current installation methods)
command: node scripts/ci/verify-build -l js -p yarn -m current
command: node scripts/ci/verify-build -l js -p yarn -m current -g GLOBAL_NAME

package_ts_npm_both_install_methods_custom_name:
machine: true
Expand All @@ -199,7 +199,7 @@ jobs:
- prepare_environment_command
- run:
name: Verify build (TypeScript, npm, current and legacy installation methods, custom plugin name)
command: node scripts/ci/verify-build -l ts -p npm -m current-and-legacy -n CustomPluginName
command: node scripts/ci/verify-build -l ts -p npm -m current-and-legacy -n CustomPluginName -g GLOBAL_NAME

package_ts_npm_current_install_methods_custom_name:
machine: true
Expand All @@ -212,7 +212,7 @@ jobs:
- prepare_environment_command
- run:
name: Verify build (TypeScript, npm, current installation methods, custom plugin name)
command: node scripts/ci/verify-build -l ts -p npm -m current -n CustomPluginName
command: node scripts/ci/verify-build -l ts -p npm -m current -n CustomPluginName -g GLOBAL_NAME


package_js_yarn_both_install_methods_custom_name:
Expand All @@ -226,7 +226,7 @@ jobs:
- prepare_environment_command
- run:
name: Verify build (JavaScript, yarn, current and legacy installation methods, custom plugin name)
command: node scripts/ci/verify-build -l js -p yarn -m current-and-legacy -n customPluginName400
command: node scripts/ci/verify-build -l js -p yarn -m current-and-legacy -n customPluginName400 -g GLOBAL_NAME

package_js_yarn_current_install_methods_custom_name:
machine: true
Expand All @@ -239,7 +239,7 @@ jobs:
- prepare_environment_command
- run:
name: Verify build (JavaScript, yarn, current installation methods, custom plugin name)
command: node scripts/ci/verify-build -l js -p yarn -m current -n customPluginName400
command: node scripts/ci/verify-build -l js -p yarn -m current -n customPluginName400 -g GLOBAL_NAME

package_ts_yarn_both_install_methods:
machine: true
Expand All @@ -252,7 +252,7 @@ jobs:
- prepare_environment_command
- run:
name: Verify build (TypeScript, yarn, current and legacy installation methods)
command: node scripts/ci/verify-build -l ts -p yarn -m current-and-legacy
command: node scripts/ci/verify-build -l ts -p yarn -m current-and-legacy -g GLOBAL_NAME

package_ts_yarn_current_install_methods:
machine: true
Expand All @@ -265,7 +265,7 @@ jobs:
- prepare_environment_command
- run:
name: Verify build (TypeScript, yarn, current installation methods)
command: node scripts/ci/verify-build -l ts -p yarn -m current
command: node scripts/ci/verify-build -l ts -p yarn -m current -g GLOBAL_NAME

release_prepare:
machine: true
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The tool will create a new directory called `ckeditor5-package` with an example
To use a local version of the `@ckeditor/ckeditor5-package-tools` package, use the `--dev` option when executing the command.

```bash
node /path/to/repository/packages/ckeditor5-package-generator <packageName> [--dev] [--use-npm] [--use-yarn] [--installation-methods <current|current-and-legacy>] [--name <...>] [--lang <js|ts>] [--verbose]
node /path/to/repository/packages/ckeditor5-package-generator <packageName> [--dev] [--use-npm] [--use-yarn] [--installation-methods <current|current-and-legacy>] [--global-name <...>] [--plugin-name <...>] [--lang <js|ts>] [--verbose]
```

#### Options
Expand All @@ -79,7 +79,8 @@ node /path/to/repository/packages/ckeditor5-package-generator <packageName> [--d
* `--use-npm` &ndash; use `npm` to install dependencies in a newly created package.
* `--use-yarn` &ndash; use `yarn` to install dependencies in a newly created package.
* `--installation-methods` &ndash; (values: `current` | `current-and-legacy`) choose which installation methods of CKEditor 5 do you want to support? If omitted, the script will ask the user to choose manually.
* `--name` &ndash; define a class name to be different from the package name.
* `--global-name` &ndash; define a global name of the package to be used in UMD build.
* `--plugin-name` &ndash; define a class name to be different from the package name.
* `--lang` &ndash; (values: `js` | `ts`) choose whether the created package should use JavaScript or TypeScript. If omitted, the script will ask the user to choose manually.
* `--verbose` &ndash; (alias: `-v`) print additional logs about the current executed task.

Expand Down
Loading

0 comments on commit 0bc5128

Please sign in to comment.