Documentation
¶
Overview ¶
Copyright © 2025 Benny Powers <web@bennypowers.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeDesignTokensToModule ¶ added in v0.1.12
func MergeDesignTokensToModule(module *M.Module, designTokens types.DesignTokens)
func NewLoader ¶ added in v0.4.6
func NewLoader() types.DesignTokensLoader
NewLoader creates a new design tokens loader
Types ¶
type DesignTokens ¶
type DesignTokens struct {
// contains filtered or unexported fields
}
DesignTokens provides access to design tokens by name.
func LoadDesignTokens ¶
func LoadDesignTokens(ctx types.WorkspaceContext) (*DesignTokens, error)
LoadDesignTokens loads tokens from a path or Deno-style specifier and returns a DesignTokens struct. The prefix is prepended to all token names on load. Configuration is loaded from: 1. CEM config (generate.designTokens.prefix, generate.designTokens.spec) - highest priority 2. Asimonim config (.config/design-tokens.{yaml,json}) - fallback for prefix/groupMarkers
type Loader ¶ added in v0.4.6
type Loader struct{}
Loader implements the types.DesignTokensLoader interface
func (*Loader) Load ¶ added in v0.4.6
func (l *Loader) Load(ctx types.WorkspaceContext) (types.DesignTokens, error)
Load implements types.DesignTokensLoader.Load