Skip to main content

vbuild

"Compile" your VueJS components (*.vue) to standalone html/js/css ... python only, no need of nodejs. And you can use python components with vbuild, in your vue/sfc files !!!

It's just an utility to extract HTML(template), SCRIPT and STYLE from a VUE/SFC component (*.vue). It won't replace webpack/nodejs/vue-cli, it fills the "Sometimes you have to work with the tools you have, not the ones you want." gap.

Available on pypi

Changelog

Features

import vbuild

c=vbuild.render("mycompo.vue")
#c=vbuild.render("vues/*.vue")
#c=vbuild.render( "c1.vue", "c2.vue" )
#c=vbuild.render( "c1.vue", "vues/*.vue" )

print( c.html )
print( c.script )
print( c.style )

#or 

print( c ) # all stuff in html tags

Main Goal

Its main purpose is to let you use components (.vue files) in your vuejs app, without a full nodejs stack. It's up to you to create your generator, to extract the things, and create your "index.html" file. It's a 4 lines of python code; example:

import vbuild
buf=readYourTemplate("index.tpl") # should contains a tag "<!-- HERE -->" that would be substituted
buf=buf.replace("<!-- HERE -->",str( vbuild.render( "vues/*.vue" ) ) )
writeYourTemplate("index.html",buf)

(a real example of rendering vue/sfc components, using vbuild and the marvelous wuy)

Vue/sfc component compatibility

All classical JS vue/sfc components are compatibles. But now, you can use python component too.

Here is, side by side, the same component (in js, and in python):

To use the full features of vbuild

If you want to use the full features, you'll need to install the optionnal's libs.

sudo pip install pyscss lesscpy closure

All theses libs works with py2 and/or py3, and you could use the ccs-pre-processors SASS and LESS, and closure to minify js.

TODO

Metadata

Release files for vbuild 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vbuild 0.7.0
File Size Uploaded
vbuild-0.7.0.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vbuild 0.7.0
File Interpreter ABI Platform
vbuild-0.7.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 16.1 kB

Release files / vbuild-0.7.0.tar.gz

Download URL vbuild-0.7.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
78ea5d799bf56e24f93d04533a40b6c53254b77012fa678d9c33378dd1e06d3b
BLAKE2b-256 checksum
How to use checksums
f7ab6cf74161158c2db4dad64f15f7b845ec0d405ae2540d1885bd53a7212f29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

Release files / vbuild-0.7.0-py2.py3-none-any.whl

Download URL vbuild-0.7.0-py2.py3-none-any.whl
Size 8.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c9dcf0ce21907fded04c3a0978ee42c058fe41785bfaa455d87a8dc28adb9aa2
BLAKE2b-256 checksum
How to use checksums
9b39d48be5c32bfe0e56fbce35ca2141887ca682e8ec306afc24c39c6ee63796
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

Release history Release notifications | RSS feed

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

This release

0.7.0 This release

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.3

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page