Git Product home page Git Product logo

mmm's Introduction

notice this project has moved to a new home: git.s-ol.nu/mmm. This github archive will not be kept up-to-date.

mmm

mmm is not the www, because it runs on MoonScript.

live version at mmm.s-ol.nu.

What?

This repo is roughly split into three parts:

  • mmm.dom, mmm.component: polymorphic Lua/Moonscript modules for web development. [code: mmm - docs]
  • mmmfs: the CMS/FS powering mmm.s-ol.nu. [code: mmm/mmmfs - article]
  • the page contents: includes my portfolio, blog, experiments... authored using a mix of Moonscript, Markdown and HTML, thanks to the power of mmmfs. [data: root, but you might want to read a bit about mmmfs before you jump in.]

Running or Building

You can run the interactive server (build/server.moon):

$ moon build/server.moon fs

You can then view the website in your browser. It should be availabe at http://localhost:8000.

Alternatively, build/render_all.moon can be used to generate a static HTML version of a tree:

$ moon build/render_all.moon fs output-dir /root/path

The /root/path/ argument is optional and needs to be set if the generated HTML will not be served from the root / of a server (which is assumed per default).

Storage

The fs argument in the commands above specifies where and how the content is to be found. The argument consists first of the type of storage, and then optionally extra arguments separated by a colon (:). The following types are available:

  • fs:[path]: load a directory from the filesystem. + path is the path of the root directory, relative to the current directory. If omitted, defaults to root.
  • sql:[path]: load a SQLite3 database. + path is the path to the sqlite database file. If omitted, defaults to db.sqlite3.
  • sql:MEMORY: create an emptry in-memory SQLite3 database.

Dependencies

Required dependencies:

For unit tests:

  • busted: luarocks install busted

Not required but recommended:

  • lua-sqlite3: luarocks install sqlite3 (for SQLite3 backend)
  • lua-cjson: luarocks install lua-cjson 2.1.0-1 (for server-side JSON support)
  • discount: luarocks install discount (requires libmarkdown2, for Markdown support)
  • luaposix: luarocks install luaposix (for SASS support)

Live Reloading (during development)

entr is useful for reloading the realtime server when code outside the root changes:

$ ls {build,mmm}/**.moon | entr -r moon build/server.moon fs

mmm's People

Contributors

s-ol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.