0.4.5 • Published 6 years ago

freshjs-core v0.4.5

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Fresh.js

Fresh.js is a rendering framework started as an experiemental project to understand current rendering frameworks like React & Vue.

freshjs-core

This is the core framework for Fresh.js. This is all you need to work with Fresh.js.

Installing

Dependencies

npm install -s babel-cli@6.26.0 babel-core@6.26.3 babel-plugin-syntax-jsx@6.18.0 babel-plugin-transform-react-jsx@6.24.1 babel-preset-react@^6.24.1 

Fresh.js Core

npm install -s freshjs-core

Configure Babel

$ touch .babelrc
$ echo "{\"presets\": [\"react\"],\"plugins\": [\"babel-plugin-syntax-jsx\",[\"babel-plugin-transform-react-jsx\",{ \"pragma\": \"Fresh.dom\" }]]}" > . .babelrc

Usage

// ES6
import Fresh from 'freshjs-core';

class App extends Fresh.Element {
    constructor() {
        super();
    }
    
    template() {
        return <div>It's Fresh</div>
    }
}

Fresh.render(App, document.querySelector('#app'));

Running ( with Parcel )

$ parcel public/index.html --out-dir dist
Server running at http://localhost:1234
✨  Built in 643ms.

Recommendations

Fresh.js was developed and tested using the Parcel. While it is absolutely possible to use Webpack, I currently do not have instructions ready for such an actively-developed and growing framework, but it's on the list.

0.4.5

6 years ago

0.4.4-a

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago