![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Clean, opinionated foundation for new projects — to boldly go where no man has gone before
To boldly go where no man has gone before
npm install -g grunt-cli
npm install -g jspm
npm install
npm install
npm start
or npm start -- --hmr
if you need Hot Module Reloadingnpm run build
tcomb
and tcomb-validation
, built-in handy refinements.sitemap.xml
generation with grunt-sitemap-xmlAnd a lot more under the hood. We just didn't have time to document all features. Yet.
Work in progress
Deployed version of Kotsu from master branch can be found here.
Note that Examples section so far features only least part of predefined elements and features.
IE | Edge | Chrome | Firefox | Safari | Opera | Opera Mobile | iOS Safari | Android |
---|---|---|---|---|---|---|---|---|
9+ | 12+ | 21+ | 28+ | 6.1+ | 12.1+ | 12.1+ | 7+ | 4+ |
To enable ES6 features in IE11 and below, uncomment import 'babel-polyfill'
in main.js
. See details here.
Default build shipped with jQuery 3.1.0+ which doesn't support IE8. Replace it with pre 3.0.0 version if you need support of IE8.
IE | Edge | Chrome | Firefox | Safari | Opera | Opera Mobile | iOS Safari | Android |
---|---|---|---|---|---|---|---|---|
10+ | 12+ | 21+ | 28+ | 6.1+ | 12.1+ | 12.1+ | 7.1+ | 4.4+ |
Refer to Ekzo Browsers Support section for details about graceful regression for IE9 and below, which included in Kotsu by default.
To disable graceful regressions for older IE, remove IE()
macro call from base layout.
In IE9 and below users will see banner before page content with message about outdated browser and link to Outdated Browser.
To disable Outdated Browser message, remove OutdatedBrowser()
macro call from base layout.
Copyright 2014 LotusTM. Licensed under the Apache 2.0 license.
1.13.0 - 2018-03-30
[grunt] Added grunt-jspm
task which allows launch JSPM watch and build within Grunt.
JSPM no longer needs to be launched with npm-run-parallel
and JSPM running process is now synchronous and predictable.
Besides, new JSPM task able to handle simultaneous watch of multiple packages.
Note, that task uses child_process.spawn
under the hood. Because JSPM does not expose its watch API, for now it is possible to be launched only with CLI.
[grunt] Added grunt-jspm-emitter
which is responsible for launching chockidar-socket-emitter
, which is watching scripts changes and emits them to SystemJS when Kotsu started in Hot Reloading Module mode, with --hmr
flag #230
[package][modules] Added version
NPM script and called by it modules/changelog-version
.
This is a small experimental unility, which will run everytime version will be bumped with npm version
command, so that you'll never forget to update CHANGELOG version before release. Of course, if CHANGELOG exists at all.
Note, that to work CHANGELOG should follow keepchangelog.com specs.
[modules] Added SITE.matter.$raw
internal property, which holds not rendered Front Matter.
[modules] Added cache
module which provides a central cache storage and additional method for memoizing function results based on it's arguments or specified cache store key.
Cache itself based on lru-cache.
Examples:
const { cache, cacheFunc } = require('./modules/cache')
cacheFunc(renderFunc)('{{ value }}', { value: 'test' })
// -> 'test'
cacheFunc(renderFunc, 'matter')('{{ value }}', { value: 'test2' })
// -> 'test2'
cache.get('123er23')
// -> 'test'
cache.get('matter')
// -> 'test2'
[grunt] Replaced shell:jspm_watch
and shell:jspm_build
tasks with jspm:watch
and jspm:build
.
Besides, jspm:watch
is now also part of the serve
task.
[modules] Matter data is no longer rendered ad hoc (by calling getPage()
, etc), and instead rendered only once during environment configuration.
Raw version of same matter is always available under SITE.matter.$raw
.
Beware that due to those changes, in default rendered and cached version page-specific context variables, like PAGE.locale
won't be available. Pieces with such variables should be rendered explicitly with render()
filter applied to $raw
version of data.
[modules][nunjucks] Nunjucks getPage()
no longer renders Matter data and instead returns rendered and cached data.
For rare cases, when some additional rendering with specific context required, raw pages data available under $raw
property.
{% set item = getPage('/item').props.title %}
{# -> 'Якась сторінка' #}
{% set item = getPage('/item').$raw.props.tile %}
{# -> '={{ gettext("Some page") }}' #}
[modules] Simplified code related to caching of data.SITE.matter
and data.SITE.images
.
[modules] It is now possible to import clear-workid
module without causing side effects and run it later. Just in case someone want to, let's say, test it... Like we shouldn't test it too...
Running it with node
will work the same way as before.
[modules] Improved clear-workid
output visuals.
[grunt] Removed grunt-shell
which was used to launch JSPM watch and build. It has been replaced by grunt-jspm
which spawns JSPM process #230
[package] Removed js:watch
script, since it is handled by grunt-jspm
by now #230
[package] Removed npm run start-hmr
, npm run serve-hmr
and related subtasks.
Just use npm start -- --hmr
or npm run serve -- --hmr
to launch Hot Module Reloading.
[package] Removed npm-run-all
package, since due to newly added grunt-jspm
and grunt-jspm-emitter
it no longer used #230
[templates] Removed Nunjucks getPage()
function forceRender
and cached
options, because getPage()
now always returns rendered and cached pages data, while raw version available with $raw
property.
grunt-nunjucks-2-html
to version 2.2.0 vitkarpov/grunt-nunjucks-2-html#56require
and module.exports
.FAQs
Clean, opinionated foundation for new projects — to boldly go where no man has gone before
The npm package kotsu receives a total of 2 weekly downloads. As such, kotsu popularity was classified as not popular.
We found that kotsu demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.