lipsumar on gregorian
Feature: fallback to global doc… Render PreviewDocument with cus… (compare)
lipsumar on 0.5.7
lipsumar on master
Release 0.5.7 (compare)
lipsumar on master
Enhancement: handle overriding … (compare)
lipsumar on master
improve util.path.isDirectory Server: parse json body Feature: UI: Quick create Quic… (compare)
lipsumar on master
Feature: Server plugins // reg… (compare)
Test/Button
containing this:<h2>Normal background</h2>
{{> Atom/Button text="Default button"}}
{{> Atom/Button text="Primary button" className="ns-btn--primary"}}
<h2>Dark background</h2>
<div style="background-color:#333">
{{> Atom/Button text="Default button"}}
{{> Atom/Button text="Primary button" className="ns-btn--primary"}}
</div>
/**
* i am a javadoc
* @foo bar
*/
npm i --save design-system-framework@0.5.4
New feature: variations
you can have multiple html file per component
Atom/Button/Button.hbs
Atom/Button/primary.hbs
Atom/Button/fancyplusplus.hbs
you just need
dsf.onLoad(function(){
dsf.getComponents().forEach(function(component){
var componentName = component.id.split('/').pop();
component.getResourcePaths('html', function(err, files){
if(files.length > 1){
files.forEach(function(f){
var lastPart = f.split('/').pop();
if(lastPart === componentName+'.hbs'){
// index.html
component.registerVariation('html', 'index', f);
}else{
// variation
var name = lastPart.replace('.hbs', '');
component.registerVariation('html', name, f);
}
});
component.cacheHtml(); // won't be needed soon
}
});
});
});
and use
{{> Atom/Button}}
{{> Atom/Button/primary}}
{{> Atom/Button/fancyplusplus}}
the server can also serve variationshttp://localhost:3000/build/Atom/Button/?__variation=primary
gregor install --font Foobar
sounds nice... maybe as a plugin as well