Package detail

splendid

artdecocode181AGPL-3.0-or-later1.19.0

Static Web Site Compiler That Uses Closure Compiler For JS Bundling And Closure Stylesheets For CSS optimisations. Supports JSX Syntax To Write Static Elements And Dynamic Preact Components.

static, website, generator, templates

readme

splendid

npm version

Splendid is a static website compiler in Node.JS. It is flexible to build websites either small or large, and utilises the power of Closure Compiler and Closure Stylesheets to compile JS and CSS assets. Instead of JS SPAs, it produces HTML code that can even be shown without any JavaScript. This is achieved with static server-side rendered elements together with dynamic client-side components which are written in JSX syntax and implemented using Preact. The number of dependencies is very small and the software does not rely on Babel.

yarn add -D splendid
yarn add global splendid

Here are some of the cool features of Splendid that makes it the best choice for building static websites.

JSX Components And Elements  <kbd>📇 Elements & Components Wiki</kbd>

Each website will have a set of elements that might be reused across pages. It will also have interactive components. The best way to write both is using JSX syntax:

  • By simply exporting an element from the /elements/my-element.jsx file, it will be statically rendered into compiled HTML.
  • On the other hand, by exporting it from the /components/my-component.jsx file, it will be added to the page dynamically at run time.

In both cases, properties are passed from pages' HTML in arguments: <my-element src="example.png">. This means you can continue creating websites in old fashion using HTML, only making use of JSX when you need to program elements.

Bootstrap Integration  <kbd>🚥 Bootstrap Wiki</kbd>

Bootstrap elements can be used natively since Splendid implements their semantics as elements, with appropriate tags. The utilities defined in attributes will be added to the class name. Attributes that correspond to CSS properties will also be converted into a style. This makes it really easy to write layout:

<container transform="translateX(-10px)">
  <row>
    <col sm-3 d-md-inline>Hello World</col>
  </row>
</container>

JS Compilation And CSS Minification  <kbd>🗜Assets Wiki</kbd>

All style and script assets that are added to pages will undergo a compilation and optimisation using Closure tools.

  • Closure Compiler will create the smallest possible JavaScript transpiled into ES2015 and split it in chunks so that all common code can be shared by pages.
  • Whereas Closure Stylesheets will process CSS files to combine them into a single minified one.

Components can also access CSS API in order to rename their classes, e.g,. .MyComponent .HelloWorld becomes .MyComponent .a. CSS rules also automatically recieve browser prefix expansion (transform -> -webkit-transform) for greater compatibility.

Lazy Rendering Of Components  <kbd>🧩 Rendering Wiki</kbd>

Components will be rendered only when they are scrolled into view (allowed for render margin). They will also get a chance to download additional assets such as CSS, or JS libraries, before rendering, so that these resources don't block the initial rendering of the page. There are generally 3 types of components:

  • Preact components which are either functions or implementations of the Preact Component, and implement the render method called by Preact.
  • Plain components that implement the render method which is called directly when they are called into view.
  • Plain components that can download server-built HTML code and inject it into DOM when needed. They allow to keep the number of nodes in critical render path small so that initial layout and parsing can be performed faster.

In every case, components will be added to the page just before the user views them. <noscript> implementations can also be provided for users with disabled JavaScript.


Usage

splendid when called from the command line will trigger a build. It will read the splendid/config.js relative to the cwd.

$ splendid

created page markdown.html
created page index.html
created page highlightjs.html
copied styles/app.css to website/styles/app.css
copied styles/default.css to website/styles/default.css
copied img/favicon.ico to website/img/favicon.ico
copied img/logo.jpg to website/img/logo.jpg
copied js/main.js to website/js/main.js

The --watch flag will result in observing files in the app directory for changes (including the config) and rebuilding when necessary.

Splendid Configuration

A configuration object for a new website can use import statements.

/** @type {import('splendid').Config} */
const config = {
  layout: 'splendid/layout/main.html',
  replacements: [
    {
      re: /{{ company }}/g,
      replacement: '[Splendid](https://splendid.sh)',
    },
  ],
  // output: 'docs',
  // appDir: 'splendid',

  // to generate sitemaps, use either folder or domain website.
  // url: 'https://website.github.io/splendid',
  // url: 'https://splendid.page',
}

