GithubHelp home page GithubHelp logo

randominion's Introduction

randominion

Randomizer for dominion games. Runs either on Node or in a browser (optimized for mobile).

Still not entirely clear how to bridge the CJS/polymer/web gap, since we're going to keep all the business logic in CJS modules, but the UI is all polymer.

Development

Initializing the development environment

npm install

Production

npm install -g polymer-cli
polymer serve
polymer build
polymer test

It would be nice to package polymer-cli locally via package.json, but it includes 200MB of dependencies, which is pretty terrible.

There's also a Makefile, which we should hopefully beef up at some point. We'll also need a gh-pages push script. (Can we get make to keep npm and bower up to date, too?)

TODO

Polymer doesn't have decent support for loading CSS from *.css files. Consider implementing a way to use make and source maps to generate the imported *.html file from a *.less and a *.dom.html file. We'd also want a tool that would auto-run make when needed based on inotify. (Cf. make -p or make -rp to get the full database.) lessc has options to output sourcemap, which can be referenced in an inline CSS comment, but there seems to be problems with the alignment, for some reason.

lessc --source-map-less-inline --source-map-map-inline c.less c.css

NOTE: source map expects the generated line numbers for the entire HTML file, rather than the script tag. Thus, we need to insert a bunch of semicolons before we embed the source map. This is doable, but will be a bit more of a pain. And will be easiest without any base64 encoding.

<link rel="stylesheet/less" type="text/css" href="c.less" />

We could search for this sort of link tag and replace it with the inline-source-map generated CSS. Restrictions about showing up exactly like this? Only thing on a line? ....?

Potentially it's easy to instead generate the style-module, which will have a known number of added lines, and can then be imported as normal. This prevents needing the .dom.html file, which was ugly as anything.

See also less/less.js#2715 - currently to support @apply we need to write

:host {
  -:~";--mixin: {";
    prop: value;
  -:~";}";
}

We could possibly catch this on the way in and fix it up so that it "just works" before sending it through to lessc...

In any case, vulcanize --strip should do a fine job in stripping these source maps (which would be bad if we needed to debug...)

For makei (remake? seems to be already taken) we should be able to do a make -dn $TARGET for each given target, and then parse the output for which dependents are checked.

randominion's People

Contributors

shicks avatar

Watchers

 avatar James Cloos 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.