{"id":13559439,"url":"https://github.com/ionic-team/create-stencil","last_synced_at":"2025-02-23T05:07:19.381Z","repository":{"id":33812294,"uuid":"136752273","full_name":"ionic-team/create-stencil","owner":"ionic-team","description":"npm init stencil","archived":false,"fork":false,"pushed_at":"2025-01-01T20:58:03.000Z","size":1932,"stargazers_count":50,"open_issues_count":5,"forks_count":28,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-02-16T03:45:43.403Z","etag":null,"topics":["ionic","pwa","stencil","stenciljs","web-components"],"latest_commit_sha":null,"homepage":"https://stenciljs.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ionic-team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-09T19:36:11.000Z","updated_at":"2025-02-03T05:28:11.000Z","dependencies_parsed_at":"2023-12-18T17:01:15.821Z","dependency_job_id":"748582f6-4580-4498-b7c8-82e2ae5f8e8d","html_url":"https://github.com/ionic-team/create-stencil","commit_stats":null,"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionic-team%2Fcreate-stencil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionic-team%2Fcreate-stencil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionic-team%2Fcreate-stencil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionic-team%2Fcreate-stencil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ionic-team","download_url":"https://codeload.github.com/ionic-team/create-stencil/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240271527,"owners_count":19774859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ionic","pwa","stencil","stenciljs","web-components"],"created_at":"2024-08-01T13:00:21.827Z","updated_at":"2025-02-23T05:07:19.362Z","avatar_url":"https://github.com/ionic-team.png","language":"TypeScript","readme":"# The create-stencil CLI\n\ncreate-stencil is a CLI for creating new Stencil projects based on predefined templates, or \"starters\".\nIt is the official CLI maintained by the Stencil team, and is recommended for all new projects.\n\n## Prerequisites\n\nThe create-stencil CLI requires `npm` version 6 or higher to be installed.\nFor instructions for installing or upgrading npm, please see the [npm Documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). \n\n## Starters\n\nThe create-stencil CLI offers the following starters for bootstrapping your project:\n\n- `component` - allows one to spin up a component library containing one or more Stencil components. Best suited for\nteams/individuals looking to reuse components across one or more applications. ([Source Code](https://github.com/ionic-team/stencil-component-starter))\n- `app` - allows one to spin up an application, complete with routing. This is a **community-driven** project,\nand is not formally owned by the Stencil team. ([Source Code](https://github.com/stencil-community/stencil-app-starter))\n- `ionic-pwa` - allows one to spin up an Ionic PWA, complete with tabs layout and routing. This is a **community-driven** project,\nand is not formally owned by the Stencil team. ([Source Code](https://github.com/stencil-community/stencil-ionic-starter))\n\nThe CLI can also generate projects using starters that are not officially developed by Ionic or the Stencil Community.\nSee the documentation for [Command Mode](#command-mode) for additional information on using additional templates.\n\n## Usage\n\nThe create-stencil CLI can be run in one of two modes - Interactive Mode or Command Mode.\n\n### Interactive Mode\n\nInteractive Mode allows a user to interactively select options for creating a new Stencil project.\ncreate-stencil can be started in Interactive Mode by running:\n```console\n$ npm init stencil\n```\n\nRunning the CLI in Interactive Mode will prompt you to select one of the [available starters](#starters) to use:\n```console\n$ npm init stencil\n\n✔ Select a starter project.\n\nStarters marked as [community] are developed by the Stencil Community,\nrather than Ionic. For more information on the Stencil Community, please see\nhttps://github.com/stencil-community › - Use arrow-keys. Return to submit.\n❯   component                Collection of web components that can be used anywhere\n    app [community]          Minimal starter for building a Stencil app or website\n    ionic-pwa [community]    Ionic PWA starter with tabs layout and routes\n```\n\nFollowed by a name for your new project:\n```console\n✔ Project name \u003e my-stencil-library\n```\n\nAfter confirming your selections, your project will be created.\nIn this example, a new [component library starter](#starters) will have been copied into a newly created `my-stencil-library` directory:\n```console\n✔ Confirm? … yes\n✔ All setup  in 29 ms\n\n  We suggest that you begin by typing:\n\n  $ cd my-stencil-library\n  $ npm install\n  $ npm start\n\n  You may find the following commands will be helpful:\n\n  $ npm start\n    Starts the development server.\n\n  $ npm run build\n    Builds your project in production mode.\n\n  $ npm test\n    Starts the test runner.\n\n\n  Further reading:\n\n   - https://github.com/ionic-team/stencil-component-starter\n   - https://stenciljs.com/docs\n\n  Happy coding! 🎈\n```\n\n### Command Mode\n\nCommand Mode allows you to create a new Stencil project by specifying all project options upfront.\n\nTo run the CLI in Command Mode, a [starter](#starters) and project name must be specified:\n```\nnpm init stencil [starter] [project-name]\n```\n\nAn example of creating a component starter with the name \"my-stencil-library\" is shown below:\n```\nnpm init stencil component my-stencil-library\n```\nIn the example above, a new [component library starter](#starters) will have been created in a newly created `my-stencil-library` directory.\n\n#### Custom Templates\nIn addition to the provided template options, users may choose to use one of their own custom templates hosted on [GitHub.com](https://github.com).\n\nTo use a custom starter template, provide the GitHub repository owner and repository name as the starter name, using the format `REPO_OWNER/REPO_NAME`.\nFor example, to retrieve a template that is owned by 'my-organization' that has the name 'my-stencil-template':\n```\nnpm init stencil my-organization/my-stencil-template my-stencil-library\n```\nThe command above will create a copy of the `my-organization/my-stencil-template` repository, and place it under `my-stencil-library` on disk.\n\nThis can be used in conjunction with [Self Hosted GitHub Instances](#stencilselfhostedurl) to use custom starter templates that live on a self-hosted GitHub instance.\n\n### Additional Flags\n\n**Note:** When passing flags to the create-stencil CLI, a double dash ('--') must be placed between `npm init stencil`\nand the flag(s) passed to the CLI:\n```console\n$ npm init stencil -- --help\n```\n\n#### `--help`, `-h`\n\nThe `--help` flag shows usage examples for the CLI.\n\n#### `--info`\n\nThe `--info` will print the current version of the CLI.\n\n### Environment Variables\n\n#### `https_proxy`\n\nIf you are behind a proxy, the `https_proxy` environment variable can be set when running the CLI:\n```console\n$ https_proxy=https://[IP_ADDRESS] npm init stencil\n```\n\nStencil uses [https-proxy-agent](https://github.com/TooTallNate/proxy-agents/tree/main/packages/https-proxy-agent)\nunder the hood to connect to the specified proxy server.\nThe value provided for `https_proxy` will be passed directly to the constructor for a new\n[`HttpsProxyAgent` instance](https://github.com/TooTallNate/proxy-agents/tree/main/packages/https-proxy-agent#api).\n\n#### `stencil_self_hosted_url`\n\nIn some scenarios, teams may find themselves working solely out of a self-hosted GitHub instance.\n\nUsers wishing to point the create-stencil CLI at a GitHub instance other than [GitHub](https://github.com) have two options:\n\n1. Set `stencil_self_hosted_url` in your `.npmrc` file, like so:\n    ```\n    // .npmrc\n    stencil_self_hosted_url=https://your_self_hosted_github_repo.com/\n    ```\n\n    Using this option, the CLI can be called as such, automatically picking up the value in `stencil_self_hosted_url`:\n    ```\n    npm init stencil [starter] [project-name]\n    ```\n\n2. Set [`stencil_self_hosted_url`](#stencilselfhostedurl) at invocation time:\n    ```console\n    stencil_self_hosted_url=https://your_self_hosted_github_repo.com/ npm init stencil\n    ```\n   \n    When using this option, `stencil_self_hosted_url` must always be set every time the CLI is called.\n\nWhen both options are set, the value provided on the command line takes precedence over the value in your `.npmrc` file.\n\n## Citations\n\nOriginal project was created by William M. Riley:\n* [Twitter](https://twitter.com/splitinfinities)\n* [Github](https://github.com/splitinfinities)\n\n## Related Links\n\n* The [Stencil Documentation](https://stenciljs.com/) site has more information on using Stencil.\n* Check out the [Stencil Discord](https://chat.stenciljs.com/) for help and general Stencil discussion!\n","funding_links":[],"categories":["Tooling \u0026 Automation"],"sub_categories":["Community Maintained"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fionic-team%2Fcreate-stencil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fionic-team%2Fcreate-stencil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fionic-team%2Fcreate-stencil/lists"}