Giter VIP home page Giter VIP logo

meteor-fresh's People

Contributors

cjsauer avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

meteor-fresh's Issues

Less/CSS rules need to be scoped

When a package is loaded, all of it's Less files are compiled and sent to the client. This forces the rules to be applied to every template/layout across all packages. It's necessary to scope these rules on a per template or layout basis so that the rules only apply exactly where you mean them to be.

For example:

@import (reference) url('/packages/app-bootstrap/theme.bootstrap.less');

#homepage {
  h1.fresh {
    margin-top: 2em;
    text-align: center;
    font-size: 6em;
    color: @gray-light;
  }
}

and then in a template:

<template name="home">
  <div id="homepage">  
    <div class="row">
      <h1 class="fresh">Enjoy your fresh start.</h1>
    </div>
  </div>
</template>

Now these CSS rules will only be applied to that specific template. The same applies to layouts. For example, you might scope the app to the rule #app and wrap your layout in <div id="app"> tags. You might scope your admin layout rules within #admin and wrap your admin template with <div id="admin" tags. Now you can have separate rules for both layouts.

This also requires that we don't define layout: 'layout' globally within Iron Router, but on a per-route basis. Otherwise the template used as the layout will depend on package load order, which isn't expected behavior. This could be easily solved using route groups to keep things DRY.

Update bootstrap

Bootstrap version 3.3.5 has been released. I need to update the app:bootstrap package from v3.3.4

Create a yeoman generator

I will probably do this tomorrow but it would be cool to use the yeoman generator in stead of manually having to remove the .git folder

Include package-kitchen

Since this is package-based, you should include package-kitchen. It lets you easily add packages by just going to http://localhost:3000/kitchen. I've found it much more usable than meteor create --package in my package-based app.

Jasmine tests logging an error in the console

Upon starting up the app and navigating to the homepage, the following error is logged:

Exception in setTimeout callback: TypeError: Cannot read property 'match' of undefined
    at translateUrl (http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:2780:24)
    at toSockjsUrl (http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:2830:10)
    at _.extend._launchConnection (http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:2708:30)
    at new LivedataTest.ClientStream (http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:2582:8)
    at new Connection (http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:3522:20)
    at Object.DDP.connect (http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:5090:13)
    at http://localhost:3000/packages/sanjo_jasmine.js?46996959cf65cb76c4b8a9c4a65eaf702d790e8a:4236:35
    at _.extend.withValue (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:955:17)
    at withoutInvocation (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:435:45)
    at Meteor.bindEnvironment (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:983:22)

Less files are being imported multiple times

By importing in this way (in home.less for example):

@import url('/packages/app-bootstrap/theme.bootstrap.less');

we are accidentally including bootstrap and theme styles every single import. The workaround is this:

@import (reference) url('/packages/app-bootstrap/theme.bootstrap.less');

In this way we get the variables only without actually including the styles again.

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.