vbuild


Namevbuild JSON
Version 0.8.2 PyPI version JSON
download
home_pagehttps://github.com/manatlan/vbuild
SummaryA simple module to extract html/script/style from a vuejs '.vue' file (can minimize/es2015 compliant js) ... just py2 or py3, NO nodejs !
upload_time2023-08-03 09:26:36
maintainer
docs_urlNone
authormanatlan
requires_python>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
licenseMIT
keywords vuejs vue html javascript style minimize es2015
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # vbuild

"Compile" your [VueJS](https://vuejs.org/) components (*.vue) to standalone html/js/css ... python only, **no need of nodejs**. And you can use [python components](https://github.com/manatlan/vbuild/blob/master/doc/PyComponent.md) with **vbuild**, in your vue/sfc files !!!

It's just an utility to [generate](https://github.com/manatlan/vbuild/blob/master/doc/generate.md) HTML(template), SCRIPT and STYLE from a [VUE/SFC component]((https://fr.vuejs.org/v2/guide/single-file-components.html)) (*.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.

[DEMO](https://manatlan.alwaysdata.net/vbuild/)

[Available on pypi](https://pypi.org/project/vbuild/)

[Changelog](https://github.com/manatlan/vbuild/blob/master/changelog.md)

## Features

 * **NO node-js stack**, only pure python (py2 or py3 compliant)
 * Ability to use [python components](https://github.com/manatlan/vbuild/blob/master/doc/PyComponent.md)
 * Components can be styled with [SASS or LESS ccs-pre-processors](https://github.com/manatlan/vbuild/blob/master/doc/CssPreProcess.md) !
 * Provide a [JS-minifier (ES5 compliant JS, via closure)](https://github.com/manatlan/vbuild/blob/master/doc/minimize.md)
 * Ability to [post process stuff](https://github.com/manatlan/vbuild/blob/master/doc/PostProcess.md), with your own processors
 * Respect [VueJs specs](https://vue-loader.vuejs.org/spec.html) (at least one template tag, many style (scoped or not) tags)
 * `templates` are converted to a `<script type="text/x-template" id="XXX"></script>` (not converted to JS)
 * Unittested (coverage 100%)
 * no import/from ! 
 

```python
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:

```python
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](https://github.com/manatlan/wuy/tree/master/examples/vueapp) of rendering vue/sfc components, using **vbuild** and the marvelous [wuy](https://github.com/manatlan/wuy))


## Vue/sfc component compatibility

All classical JS vue/sfc components are compatibles. But now, you can use [python component](https://github.com/manatlan/vbuild/blob/master/doc/PyComponent.md) too. 

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

<image src="https://raw.githubusercontent.com/manatlan/vbuild/master/doc/vs.png"/>

## 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 [css-pre-processors SASS and LESS](https://github.com/manatlan/vbuild/blob/master/doc/CssPreProcess.md), and [closure to minify js](https://github.com/manatlan/vbuild/blob/master/doc/minimize.md).

## TODO

 * more utilities
 * more rock solid version
 * and docs !
 * add pyscss lesscpy closure to pip setup.py (optionnal's modules)
 * see the [TODO list for python components too](https://github.com/manatlan/vbuild/blob/master/doc/PyComponent.md)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/manatlan/vbuild",
    "name": "vbuild",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*",
    "maintainer_email": "",
    "keywords": "vuejs,vue,html,javascript,style,minimize,es2015",
    "author": "manatlan",
    "author_email": "manatlan@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/22/be/f0c6204a36440bbcc086bfa25964d009b7391c5a3c74d6e73188efd47adb/vbuild-0.8.2.tar.gz",
    "platform": null,
    "description": "# vbuild\n\n\"Compile\" your [VueJS](https://vuejs.org/) components (*.vue) to standalone html/js/css ... python only, **no need of nodejs**. And you can use [python components](https://github.com/manatlan/vbuild/blob/master/doc/PyComponent.md) with **vbuild**, in your vue/sfc files !!!\n\nIt's just an utility to [generate](https://github.com/manatlan/vbuild/blob/master/doc/generate.md) HTML(template), SCRIPT and STYLE from a [VUE/SFC component]((https://fr.vuejs.org/v2/guide/single-file-components.html)) (*.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.\n\n[DEMO](https://manatlan.alwaysdata.net/vbuild/)\n\n[Available on pypi](https://pypi.org/project/vbuild/)\n\n[Changelog](https://github.com/manatlan/vbuild/blob/master/changelog.md)\n\n## Features\n\n * **NO node-js stack**, only pure python (py2 or py3 compliant)\n * Ability to use [python components](https://github.com/manatlan/vbuild/blob/master/doc/PyComponent.md)\n * Components can be styled with [SASS or LESS ccs-pre-processors](https://github.com/manatlan/vbuild/blob/master/doc/CssPreProcess.md) !\n * Provide a [JS-minifier (ES5 compliant JS, via closure)](https://github.com/manatlan/vbuild/blob/master/doc/minimize.md)\n * Ability to [post process stuff](https://github.com/manatlan/vbuild/blob/master/doc/PostProcess.md), with your own processors\n * Respect [VueJs specs](https://vue-loader.vuejs.org/spec.html) (at least one template tag, many style (scoped or not) tags)\n * `templates` are converted to a `<script type=\"text/x-template\" id=\"XXX\"></script>` (not converted to JS)\n * Unittested (coverage 100%)\n * no import/from ! \n \n\n```python\nimport vbuild\n\nc=vbuild.render(\"mycompo.vue\")\n#c=vbuild.render(\"vues/*.vue\")\n#c=vbuild.render( \"c1.vue\", \"c2.vue\" )\n#c=vbuild.render( \"c1.vue\", \"vues/*.vue\" )\n\nprint( c.html )\nprint( c.script )\nprint( c.style )\n\n#or \n\nprint( c ) # all stuff in html tags\n\n```\n\n## Main Goal\n\nIts 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:\n\n```python\nimport vbuild\nbuf=readYourTemplate(\"index.tpl\") # should contains a tag \"<!-- HERE -->\" that would be substituted\nbuf=buf.replace(\"<!-- HERE -->\",str( vbuild.render( \"vues/*.vue\" ) ) )\nwriteYourTemplate(\"index.html\",buf)\n```\n\n([a real example](https://github.com/manatlan/wuy/tree/master/examples/vueapp) of rendering vue/sfc components, using **vbuild** and the marvelous [wuy](https://github.com/manatlan/wuy))\n\n\n## Vue/sfc component compatibility\n\nAll classical JS vue/sfc components are compatibles. But now, you can use [python component](https://github.com/manatlan/vbuild/blob/master/doc/PyComponent.md) too. \n\nHere is, side by side, the same component (in js, and in python):\n\n<image src=\"https://raw.githubusercontent.com/manatlan/vbuild/master/doc/vs.png\"/>\n\n## To use the full features of vbuild\n\nIf you want to use the full features, you'll need to install the optionnal's libs.\n\n```\nsudo pip install pyscss lesscpy closure\n```\n\nAll theses libs works with py2 and/or py3, and you could use the [css-pre-processors SASS and LESS](https://github.com/manatlan/vbuild/blob/master/doc/CssPreProcess.md), and [closure to minify js](https://github.com/manatlan/vbuild/blob/master/doc/minimize.md).\n\n## TODO\n\n * more utilities\n * more rock solid version\n * and docs !\n * add pyscss lesscpy closure to pip setup.py (optionnal's modules)\n * see the [TODO list for python components too](https://github.com/manatlan/vbuild/blob/master/doc/PyComponent.md)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A simple module to extract html/script/style from a vuejs '.vue' file (can minimize/es2015 compliant js) ... just py2 or py3, NO nodejs !",
    "version": "0.8.2",
    "project_urls": {
        "Documentation": "https://github.com/manatlan/vbuild",
        "Homepage": "https://github.com/manatlan/vbuild",
        "Repository": "https://github.com/manatlan/vbuild"
    },
    "split_keywords": [
        "vuejs",
        "vue",
        "html",
        "javascript",
        "style",
        "minimize",
        "es2015"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a63d7b22abbdb059d551507275a2815bc2b1974e3b9f6a13781c1eac9e858965",
                "md5": "efe6e500ea4fa92463e47d0a4bb94d05",
                "sha256": "d76bcc976a1c53b6a5776ac947606f9e7786c25df33a587ebe33ed09dd8a1076"
            },
            "downloads": -1,
            "filename": "vbuild-0.8.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "efe6e500ea4fa92463e47d0a4bb94d05",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*",
            "size": 9371,
            "upload_time": "2023-08-03T09:26:35",
            "upload_time_iso_8601": "2023-08-03T09:26:35.023455Z",
            "url": "https://files.pythonhosted.org/packages/a6/3d/7b22abbdb059d551507275a2815bc2b1974e3b9f6a13781c1eac9e858965/vbuild-0.8.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "22bef0c6204a36440bbcc086bfa25964d009b7391c5a3c74d6e73188efd47adb",
                "md5": "d7797345d0741ab8b88d68a874b88ba8",
                "sha256": "270cd9078349d907dfae6c0e6364a5a5e74cb86183bb5093613f12a18b435fa9"
            },
            "downloads": -1,
            "filename": "vbuild-0.8.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d7797345d0741ab8b88d68a874b88ba8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*",
            "size": 8937,
            "upload_time": "2023-08-03T09:26:36",
            "upload_time_iso_8601": "2023-08-03T09:26:36.196730Z",
            "url": "https://files.pythonhosted.org/packages/22/be/f0c6204a36440bbcc086bfa25964d009b7391c5a3c74d6e73188efd47adb/vbuild-0.8.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-03 09:26:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "manatlan",
    "github_project": "vbuild",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "vbuild"
}
        
Elapsed time: 1.22007s