Skip to content

Sandbox

JRichardsz edited this page Sep 15, 2024 · 3 revisions

https://stackoverflow.com/questions/31945763/how-to-tell-webpack-dev-server-to-serve-index-html-for-any-route

const compilerRun = util.promisify(compiler.run).bind(compiler);


LinkStart.js


A JavaScript framework for creating web applications in an fast, simple and intuitive way focus on productivity inspired in swing, spring and my beloved java.

LinkStart.js applications are built by composing a series of simple html page templates + javascript page listener.

Features

  • Pure html. Forgot alien tags or attributes:
    • <App> <MuiThemeProvider> <app-navigation> *ngIf="!authService.isLoggedIn()" <Drawer open containerStyle={{ position: null }}>
  • Just your web code. Forgot alien files .babelrc .eslintrc tslint.json .etc
  • @Annotattions like java
  • Dependency Injection like java
  • Automatic actionable elements detection
  • Automatic router binding

Demo

Check the first demo:

How it works?

  • Coming Soon

Road map

https://www.mulesoft.org/docs/site/current3/apidocs/org/mule/component/DefaultComponentLifecycleAdapter.html

Initialisable
Startable
Stoppable
Disposable
@DefaultAction(name="helloWorldAction", entrypoint="true", route="hello"  )

[Controller(entrypoint="true")]
function HelloWorldController() {

  @Render
  @Autowire(name="helloWorldPage")
  this.page;

  @HtmlElementsAllForOne
  [HtmlElements]
  this.user;

  @HtmlElement(id="firstName")
  this.firstNameInputTextElement;

  @HtmlElement(id="lastName")
  this.lastNameInputTextElement;  

  [OnLoad]
  this.onLoad = () => {
    console.log("onLoad: Hello World!!");
  };

  [Render]
  this.render = () => {
    return this.page.getHtml();
  }; 

  [PostRender]
  this.postRender = () => {
    console.log("afterLoad: Hello World!!");

    var hamburgers = document.querySelectorAll(".hamburger");
    if (hamburgers.length > 0) {
      hamburgers.forEach(function(hamburger, i) {
        hamburger.addEventListener("click", function() {
          this.classList.toggle("is-active");
        }, false);
      });
    }
  };  

  @ActionListener(tagId="sendButton", type="onclick")
  [Listener(tagId="sendButton", type="onclick")]
  this.sendButtonListener = (e) => {
    console.log("You clicked me at:"+new Date());
    console.log(this.user);
  };

}

module.exports = HelloWorldAction;

Acknowledgments

Contributors


Richard Leon

Since

  • 2018

Clone this wiki locally