Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Upgrading Guide

Dimitrios Zorbas edited this pageFeb 21, 2017 ·5 revisions

This document contains changes required to overcome incompatibilitiesintroduced between released versions.

0.5.1

This version packages the core Kitto JavaScript library so that it can be easier to beupdated without having to manually copy files.

Download and run the update script.

via curl

sh -c"$(curl -fsSL https://gist.githubusercontent.com/Zorbash/eaffc7e24f86eac476506e62be8797dd/raw/2c43ac2d0e0f5d625e1424952578df805581c6dd/kitto_updater.sh)"

The script will download the latest versions of the core widgets (the ones that were generatedwithmix kitto.new) andwill not keep backups of the existing sources of those widgets.Hopefully you're using a version control system like git and having made any changes to thosefiles, it will be quite simple to keep only what you deem necessary.

application.js

It has changed to import the packaged kitto library.

import '../stylesheets/application.scss';import $ from 'jquery';import {Kitto} from 'kitto';window.jQuery = window.$ = $;Kitto.start();

assets/javascripts/{widget,helpers}.js

They are no longer required and they should be removed

package.json

Change:7c5ea0f

You package.json has to include "kitto": "file:deps/kitto" in the dependencies section.

Widgets

Widgets have been updated to work with the packaged Kitto JavaScript library.From now on custom widgets should requireWidget as follows:

// Before 0.5.1importWidgetfrom'../../assets/javascripts/widget';// >= 0.5.1import{Widget}from'kitto';

Widgets no longer need to import helper functions like:

import {updatedAt, truncate} from '../../assets/javascripts/helpers';

All core helper functionsupdatedAt,shortenedNumber,prettyNumber,prepend,append,truncateare now available as instance methods of Widget.

// This<pclassName="updated-at">{updatedAt(this.state.updated_at)}</p>// Becomes<pclassName="updated-at">{this.updatedAt(this.state.updated_at)}</p>

You can still import the Helpers module for use outside the scope of a Widget like:

import {Helpers} from 'kitto';

0.3.0 -> 0.3.2

Umbrella Apps Asset Serving on Production

See:#77

Umbrella apps have to change their config/config.exs adding:

config :kitto, otp_app: :name_of_your_app

Example:

For a dashboard generated withmix kitto.new photos the value of:otp_app must be:photos

0.3.0 -> 0.3.1

Error pages

Dashboard apps generated using the 0.3.1 installer include pages which are missing from previous versions.To get them run:

curl https://raw.githubusercontent.com/kittoframework/kitto/master/installer/templates/new/dashboards/error.html.eex > dashboards/error.html.eex

from the root path of your dashboard app.

Layout

In/dashboards/layout.html.eex (which is the default layout) change<%= template %> to<%= @template %>.

If you've set the:default_layout configto a different layout file, apply this change accordingly.

See:a539f37c3468

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp