GithubHelp home page GithubHelp logo

polythene-mithril-setup's Introduction

Polythene for Mithril setup example

Compatible with Mithril 1.x and 2.x, Webpack 4 and Babel 7.

Minimal setup example how to create a Polythene app for Mithril.

Setup

Init:

npm install

Start development server (port 3000):

npm run dev

Build:

npm run build

View with gzip compression:

http-server -g -p 8080 dist/

You may need to install http-server:

npm install -g http-server

See also

polythene-mithril-setup's People

Contributors

arthurclemens avatar dependabot[bot] avatar hnakamur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

polythene-mithril-setup's Issues

Not a issue, just a question on 'watch' changes

Thanks Arthur for your great job!
I an new with mithril and your setup is the best point to start with Polythen and mithril.

Just setting up the project folders and add somo of the scripts you use in other Polythene projects like

    "watch": "node scripts/transpile.es6 watch app node_modules",
    "transpile": "node scripts/transpile.es6 once app node_modules",
    "build": "node scripts/build.es6" 

I see the transpiled files are in the same folder with the source files, but build just bundle all in a single file.
If i run http-server the app is ok

But if i want to 'watch' my changes, and edit my index.htmlto the script in app/index/index.js (transpiled) not to the bundle file. One error appear on the browser console.

index.es6:1 Uncaught ReferenceError: require is not defined

How i can 'watch' my changes without that error?
Is it posible?

Again, thanks for your fabulous work

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.