Skip to content

Instantly share code, notes, and snippets.


Richard Walker digitalsadhu

View GitHub Profile
digitalsadhu /
Created Jun 22, 2020
Outlaying Eik react complications

The issue

  1. Typescript converts to a js version with jsx files This is just Lars' build step that outputs to a /lib folder

  2. I add a rollup build to convert out the jsx so its pure js with esm

import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';

I’ve done a little digging. I think we have some challenges to solve regarding supporting both Eik and Asset pipe in the manifest file.


  1. in the manifest file must have the legacy field populated with asset pipe hash and the new js and css arrays must be populated with Eik absolute URLs
  2. the first time podlet.js or podlet.css is called, the legacy field is populated, subsequent calls do not reset the legacy field so it is important that the asset pipe stuff is done before the Eik stuff
  3. Even when podlet.js and podlet.css are called in the correct order, the legacy field is added to the array of modern fields



Publishing from CI, 2 approaches

Approach 1. [current approach] (where the cli controls the version)

  • eik package
    • calculates hashes of a local build and compares with what is available on the server
      • if hashes are the same, abort
    • calculates the next version number to publish
      • for a patch 1.0.1 goes to 1.0.2
      • for a minor 1.0.1 goes to 1.1.0

Asset Server Proposed cli commands

All commands rely on the existance of an .assets.json file which will can be in the users home directory and/or the root of the project directory with a file in the project directory taking precedence over a file in the home directory.

The .assets.json file must define as a minimum the following fields when performing global publish, alias amd import-map commands:


Asset Server Proposed APIs

Publishing Global dependencies

Publish a global dependency to the server:

POST /:org/:type/:name/:version

Form fields


The following lays out roughly, a proposed way to sharing dependencies across podlets.

The idea is that, through a cli tool, it will be possible to manage which libraries are available across the organisation. Here we are using react (and react-dom) as a global cross podlet dependency to illustrate the proposed workflow.

First, we publish a global version of react at a specific version. The cli tool, downloads react, converts it to esm and uploads it to the CDN at a convention based URL.

asset-pipe global publish --org finn react@16.8.6
digitalsadhu / app-scaffold.js
Last active Dec 21, 2018
App scaffold proposal
View app-scaffold.js
'use strict';
class AppScaffold {
Method used to register a plugin function that will be run in the constructor
Plugins can be used to
* register middleware
* add functions to the startup queue
* add functions to the shutdown queue
* register metrics streams to be consumed
View jest-basics.js
function sum(a, b) {
return a + b;
test('adds 1 + 2 to equal 3', () => {
expect(sum(1, 2)).toBe(3);
it('should add 1 + 2 and return 3', () => {
expect(sum(1, 2)).toBe(3);


Defining a model

class Post extends Model {
  static attributes (attr) {
    attr('title', 'string')
    attr('description', 'string')
digitalsadhu /
Created Jan 19, 2017
Proposal for ORM data access options

3 layers of data access (proposal)

Model methods: (layer 3)

These mirror ember data methods. They are high level and aim to be useable by the API via the url query string etc. They follow jsonapi spec where appliable. They are:


You can’t perform that action at this time.