export default config

Pages Configuration

Each page need to be specified in the Pages config.

/**
 * @type {import('splendid').Page}
 */
export const main = {
  title: 'Main Page',
  url: 'index.html',
  file: 'index',
  menuUrl: '/',
  seo: 'The 150-160 characters search engine meta:description',
  og: {
    image: '/img/logo.jpg',
  },
}

The path to the file is relative to the pages dir.

structures/website/splendid/pages
├── index
│   ├── 1-intro.html
│   └── index.md
└── index.js

Default Structure

splendid comes with a simple default website. To initiate splendid in the current working directory with the default structure, run splendid --init (or the shorter version is splendid -I).

$ MacBook:test-website zavr$ splendid --init
Added Dockerfile, nginx.conf, splendid to .
Run splendid again to compile.

Development Server

To serve the static website locally during the development of the website, the development server is added to splendid. It will be started on http://localhost:5000 with the splendid -s command.

Copyright & License

(c) Splendid 2019

changelog

17 March 2020

1.19.0

  • [feature] Read additional packages' components and elements.

5 March 2020

1.18.1

  • [fix] Fix OLs.

1.18.0

  • [feature] Process UL and OL.

3 March 2020

1.17.10

  • [feature] Fix placeholder auto, and make it default on Mac for images.

2 March 2020

1.17.9

  • [org] Publish web components as a separate package to avoid republishing 500KB every time.
  • [fix] Fix paragraphs.

1.17.8

  • [fix] Don't increase the width of responsive images.

1.17.7

  • [fix] Add the getResizes method into Splendid.

1.17.6

  • [feature] Add the imageDimensions method.

1.17.5

  • [fix] Process multiple consecutive paragraphs.

1.17.4

  • [fix] Improve paragraph regex.

1 March 2020

1.17.3

  • [fix] Pass path to stylesheets compiler.

1.17.2

  • [deps] Install closure-stylesheets API.

11 February 2020

1.17.1

  • [fix] Do compile stdlib.

1.17.0

  • [fix] Build updated HighlightJS.
  • [feature] Merge trapcss into stdlib.

10 February 2020

1.16.16

  • [fix] Update HighlightJs.

2 February 2020

1.16.15

  • [fix] Fix multiple ids when heading is used with a section.
  • [fix] Ensure path for addFileSync.

31 January 2020

1.16.14

  • [fix] Fix sitemap urls.
  • [fix] Fix opengraph urls.

25 January 2020

1.16.13

  • [fix] Move md headings regex to area replacements.

1.16.12

  • [dev+doc] Better sections handling via data-section with ids and wiki.

1.16.11

  • [fix] Update elements to normalise stringifying functions.
  • [fix] Upgrade highlightjs to remove extra dependencies.
  • [fix] Fix renaming issue with ajax pages and create a typedef for run_template post run-template exports.

13 January 2019

1.16.10

  • [fix] Correct duplicate img-fluid widths.
  • [fix] Always remove space after function (), for compat between Node 8 and 10.

11 January 2019

1.16.9

  • [fix] Hot-reload accounts for mounts.

13 December 2019

1.16.8

  • [fix] Fix simplifying paths for srcset.

11 December 2019

1.16.7

  • [fix] Fix parallax background mounting.

10 December 2019

1.16.6

  • [fix] Fix image paths when mounted.
  • [fix] Simplify urls into relative when mounted.
  • [fix] Account for mount in parallax.
  • [dev] Refactor css-supports into pre_head hook.

6 December 2019

1.16.5

  • [fix] Bugfix for background-image attribute.
  • [fix] Do shortcut width and height CSS attributes on elements, except for 'canvas', 'embed', 'iframe', 'img', 'input', 'object', 'video'.
  • [fix] Do compile images.

1 December 2019

1.16.4

  • [fix] Fix async google font.

1.16.3

  • [fix] Pass mount to extra props and update hljs and social-buttons to pick it up.
  • [dev] Assign menuUrl to all pages.
  • [feature] Async google font.
  • [fix] Watch the pages outside of splendid app.

30 November 2019

1.16.2

  • [fix] Fix mounting on for menu URLs and add tests for pages.

