![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
Clean, opinionated foundation for new projects — to boldly go where no man has gone before.
npm install -g grunt-cli
npm install -g jspm
npm install
npm install
grunt
grunt build
sitemap.xml
generation with grunt-sitemap-xmlAnd a lot more under the hood. We just didn't have time to document all features. Yet.
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.
Works in:
IE9+, Edge 12+, Chrome 21+, Firefox 28+, Safari 6.1+, Opera 12.1+, Opera Mobile 12.1+, iOS Safari 7+, Android 4+.
If you need to support advanced ES6 features in IE11 and below like Promise
or Objest.assign
, 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.
Default layouts powered by Ekzo, which implies following requirements to fully work:
IE10+, Edge 12+, Chrome 21+, Firefox 28+, Safari 6.1+, Opera 12.1+, Opera Mobile 12.1+, iOS Safari 7.1+, Android 4.4+.
Provides graceful degradation for IE9 and IE8. Details can be found here.
If you don't want support of IE9 and below, remove IE()
macro call from base layout.
In IE9 and below will be displayed banner before page content with message that user's browser is outdated and link to Outdated Browser. If you don't want that message to be displayed, remove OutdatedBrowser()
macro call.
Copyright 2014 LotusTM. Licensed under the Apache 2.0 license.
1.5.0
localesNames
, since with updated locales
structure it's easy to extract locale names.shell:jspm_config
and shell:jspm_install
tasks. Those steps will be done automatically during npm postinstall
.grunt-gray-matter
module in favour of published to NPM version.|number
and |currency
. Use new global function numbro
instead.gettext
and nunjucks-extensions
modules.locales
option in Gettext
. Class will determinate available l10n files based on directories structure you have in /source/locales
. Note, that Gettext
will load all messages, even for not declared in Grunt config locales, but for which you have l10n files.src
option in Gettext
. Expected directories structure hardcoded in Gettext
. Path to locales still have to be specified with cwd
, but everything beyond will be resolved by Gettext
itself.en-US:nav:bar
in dgettext()
, which were used before to workaround inability of node-gettext
to sustain few locales in single instance. With updated Gettext
you can use provided methods to switch locales on the go, and access domains as normal, sane person.textdomain()
method of Gettext
and it's Nunjucks counterpart. Use new setTextdomain()
instead to set domains, and setLocale()
to change locale.resolveDomain()
method of Gettext
.load()
method of Gettext
in favour of new methods.<link>
referencing sitemap.xml
from header, since none of search providers supports this method. See #88. Sitemap referenced in robots.txt
instead.npm run
scripts.numbro
.nunjucks-task
module, which encapsulates l10n-specific logic stored in Grunt Nunjucks task itself before. Module exposes a single method to which should be passed usual Nunjucks options and some new, module-specific, options (mostly related to l10n). Module will return prepared configuration for task target with injected l10n and matter data and configurated Kotsu and l10n Nunjucks environment extensions.setLocale()
method for Gettext
and it's counterpart for Nunjucks. Use it to switch current locale. Don't forget to switch it back, though... Note, that you have to call setLocale
with locale of you environment at least once on top level of your project to invoke proper Gettext instance. For Nunjucks it already does updated nunjucksIExtensions()
of Gettext
.setTextdomain()
method for Gettext
, and same global for Nunjucks. Call it to change default locale to specified one. If you have any, except default.bindTextdomain()
method for Gettext
, similar to GNU one. So far it used externally to load messages for active locales, but you can join the party and spawn more domains based on your delicate preferences. It expects your l10n files to be under {localeName}/LC_MESSAGES/..
or {localeName}/..
paths.autobindTextdomain()
method for Gettext
. It crawls active locale directory and automatically discovers all files, then loads them as domains. For example, en-US/nav/bar.po
l10n file will end up as nav/bar
domain of en-US
locale. Used externally, during Gettext
invocation to load all l10n files.regioncode
and isoLocale
to Nunjucks filters.grunt
instance. This allows to invoke gruntfile in other environments and use Gruntfile config and methods.grunt-standard
with standard
.grunt-stylelint
with stylelint
.jspm
modules will be installed automatically during npm postinstall
step.^7.9.0
.nunjucks-extensions
module will set numbro
locale, default formatting and currency formatting to current locale's parameters on initialization.moment
now exposed to Nunjucks as pure function and no longer sets locale to current locale internally.nunjucks-extensions
module will set moment
locale to current locale on initialization.Gettext
, so now it handles locales and domains in similar to GNU gettext way, by creating new instance for each locales. Finally you don't need to use domain to store locale any more.nunjucksExtensions()
of Gettext
on invocation will now set locale to current locale of task and set domain to default.load
method of Gettext
has been split into bindTextdomain()
and autobindTextdomain()
methods, and it's discovery mechanism now works slightly different.dgettext()
and other domain-related gettext functions now expects as domain not :nav:bar
for current locale or en-US:nav:bar
for specific one, but nav/bar
... for both cases. If you want to call domain from other locale, change it with new setLocale()
first.i18-tools
to be completely static and class-less, so it no longer requires invocation with new
. Instead of providing locales properties for whole class, now only relevant properties should be provided for invoked methods.i18-tools
-related Nunjucks extensions to be declared by newly added method nunjucksExtensions()
to i18-tools
. This finally removed all manual declarations of extensions from Nunjucks task, leaving clear space for projects-specific filters and globals.i18-tools
method getLocaleDir()
with declared as Nunjucks global localeDir()
. Now it will always output ''
for base locale and '/' + localeName
('/' + localeUrl
) for others.printf
to more appropriate sprintf
.gettext.installNunjucksGlobals
to gettext.nunjucksExtensions
to be unified with other similar calls.gettext.nunjucksExtensions()
will now require current locale as second argument, and it will set gettext default textdomain to it during invoking, so there is no need to call gettext.textdomain(currentLocale
) in Grunt task.locales
to be normalized database-like, with accessible locale names as keys for each locale object, instead of being just an array. It makes working with locales much easier, both in JavaScript and Nunjucks environments.locales
, baseLocale
and gettext
config properties one level higher, thus removing i18n
property. There is no reason to keep those mandatory properties so deep.grayMatter
task no longer uses expand: true
option, since it writes to single file, thus doesn't need expanding.nunjucks-task
. This allowed to make Nunjucks task file much cleaner and to contain mostly options with minimum of logic.options.i18n.*
and options.humanReadableUrls.*
directly to options
.options.files.matter
of Nunjucks task moved to options.matter
and now excepts function, which will return prepared object, or matter object itself instead of path to matter file.onlyActiveOnIndex
option to Nav
and NavItem
components, which allows to force item be active only when current route matches link route not partially, but completely. Disabled by default.crumble
last characters of path with file extension.numbro
deprecation of setLanguage
method warning.this.orig.cwd
when grunt-newer
used.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.