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

blaze-sfc

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blaze-sfc

Blaze Single File Components

latest
Source
npmnpm
Version
1.0.18
Version published
Maintainers
0
Created
Source

blaze-sfc

This package implements single file component for meteor.js

Regular meteor approach is to put html, less and js into different files.

But having all in single file component is more visual.

Inspired by https://vuejs.org/v2/guide/single-file-components.html

Installation

npm i -g blaze-sfc

Usage

Put all code into file with .ui extension

example.ui

<template name="hacker">
  <div class="hacker">
    <h1 class="hacker_name">{{name}}</h1>
  </div>
</template>

<script>
  Template.hacker.helpers({
    name () {
      return 'Neo'
    }
  })
</script>

<style lang="less">
  .hacker_name {
    color: yellow;
    background-color: #333;
  }
</style>

meteor-sfc will parse example.ui and create at the same level:

example.html with handlebars templates
example.less with styles
example.js with scripts

Parse single file

meteor-sfc --file ./components/example.ui

note: you can add meteor-sfc as a filewatcher to webstorm IDE

Watch directory

meteor-sfc --dir ./components

Keywords

meteor

FAQs

Package last updated on 06 Aug 2024

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