1.16.1

  • [fix] Install missing @lemuria/absolute-proxy for potrace component.
  • [ops] Don't vendor potrace, get the path via config (e.g., ~/.splendid/potrace).

1.16.0

  • [fix] Simpler onDOMContentLoaded without listener.
  • [fix] Social buttons keep their height.
  • [fix] Don't add full-res photo, only apply the largest available resize as src.
  • [fix] Add intersection-observer JS map.
  • [fix] Fix discovering pages in / dir without file prop.
  • [img] Read the data-src and data-srcset from noscript tag.
  • [docs] Column web component and wiki.
  • [feature] Better potrace via a dedicated component.
  • [feature] Extract the column size and container from the layout. Better column size handling for container-fluid with xs breakpoint.
  • [fix] Cache and live-updates of layouts.

29 November 2019

1.15.6

  • [fix] Fix resolving of url in social-buttons.

28 November 2019

1.15.5

  • [feature] Mount splendid/internal on /splendid-internal
  • [fix] Put dirs' CSS into css/{dir} for better visibility inside the Splendid folder.
  • [fix] Ignore missing warnings for initial combined.css.
  • [dev] Remove compiling externs from scripts - instead, they should be imported.
  • [doc] Document stylesheet in Wiki.

1.15.4

  • [fix] Return undefined className instead of null.
  • [fix] Check for null properly when exporting properties.

1.15.3

  • [fix] Pass classes and styles to social buttons.
  • [fix] Fix google fonts loading with whitespace.

27 November 2019

1.15.2

  • [fix] Add preload polyfill only when there are links with onload attribute.
  • [fix] Fix advanced google font loading.
  • [doc] Web components and wiki for google font.

1.15.1

  • [fix] Correct path to css in docs.
  • [improvement] Extract font data-url from the stylesheet in critical-path-font.
  • [doc] Generate web-components and wiki documentation for critical-path-font.
  • [dev] Refactor pre-head compilation process.
  • [bootstrap] The component now returns the meta tag required for Bootstrap (switch off with no-meta prop).

1.15.0

  • [fix] Run bootstrap-css run_template prior to combine-css by having priorities set on run_templates.
  • [fix] Write combined.css from the component instead of relying on resource-stream.
  • [feature] Create icon component to automatically generate an icon.
  • [fix] Update @externs/preact to avoid errors on prod pages that don't have Preact components.
  • [dev] Generate CSS files into the css folder instead of styles.
  • [feature] Add aqt method to Splendid for making network requests.
  • [fix] Clean stack for stdlib errors. Add clean-stack to stdlib.
  • [web-components] Fix boolean bootstrap utils.
  • [bootstrap] Rename util attributes into classes on all tags.

25 November 2019

1.14.12

  • [fix] Restore dropcss.
  • [bootstrap] Serve bootstrap without min on dev.

1.14.11

  • [fix] Revert not ready build.

1.14.10

  • [fix] Fix wraps for mount.
  • [fix] Cut href tags properly to avoid replacements in attributes.

20 November 2019

1.14.9

  • [fix] Fix the wepb regression sizes bug.
  • [webp] Don't print the original source, since it's provided in the img fallback.
  • [webp] Wrap the potrace path for dirs.

1.14.8

  • [fix] Update b-ad to B-ad to avoid conflict with adblock.

16 November 2019

1.14.7

  • [fix] Fix the controlStyle export build bug.

1.14.6

  • [fix] Point ÀLaMode to @depack/depack from stdlib.

1.14.5

  • [fix] Fix build by requiring Depack's nodejs deps only at runtime.

1.14.4

  • [fix] Move @lemuria/control-style and @depack/depack to stdlib.
  • [feature] Support alternative vendor prefixes check in the combined CSS (by upgrading closure-stylesheets to v1.12.1).

14 November 2019

1.14.3

  • [fix] Build prefixes 🤦‍♀️.

1.14.2

  • [fix] Include prefixes in the build.

1.14.1

  • [fix] Clear build.

1.14.0

  • [feature] Create a separate CSS for browser prefixes and serve them only when the browser does not support any of the properties used in the main stylesheet. Implemented via closure-stylesheets@1.11.1.
  • [fix] Correctly embed CSS into all of the pages in a splendid dir group.
  • [license] Update the license to AGPLv3.

