An open API service indexing awesome lists of open source software.

https://github.com/ronaldaug/rsfc

Resuable Single File Component
https://github.com/ronaldaug/rsfc

Last synced: about 1 month ago
JSON representation

Resuable Single File Component

Awesome Lists containing this project

README

        

## Reusable Single File Component

> RSFC is a component end with **.html** as you always code. It's very easy to reuse, re-code and extend.

#### How it work?
> RSFC merge all your **.html** files from the components directory and generate a website.

----

#### How to use it?
- Download RSFC
- Put **.html** files (components) into `/components/` directory.
- `npm install`
- `npm run start`
- Load **.html** files fom **components** directory and generate it.

----

In every **.html** (component) file must have three parts.

Part 1 - CSS codes
```css

/* css codes */

```

Part 2 - HTML codes
```html



```
> Make sure to add a **unique section id**, e.g ``

Part 3 - JS codes
```javascript

// javascript codes

```
----

## FAQ
Will it crash or confuse with HTML headers codes and external `js/css` links?
> No, it will leave HTML headers codes and copy all script/css links.

---
## Tools and Libraries used in RSFC

- beautify js
- ace.js code editor
- jszip
- filesaver
- html5sortable

---
Author - ronaldaug