@curtissimo/create-elm-package-gitlab
v0.2.5
Published
Create an Elm package starter repo for GitLab.
Readme
create-elm-package-gitlab
This package lets you scaffold an Elm package for hosting on GitLab.
npm init @curtissimo/elm-package-gitlabFeatures
- Prompts you for information
- Publishes to package.elm-lang.org
- Publishes JS/TS and CSS/SCSS assets to NPM
- Includes linting checks
- Verifies code examples
Why? WHY!?
Well, you see, I prefer GitLab over GitHub. But, as you likely know, Elm forces us to use GitHub. So, I made this so I can create Elm packages that lives on GitLab, is mirrored on GitHub, and publishes like a champ.
What am I getting into with this?
Hopefully, a happy and easy-to-use GitLab project that handles all the CI/CD stuff for you!
There's definitely some manual initial setup with this. You could script it with the GitLab CLI and GitHub CLI. That's likely a feature I'll add in the future.
Here's what you'll have to do when you set up a new package.
- Create an empty GitLab
- Set up the GitHub mirror
- Initialize the local Git repository and set the origin
If you're going to publish to NPM, too, you'll want to:
- Publish an alpha version of the package to NPM
- Create a "Trusted Publisher" connection from NPM to GitLab
CLI Options
If you specify a value for one of the CLI options, then the generator will not prompt you for it interactively.
usage: npm init @curtissimo/elm-package-gitlab [option, ...] [destination]
Create an Elm package starter repo for GitLab.
positional arguments:
destination The sword-case name of the directory to create to hold
your package.
optional arguments:
-h, --help show this help message and exit
--author-email AUTHOR_EMAIL
The email of the package's author. (default:
[email protected])
--author-name AUTHOR_NAME
The name of the package's author. (default: "Curtis
Schlak")
--description DESCRIPTION
The SHORT description of this package.
--github-org GITHUB_ORG
The name of the GitHub user or org where the code is
MIRRORED.
--gitlab-org GITLAB_ORG
The name of the GitLab user or org where the code is
HOSTED.
--has-css, --no-has-css
Use if this package needs to publish CSS to NPM for
proper use.
--has-javascript, --no-has-javascript
Use if this package needs to publish JavaScript to NPM
for proper use.
--has-sass, --no-has-sass
Use if you want to compile SASS to CSS and publish
that to NPM.
--has-typescript, --no-has-typescript
Use if you want to compile TypeScript to JavaScript
and publish that to NPM.
--is-stateful, --no-is-stateful
Will stub out init, subscriptions, update, and view
functions in the main module.
--license {BSD-3-Clause,OTHER,GPL,LGPL,MIT,MOZILLA}
The license to publish the package under.
--npm-scope NPM_SCOPE
The NPM scope for the CSS and JavaScript package
published. (Only valid if compiling assets.)
--package-name PACKAGE_NAME
The sword case name to publish the package on
package.elm-lang.org, for example,
elm-my-cool-package.
--version show program's version number and exit
NAMING
The package will be converted from sword case to Pascal case for the module
name.
The GitLab organization name will be converted from sword/snake case to Pascal
case and used as the top-level module.
NOTES
This project uses Parcel as its build tool for Sass, TypeScript, and the
example. If you want to use something else, just rip out what's generated
and install your own thing.