New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

wml-scaffold

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wml-scaffold

Generate file and folder structure from wml file

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

WML Scaffolder

Generate pages/layouts/components from wml file

WML file

wml is based on yml but designed to define structure of html pages

####example :

layout:
    - default:
      - $header:
        - $logo
        - $header nav|extend(nav)
      - $menu:
        - $switch
        - $search
        - close
        - $global:
          - $link
        - address
        - phone
      - $footer:
        - $contact
        - $social
        - $newsletter
        - $globalise
        - $link|loop(2)
  
  catalog:
    - layout: default
    - $nav
    - $heading:
      - $breadcrumb
      - title
      - text
    - $acquisition:
      - title
      - text
      - url
    - $footer
    ``

Using command line

run export function

npm run export -- --input=./structure.wml

parameters are:

  • output, default './export'
  • input , default false
  • type, default vue-twig-scss, options : vuejs-twig-scss|vuejs|vuejs-liquid-scss
  • design, default component, options : component|atomic|shopify|wordpress

As module

const wml = require('metabolism/wml-scaffold');

wml(params).process()
	.then(function(result) {
    	console.log(result);
	done();
	})
	.catch(function(error) {
		console.log(error);
	});

complete list of parameters:

{
	output: './export',
	input: false,
	acf: {
		path: 'structure/acf',
		ignore: ['close', 'previous', 'next', 'scroll_down', 'header', 'footer']
	},
	type: 'vue-twig-scss',
	design: 'component',
	atomic:['page','organism','molecule','atom'],
	alias: {
		'description': 'text',
		'breadcrumb': 'nav',
		'thumbnail': 'image',
		'poster': 'image',
		'picto': 'icon'
	},
	rewrite: {
		'img': 'image',
		'email': 'mail',
		'url': 'link',
		'prev': 'previous'
	},
	components: ['slider', 'slide']
}

WML Syntax

Specify tag

component|tag(nav)
    

Specify type

From type defined in the structure folder

component|type(list)

Extend previously declared component

component|extend(nav)

Generate foreach loop

component|loop(3)

License

MIT

Keywords

wml

FAQs

Package last updated on 28 May 2025

Did you know?

Socket

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.

Install

Related posts