The only cross-platform browser that fits in a Gist!
One line install. Works on Linux, MacOSX and Windows.
$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
| require 'rake' | |
| require 'css_splitter' | |
| desc 'split css files' | |
| namespace :css do | |
| task :split do | |
| infile = ENV['infile'] || raise("missing infile") | |
| outdir = ENV['outdir'] || File.dirname(infile) | |
| max_selectors = ENV['max_selectors'] || 4095 |
| /* | |
| * Flyspeck is Dependency Injection Container. | |
| * | |
| * Copyright (c) 2014 Anton Medvedev | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is furnished |
While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.
| flo = flow | |
| // Add method signature and arguments to be invoked | |
| .add(/* [name, ]function[, arguments...] */) | |
| // Attach thenable to previous method signature | |
| .then(function () { | |
| // skip(/* string name | int groups */) | |
| flo.skip('name') // this.skip vs flo.skip vs (skip argument on argument list, after next) | |
| // next(/* string name | int group */) |
| " Make IE Better Compatible " | |
| <!--[if IE]> | |
| <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> | |
| <![endif]--> | |
| ====================================================== | |
| IE6 Only | |
| ================== | |
| _selector {...} |
| function pify (method, context) { | |
| var resolver, rejector | |
| var error, success | |
| var done = false | |
| var promise = { | |
| then: function (a) { | |
| if (!done && success != null) done = true, a(success); else resolver = a | |
| return { catch: promise.catch } | |
| }, |
Document for the best design choices you can make for your software.
Terminology
components containing all component files.File Structure
Structuring applications is hard, here are a few resources to help.
This gist documents the setup I originally used to run visual diffs on the MDC Web demo pages for testing material-components/material-components-web#1285, but I have used it since then on other projects.
npm i