{"id":21016464,"url":"https://github.com/gsa/sam-design-system","last_synced_at":"2025-04-07T06:04:38.101Z","repository":{"id":37549301,"uuid":"167563442","full_name":"GSA/sam-design-system","owner":"GSA","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-31T14:50:29.000Z","size":693386,"stargazers_count":24,"open_issues_count":42,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T05:02:55.173Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gsa.github.io/sam-design-system/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GSA.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-25T14:51:58.000Z","updated_at":"2025-03-16T21:33:24.000Z","dependencies_parsed_at":"2023-12-18T17:31:37.157Z","dependency_job_id":"eef034cf-0231-4a99-bece-ae9eea0f0df7","html_url":"https://github.com/GSA/sam-design-system","commit_stats":{"total_commits":3464,"total_committers":35,"mean_commits":98.97142857142858,"dds":0.7537528868360277,"last_synced_commit":"fca97aa9318201597693beeb4a242162ec04cfc0"},"previous_names":[],"tags_count":211,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GSA%2Fsam-design-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GSA%2Fsam-design-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GSA%2Fsam-design-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GSA%2Fsam-design-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GSA","download_url":"https://codeload.github.com/GSA/sam-design-system/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601447,"owners_count":20964864,"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":[],"created_at":"2024-11-19T10:13:24.335Z","updated_at":"2025-04-07T06:04:38.080Z","avatar_url":"https://github.com/GSA.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SamDesignSystem\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli).\n\n## How To Work In This Structure\nTo ensure your work follows the expected structure, ensure you are using the correct Angular CLI commands as you create new libraries, modules, and components.\n\nMost of the modules in this library are intended to be published and consumed by third parties, specifically in support of the GSA IAE Modernization project.\n\nThe grouping folders under the libs folder divide libraries by scope. Packages that are intended to be published live under the packages folder. As other scopes are needed for internal development to house feature, utilities, or data-access modules for documentation or other purposes, new scope directories may be added.\n\n## Creating New Publishable Libraries\nNew publishable libraries should only be created with consent from the team. These libraries should be created within the `libs/packages` directory. Each publishable package should provide the following tags:\n\n- scope:shared\n- platform:web\n- type:ui\n\n## Documentation Site Feature Modules\nAny updates to the documentation site should first be created as a library in the `libs/sam-design-system-site` directory. Depending on the type of library, create it in the appropriate subdirectory using the Angular CLI schematics to ensure consistency with the project's structure.\n\nAll libraries should share the `scope:sam-design-system-site` and `platform:web` tags. Add whichever `type` tag of `ui, data-access, utility, or feature` that is appropriate.\n\nFinally, import the module into the `sam-design-system-site` and configure the application appropriately.\n\n\n## Releasing \u0026 Publishing\nPublishing happens in a few steps. From a high level, \n\n1. Update each project package.json with latest version number\n2. Run npm version to update parent package.json, commit changes, and tag\n3. Push changes to github.com and create a release\n4. Run github-release-notes to generate release notes\n5. For every publishable lib,\n     1. Build each library\n     2. Create a tarball of each built lib\n     3. Publish to github\n\n\n### Run `npm version \u003cmajor | minor | patch\u003e`\nThis step updates the main package.json version in the root directory. It also runs through each library in the angular.json `projects` property and updates their package.json with the \nversion from the root package.json.\n\nFinally, this script git commits the changes and creates a tag with the version number.\n\n### Commit changes to github `git push origin master` \u0026\u0026 `git push --tags` \nFor now, this step must be run manually after the versions have been updated locally. This syncs the local changes with the remote repository.\n\n### Create release and release notes\nOn Github, draft a new release and write release notes. Github-release-notes (gren) can be used to assist in this.\n\n### Ensure local is sync'd with remote release branch \u0026\u0026 `npm run publish:libs`\nNote: Run `npm run publish:libs -- --dry-run` to get a dry-run and not publish\n\nSince the tarballs for the published libraries will be generated from the source code on the local machine, it is imperative that the branch on your local machine is in sync with the approved release code before publishing the library.\n\nOnce the local branch is in sync with the release branch, run the publish script. This finds each publishable library in the angular.json and publishes its code.\n\n## Helper Scripts\nYou can now run `npm run release:patch`, `npm run release:minor`, or `npm run release:major`, but be careful. It will run the versioning script, add a commit and tag, push to github, run `gren` to generate a release on github with notes based on PRs, then run `gren` again to generate a changelog, commit it, and push it up to github.\n\nAll that executes on whatever branch you are on, and when you run it, you want to be on master. If something happens, you'll have to manually rollback 3 commits, delete the git tag, and delete the release.\n\nOnce all that is done, you still have to manually run the `npm run publish:libs` script to build, pack, and publish them to npmjs. If y'all are confident, you can also add `\u0026\u0026 npm run publish:libs` onto the end of the `npm run release` script (for each type), and that will do everything in one step.\n\n`Note:` I'd recommend keeping them separate for awhile and getting the team comfortable with what's happening before you try that though.\n\n## gren (Github-release-notes)\nIn order to run the above, you need to have `gren` installed and configured globally on your local machine. This requires add the npm package and also updating your path with an environment variable for gren to use. \n\nThe link to gren is [here](https://github.com/github-tools/github-release-notes). \n\nThere is some additional configuration required to make it work smoothly. \n\nFirst, you will also need to create a personal access token with `repo` scope for your github account.\n\nUnder the Github profile, go to Settings -\u003e Developer Settings -\u003e Personal Access Tokens -\u003e Generate New Token and then provide that to the environment variable to use gren.\n\nSecond, you need to add the repo information to package.json. This is already done on this project, but that keeps you from having to update `gren` with the repo info on each push.\n\n## Development server\n\nRun `ng serve --project=myapp` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng generate component component-name --project=myapp` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\n\n## Build\n\nRun `ng build --project=myapp` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.\n\n## Running unit tests\n\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## Running end-to-end tests\n\nRun `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).\nBefore running the tests make sure you are serving the app via `ng serve`.\n\n## Linking Projects to Separate Applications\nRun `ng build project-name` to initially output a build of the project. This will be stored in `dist/` directory.\nNavigate to the built project - `cd dist/libs/project-name`\nRun `npm link` (Mac users might need to run with sudo command)\nNavigate back to root directory - cd `../../../`\nRun `ng build --watch` - This will watch for any changes to the project and update the build in dist directory\nOn application side, from the same directory where the application's package.json is placed, run `npm link @gsa-sam/project-name`.\nStart up your application - Now any changes made to the project should initiate a reload and be reflected on the application.\n\n## Further help\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsa%2Fsam-design-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgsa%2Fsam-design-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsa%2Fsam-design-system/lists"}