Skip to content

A Python3/Binary script to convert `.html`, and `.css` structure into `.vue` structure.

Notifications You must be signed in to change notification settings

TokenChingy/vueify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vueify

A Python3/Binary script to convert .html, and .css structure into .vue structure recursively in a directory.

Table of Contents

Compilation

  1. Make sure you have Python3, Nuitka, and a compatiable C compiler installed.
  2. Run the build.sh script with the path of the python source code as the only argument: ./build.sh vueify.py.
  3. This will create a ./dist directory containing the vueify binary and resource files.

Usage

Bootstrap Studio

  1. Open Bootstrap Studio.
  2. Open the Export Settings dialogue.
  3. Expand the Advanced area.
  4. Browse and select the vueify binary.
  5. Run your export as normal.

Standalone (Python3)

  1. Open a terminal.
  2. Navigate to the directory containing vueify.py.
  3. Execute the following: python vueify.py directory_containing_html_files.

Standalone (Binary)

  1. Open a terminal.
  2. Navigate to the directory containing vueify binary.
  3. Execute the following: ./vueify directory_containing_html_files.

Example

If the .vue does not exist, it will create a new one, else it will only replace the <template></template> contents. Not all files will work – if there are unknown encodings, vueify will fail.

example.html:

<html>
  <head>
    <title>An example</title>
    <meta charset="utf-8">
  </head>
  <body>
    <div>
      <p>Hello World!</p>
    </div>
  </body>
</html>

./assets/css/example.css

.a {
  color: red;
}

.b > .a {
  color: blue;
}

example.vue:

<!-- HTML -->
<template>
  <div>
    <p>Hello World!</p>
  </div>
</template>
<!-- JS -->
<script>
export default {}
</script>
<!-- CSS -->
<style scoped="">
.a {
  color: red;
}

.b > .a {
  color: blue;
}
</style>

About

A Python3/Binary script to convert `.html`, and `.css` structure into `.vue` structure.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published