{"id":16442808,"url":"https://github.com/mdedetrich/sbt-angular-seed","last_synced_at":"2026-05-16T19:11:17.148Z","repository":{"id":16008571,"uuid":"18751983","full_name":"mdedetrich/sbt-angular-seed","owner":"mdedetrich","description":"SBT plugin to create seed data for AngularJS","archived":false,"fork":false,"pushed_at":"2014-04-15T07:19:37.000Z","size":156,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-08T18:29:33.417Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/mdedetrich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-14T07:27:29.000Z","updated_at":"2014-04-15T07:19:37.000Z","dependencies_parsed_at":"2022-09-01T12:41:52.367Z","dependency_job_id":null,"html_url":"https://github.com/mdedetrich/sbt-angular-seed","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdedetrich%2Fsbt-angular-seed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdedetrich%2Fsbt-angular-seed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdedetrich%2Fsbt-angular-seed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdedetrich%2Fsbt-angular-seed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdedetrich","download_url":"https://codeload.github.com/mdedetrich/sbt-angular-seed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240794917,"owners_count":19858719,"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-10-11T09:18:44.918Z","updated_at":"2026-05-16T19:11:12.088Z","avatar_url":"https://github.com/mdedetrich.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sbt-angular-seed: SBT Plugin for creating seeds for AngularJS\n\n[sbt-angular-seed] is a SBT plugin designed to create seed data in the form of an [AngularJS] value contained inside a [AngularJS]\nmodule. Note that this plugin has one job, create an [AngularJS] module (in the form of a file) out of an [SBT] task expression\nthat returns a [JSON4S] `JValue`, nothing more. It is up to the user to integrate this task as part of their build system\n\n# Configuration\n\nAdd the following to your `project/build.sbt` file\n\nFirst the repository\n\n```scala\nresolvers ++= Seq(\"mdedetrich-releases\" at \"http://artifactory.mdedetrich.com/plugins-release\")\n```\n\nThen the plugin\n\n```scala\naddSbtPlugin(\"com.mdedetrich\" % \"sbt-angular-seed\" % \"1.0.0\")\n```\n\n# Usage\n\nThere are 2 SBT keys which need to be changed for typical apps\n\n* targetFile: This is the target destination for the compiled file. Must return a `File`\n* jsonExpression: This is the task that generates the JSON which is placed in the seed file. Must return a `JValue`\n\nThere is also the task `angularSeed`, which creates the seed file\n\nAll of the tasks and keys are located in the `AngularSeed` config\n\nAs an example, this is what a trivial config may look like (`JsonDSL` is used to product the JSON, check [JSON4S] for more info)\n\n```scala\nval sbtAngularSeedSettings = SbtAngularSeedPlugin.defaultSettings ++ Seq(\n    targetFile in AngularSeed \u003c\u003c= sourceDirectory (_ / \"js\" / \"seed.js\" ),\n    jsonExpression in AngularSeed := {\n        (\"json\" -\u003e \"is\") ~ (\"damn\" -\u003e \"cool\")\n    }\n)\n```\n\nWhich would produce the following `seed.js` file\n\n```javascript\nangular.module('angularSeed',[])\n.value('AngularSeed',\n{\n  \"json\" : \"is\",\n  \"damn\" : \"cool\"\n}\n);\n```\n\nYou would also probably want to make the `angularSeed` task to run when you do compile, which\ncan be done as follows\n\n```scala\n(compile in Compile) \u003c\u003c= (compile in Compile) dependsOn (compileSeed in AngularSeed)\n```\n\nOf course, this example is trivial. The main use of this plugin is to create client\nside initial seed data, how the JValue from the `jsonExpression` task is created is up to the\nuser. You can do a database lookup to grab some seed data and output it as JSON, or you can\nsimply traverse static data structures in your code.\n\nIt is recommended to extend this [SBT] plugin with your own [SBT] plugin (which sets up how to\ncreate the JSON seed), and then require that plugin in your actual project (mainly to deal\nwith possible dependency issues). Please consult the [SBT] docs on more info on how to\ncreate plugins\n\n# All Settings/Tasks/Configs\n\n## Config\n\n* AngularSeed: The config where all of the keys/settings are located\n\n## Settings\n\n* targetFile: Where the seed file gets created\n* jsonExpression: The expression which produces the JSON containing the seed data\n* angularModuleName: The name of the [AngularJS] module which gets created\n* angularValueName: The name of the [AngularJS] value which gets created\n\n## Tasks\n\n* compileSeed: Compiles the [AngularJS] seed file\n* clean: Deletes the [AngularJS] seed file\n\n\n[sbt-angular-seed]:https://github.com/mdedetrich/sbt-angular-seed\n[SBT]:http://www.scala-sbt.org/\n[AngularJS]:http://angularjs.org/\n[JSON4S]:https://github.com/json4s/json4s\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdedetrich%2Fsbt-angular-seed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdedetrich%2Fsbt-angular-seed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdedetrich%2Fsbt-angular-seed/lists"}