{"id":15345439,"url":"https://github.com/jthomas/server_side_dijit","last_synced_at":"2025-04-15T02:37:17.723Z","repository":{"id":3714775,"uuid":"4786796","full_name":"jthomas/server_side_dijit","owner":"jthomas","description":"Rendering Dojo UI widgets on the server-side","archived":false,"fork":false,"pushed_at":"2013-01-08T11:32:44.000Z","size":831,"stargazers_count":30,"open_issues_count":1,"forks_count":7,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-11T18:45:56.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jthomas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-25T20:11:36.000Z","updated_at":"2022-12-15T00:58:13.000Z","dependencies_parsed_at":"2022-09-16T02:24:31.344Z","dependency_job_id":null,"html_url":"https://github.com/jthomas/server_side_dijit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fserver_side_dijit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fserver_side_dijit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fserver_side_dijit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fserver_side_dijit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jthomas","download_url":"https://codeload.github.com/jthomas/server_side_dijit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248995106,"owners_count":21195497,"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-01T11:13:24.731Z","updated_at":"2025-04-15T02:37:15.562Z","avatar_url":"https://github.com/jthomas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Server Side Dijit\n\nMiddleware plugin for Connect that renders dijit widget templates, which are normally rendered client-side, on the server. \nReturned pages are modified to include the generated server-side templates inline, with a client-side JavaScript plugin \nto hook up the templates to the widget.\n\n## Running the demo\n\nRun the following command line to start a test application, demonstrating a variety of widgets rendered\non the server side. \n\n    $ export DOJO_SOURCE=/path/to/dojo-release-1.8.0-src\n    $ npm start \n\nOnce the server has started, visit...\nhttp://localhost:3000\n\n## How to use\n\nUsing this middleware plugin in your own application requires the use of the middleware plugin\nalongside a custom client-side JavaScript mixin.\n\nThe Connect plugin takes a single configuration parameter, *dojo*, which denotes the location of top level\ndirectory containing the The Dojo Toolkit source (version 1.8).\n\n### Configure middleware and use with Connect server\n    var connect = require('connect'),\n        server_side = require('server_side_dijit');\n\n    var app = connect()\n       .use(server_side({dojo: './path_to_dojo_1.8'}))\n       .use(connect.static('./my_html_files'))\n       .listen(3000);\n\nEvery requested HTML page will be scanned for declaratively defined widgets, *data-dojo-type*, \nthat also include the declarative mixin command, *data-dojo-mixin*, for the custom JavaScript library, *server_side/_TemplatedWidget*. \n\n### Configure AMD loader with client-side library path\n    var dojoConfig = {\n        paths: {\n            server_side: \"/public/js/server_side\"\n        },\n        async: true\n     };\n\nCustom JavaScript library to assist server-side rendering is provided under *public/js/server_side* in the module source directory.\n\n### Use client-side mixin to denote widgets for server rendering\n    \u003cdiv data-dojo-type=\"dijit/CalendarLite\" data-dojo-mixins=\"server_side/_TemplatedMixin\"\u003e\u003c/div\u003e\n\nThese widgets are instantiated in the server side environment and their rendered template injected into the returned \npage. On the client-side, the mixin modifies widget construct to stop templated widgets from trying to \ndo the client-side rendering and simply hooking up the template node that are already present.\n\n## Requirements\n\n* The Dojo Toolkit (version 1.8) source distribution available locally.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjthomas%2Fserver_side_dijit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjthomas%2Fserver_side_dijit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjthomas%2Fserver_side_dijit/lists"}