freshjs-core
v0.4.5
Published
> **Fresh.js** is a rendering framework started as an experiemental project to understand current rendering frameworks like React & Vue.
Downloads
6
Maintainers
Readme
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 [email protected] [email protected] [email protected] [email protected] 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.