13 November 2019

1.13.1

  • [fix] Fix compiling stylesheets.

1.13.0

  • [feature] Rename Bootstrap classes with Closure and match props against list of all classes instead of using RegExps.
  • [feature] Compile Web Component's documentation from Bootstrap classes and CSS properties (initial commit, todo: Bootstrap descriptions, Splendid components/elements documentation).

12 November 2019

1.12.14

  • [fix] Cut and defer styles on the page to prevent rules on them.
  • [parallax] Resolve relative for the component.
  • [highlightjs] Support src attribute to read files from a file.
  • [feature] Enable automatic paragraphs rule with the [paragraphs=true] option in the config.
  • [feature] Add ~ strike replacement.

11 November 2019

1.12.13

  • [dev] Stable resolve internal that always points to node_modules/splendid instead of resolving full path. Useful for linking and consistent source maps independent of a machine.
  • [API] Implement addFiles method in Splendid to copy files in batch, as used in SocialButtons.
  • [fix] Fix Splendid's components path resolving bug.
  • [a] Fix the single # bug and add more tests.

1.12.12

  • [a] Fix slash wrapping.
  • [a] Smooth scroll feature.
  • [col] Add col-n utility.
  • [fix] Fix Competent compiler warning.
  • [pages] Deduce page's file from its key.
  • [dev] Print compile times for each page.
  • [exp] Write pages in file chunks and paragraph RE (both switched off).

1.12.11

  • [fix] Build stdlib.

1.12.10

  • [feature] Allow to unrender Preact components.
  • [feature] Load newly added elements and components dynamically in watch mode.
  • [dev] Only server Splendid's components source if SPLENDID_SRC was set.
  • [dev] Serve Preact for dev mode correctly.
  • [a] Deprecate file property and deduce link name from linked page.
  • [fix] Bootstrap priority on dev.

8 November 2019

1.12.9

  • [feature] Allow to embed combined stylesheets on a page.

1.12.8

  • [fix] Restore resolving the image URL in OG tags.

1.12.7

  • [pagecomp] Sort components' imports and map in PageComps by upgrading competent.
  • [app] Multiple blocks directories.
  • [splendid] Write debug version of combined CSS with pretty print for visual diffs in splendid app dir.
  • [splendid] Add file relative to page's dir if its path starts with ./.
  • [reload] Update the combined CSS live on prod env.
  • [comps] Social buttons to skip adding title with meta that will read description from the meta tag.
  • [feature] Drop bootstraps, combine CSS and compile PageComps by dirs.
  • [fix] Upgrade imgs' srcsets.
  • [og] Pass the path to image relative to dir.
  • [pages] Read layout from page's dir.
  • [pages] Deduce index page from its index key in pages' config.

7 November 2019

1.12.6

  • [fix] Build the package.

1.12.5

  • [fix] Upgrade @externs/preact for built components to work.
  • [fix] Import from @externs/preact and not preact in PageComps.

1.12.4

  • [feature] Button classes for Bootstrap.
  • [fix] Remember metadata for recompilation during watching (Segments/App refactor).
  • [fix] Consistent IDs based on md5, and group components' meta by their hash.
  • [fix] Fix the bug when a single file is read in multiple small chunks by Node.
  • [test] Create a context for testing.

5 November 2019

1.12.3

  • [test] Fix almost all tests.
  • [dev] Refactor Splendid to hold scripts and JS as object items ({ src, type: module?, ...props }).
  • [feature] Load elements from multiple directories.
  • [feature] Consider - as a list item.
  • [fix] Fix static language code inclusions.

2 November 2019

1.12.2

  • [fix] Don't split chunks of the same file with a new line.
  • [fix] Add source maps of inlined JS files.
  • [fix] Watch directories of pages, combine JS files encountered in dirs into PageComp.
  • [fix] Fix the reload of components and elements.

1 November 2019

1.12.1

  • [fix] Fix crossorigin> link typo.

1.12.0

  • [feature] Upgrade Competent to unrender plain components.

31 October 2019

1.11.6

  • [feature] Don't include Preact in PageComps when all components are plain.

1.11.5

  • [fix] Avoid separators for non-processed files.

1.11.4

  • [fix] Add src/index.js to correctly resolve components.
  • [feature] Don't include Preact on a page if all components were plain.

1.11.3

  • [fix] Don't mock loading, but update ÀLaMode config to require components.

1.11.2

  • [fix] Mock loading Splendid components from build since they contain ES6 modules which are not run-time transpiled because Splendid will come from node_modules.
  • [fix] Fix externs' resolve splendid:// internal bug.

1.11.1

OPS

  • Upgrade ÀLaMode to build elements without intermediary JS files.
  • Import Splendid built components natively from PageComps.

COMPONENTS

  • <kbd><social-buttons></kbd> Share the menuUrl if present instead of full url.

1.11.0

DEV

  • Can now override properties for export, making it easy to write elements and components at the same time.
  • All replacements prior to components will be relevant to particular file being read (by remembering areas), so that resolveRelative can work on components.
  • Merge components and elements RegExp.
  • It's possible to put pages in directories now, so that the main page config can contain a string to point to a dir's pages config.
  • Add lead, border and rounded Bootstrap utils and responsive p/m utils, e.g., pb-lg-3.

Splendid API

  • Proxy Splendid instance for each component so that meta properties always relatve to specific component.
  • Add deferRender, replace and static replace methods.
  • Rename addExtern to extern.
  • Implement currentFile and resolveRelative for each component.
  • Components can specify allowedProps static getter, to whitelist which properties will be written to PageComp.
  • Resource stream will update references in <source> element for correct paths.

COMPONENTS

  • <kbd><ajax-wrapper></kbd> Allow to wrap Ajax response in blocks.
  • <kbd><highlighjs></kbd> Dynamic code syntax highlighting. Use !lang for static rendering.
  • <kbd><a></kbd> Automatically add nofollow to links with target=_blank.
  • <kbd><a></kbd> Links can be specified in individual pages' configs.
  • <kbd><critical-path-font></kbd> Preloads font without the onload attribute.
  • <kbd><img></kbd> Adds placeholderAuto attribute and extracts styles / bootstrap utils from attributes.
  • <kbd><img></kbd> Can pass the onload attribute.
  • <kbd><img></kbd> Read textContent instead of innerText on webp loading, to prevent reflows.
  • <kbd><parallax></kbd> Append stylesheet to combined version, otherwise the placeholder might not be positioned properly.
  • <kbd><script></kbd> Compile inline scripts with Closure Compiler.

22 October 2019

1.10.3

DOCUMENTATION

  • Produce animations for README and describe main features.
  • Write Wiki page about component rendering lifecycle.

DEV

  • Use git lfs for binary files (.fla).
  • Upgrade closure-stylesheets to correctly set root selector.

Splendid API

  • addStyle -> style (combined style, as compared to stylesheet which is external style).
  • addCSS -> css (for components).
  • removeLine returns null now.

COMPONENTS

  • <kbd><npm-badge></kbd> Minify CSS selectors.
  • <kbd><highlight></kbd> Add Prism/Hl.js styles to the combined stylesheet.
  • <kbd><bootstrap-css></kbd> Serve Bootstrap from local node_modules and CDN only on demand (cdn attribute).

18 October 2019

1.10.2

  • [fix] Handle webp errors better.
  • [fix] Rename splendid.error to splendid.newError to avoid clash with component API.

1.10.1

  • [fix] Handle Closure errors better.
  • [feature] Add Splendid.error method to throw handled error.

1.10.0

DOCUMENTATION

  • Write Wiki pages.
  • Document components' and scripts' strategies.

FEATURES

  • Publish closure-stylesheets-java with an updated Closure Stylesheets that supports @supports.
  • Implement float and order Bootstrap utils.
  • If there exist both component and element with the same name, the component will correctly be used to browser-side rendering.
  • Check cache before bundling pages' JS chunks.
  • Links can specify priority in priority attribute to control the order.
  • Dynamically update CSS assets in browser.
  • Allow to add stylesheets without combining them into a single one with <stylesheet nocombine>.
  • Allow to prevent a page from appearing in the sitemap.
  • Insert additional HTML with preBodyCode before closing <script> tag.
  • Skip HTML Escaping in standalone compiled stylesheets.
  • Inline stylesheets into HTML.

Splendid API

  • _noJSstyles[], addNoJSStyle(): The styles added by the content and layout for NOJS version
  • _preload[], preload(link, as): Links to preload.
  • addCSS options allow to specify whether style is combined and preloaded.
  • replace-with and object-assign polyfills.
  • Load scripts on page load.
  • Polyfill for links with rel="preload" that will just call the onload method on the element, if it's present.
  • Dynamic loading of CSS with addCSS({ dynamic: true }) option.
  • Append layout post process rules via addPostProcessRule from components.
  • Normalise link adding via the addLinks and stylesheet methods.
  • Sync inlineCSS method to compile minified CSS using Closure Stylesheets, and allow to inline styles from within the addCSS call.

COMPONENTS

  • <kbd><google-fonts></kbd> Allow to load Google Fonts without blocking the page load, i.e., to load with <link rel="preload"> and then substitute it using JS.
  • <kbd><google-fonts></kbd> Add display option to Google Fonts.
  • Dimensions for section breaks.
  • Import <parallax> component from artd.eco.
  • Implement <css-supports> component for CSS feature detection.
  • <kbd><img></kbd> Images to implement resize observer that will react to page height changes so that potrace can be placed correctly.
  • <kbd><img></kbd> Add above-fold property for images.
  • <kbd><img></kbd> Cache potrace results.
  • <kbd><img></kbd> Use <SVG> placeholder for non-responsive images, by using placeholder-width and placeholder-height properties, that will be hot-swapped once the image is loaded.
  • <kbd><critical-path-font></kbd> Download a Google Font and embed it onto the page.
  • <kbd><google-font></kbd> Add an advanced async loading of Google Fonts using @lemuria/font (no multiple layout updates, faster stylesheet initialisation).
  • Load components on window.onDOMContentLoaded by default, not window.onload and allow to specify either in settings.
  • Import and call init scripts in the correct way.
  • The makeClassGetter function returned from addCSS can be destructured into classes.

DEV

  • Move attributes to style parsing to a separate package @lemuria/control-style.
  • Mount on / by default and add slash to all links.
  • Allow to serve Preact from its src rather than build.
  • Resolve linked Splendid components correctly.
  • Merge splendid.addFile and add-file component, check for last changed date rather than compare for content changes.
  • Serve blocks dynamically via _blocks path; refactor app structure to decouple init from run-template.
  • PageComp class abstraction.

15 September 2019

1.9.5

  • [fix] Properly transpile JSX, make component map with JSX aliases.

14 September 2019

1.9.4

  • [fix] Add writeAssets to stdlib.

1.9.3

  • [fix] Start the server correctly.

1.9.2

  • [fix] Fix the build step.

1.9.1

  • [fix] Transpile elements.

1.9.0

COMPONENTS

  • <social-buttons> component for dynamic rendering of buttons with popup shares.
  • <highlight> component block replacing the Buttons rule.

DEV API

  • Defer rendering with deferReplacement until the very end to prevent transforms in certain blocks, e.g., pre/code.
  • appendCacheSync for sync cache updates.
  • Update frontend invocation by passing folders dir instead of composing.
  • Read Splendid components using the standard method, load elements and components that have both default and named exports.

FIXES

  • OG tags to display full path to image (for Twitter).
  • SVG placeholder for WebP to have alt attribute.

13 September 2019

1.8.0

MAJOR

  • Combine components and split into chunks with Depack and put scripts in head with the defer strategy.
  • Build using compiled stdlib to reduce prod dependencies.
  • Bootstrap column sizes that propagate into context for automatic sizing of images.
  • Include <diagnostic> element for telemetry.
  • IMAGES with potrace and svg-placeholders.

DEV

  • Extract error from stylesheets.
  • Remove @supports from bootstrap as stylesheets don't support it.
  • Parse SIPS error.
  • Open Graph fixes.
  • Don't drop bootstrap in dev mode or when focusing on pages.
  • Bootstrap components to become elements.
  • Handle missing layout error.
  • Cache add-file results.
  • Combine all blocks into a single RegExp.
  • Load components from separate files.
  • Debug logging method.
  • Skip data:// urls in resource stream.
  • Buttons alt attribute (todo: buttons as component).
  • Exclude <tags bodies="with attributes"> from participating in CORE_REPLACEMENTS, e.g., prevent <span title="_hello_world"> from being updated to have em's.

FEATURES

  • Add ids to headings to use in menus.
  • Automatically generate urls for pages from their title.
  • Find links for buttons.
  • Store links in the configuration.
  • Preconnect and DNS pre-fetch Google Fonts (save ~100ms).
  • <meta-description> tag for meta:description SEO purposes.
  • Add the option to remove lines when component returned null.
  • Standard handling of no-js classes via splendid.hideNoJs(selector).

20 June 2019

1.7.0

REFACTOR

  • Define alamodeModules.
  • Fix drop-bootstrap for multiple pages.
  • Move components into elements.

FEATURES

  • Support specifying externs either via the externs element, or the extern attribute.
  • Add page-inlined styles.
  • Compile components' CSS with closure-stylesheets.
  • Polyfill method (intersection observer, closest).
  • Pass logging methods to the components (log, logError).
  • Listen to the readline interface on a Mac to open the Splendid directory.
  • [bin] -D: disable-dev to load without development scripts.
  • [components] Load components asynchronously.
  • [<script>] keep to not manipulate script element, pass through other props.
  • [live] Dynamically update blocks only.
  • [bootstrap] Various bootstrap elements.
  • [<image>] The image component for lazy-loading, and webp pictures.

22 May 2019

1.7.0

  • col w/ sizes, allow foreign keys in mcg, fix cache,
  • Container bootstrap element with abstract algorithm to get bootstrap props

15 May 2019

1.6.1

  • [structure] Update structure to use blocks.

13 May 2019

1.6.0

  • [fix] Correct addFile for node_modules://, consistent with addScript('node_modules://...').

1.5.3

FEATURES

  • Compile components independently of Preact using @externs/preact.
  • Write HTML Blocks in blocks directory with automatic indentation.

REFACTOR

  • Render again method for self-closing components with inner component html; upgrade competent to pass the Replaceable context to child streams.

12 May 2019

1.5.2

  • [comps] Fetch metadata for scoped packages in NPM badge.
  • [fix] Correctly handle appendCache queue in Splendid.

1.5.1

  • [deps] Upd @goa/koa to install mime-db independently.

1.5.0

FEATURES

  • Embed files from node_modules with node_modules:// path.
  • Cache prod version of the NPMBadge.
  • Allow to configure highlightJS theme.
  • Automatically add the highlightJS and prism styles only when needed.

REFACTOR

  • Switch to Goa web server.
  • Create Splendid stream initialised for each page and containing the resources.
  • Correct caching of modules when more that one page is rendered.

3 May 2019

1.4.0

FEATURES

  • Export web components JSON for html.experimental.customData.
  • Init with updating of package.json and eslintrc, interactive for Docker.
  • Insert scripts before closing body tag.
  • Compile exported Preact components with GCC, provide the environment flag to separate for dev and prod modes.
  • Mount on the given directory.
  • Reload on component source code change or page change via websocket.
  • OpenGraph and BootstrapCss components.
  • Read and render JSX pages from a directory.
  • Warn if page does not exist.
  • Generate sitemap.
  • Use Prism for JSX highlighting.
  • Implement AjaxLoader.
  • Simplify styles, only add NPMBadge.css from its component.
  • Write types, compile them with Typal.

REFACTORING

  • Rewrite replacements as components.
  • Abstract into ContentStream and LayoutStream, with Splendid access by rules and components.

8 Dec 2018

1.3.0

  • [feature] Start development server.
  • [feature] (breaking) better structure and paths, init in current directory
  • [feature] Reload configuration file also.
  • [feature] Use alamode to parse JS config.
  • [fix] img regexp.
  • [package] Build with alamode.
  • [devs] Use argufy and print version.

1.1.0 (11 June)

  • [feature] --watch flag for cli to allow automatic rebuild.

1.0.4 (11 June)

  • [bugfix] better handling of _ and *.

1.0.0 (31 May)

  • Create splendid: a static website generator for Node.js
  • [repo]: test, src, structures/default