<commit_before>(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
//	Various utilities that normalise usage between client and server
//	This is the client version
//	See /server/miso.util.js for server version
var m = require('mithril');

module.exports = {
	//	Are we on the server?
	isServer: function() {
		return false;
	},
	readyBinder: function(){
		var bindings = [];
		return {
			bind: function(cb) {
				bindings.push(cb);
			},
			ready: function(){
				for(var i = 0; i < bindings.length; i += 1) {
					bindings[i]();
				}
			}
		};
	},
	//	Get parameters for an action
	getParam: function(key, params){
		return m.route.param(key);
	}
};
},{"mithril":7}],2:[function(require,module,exports){
var m = require('mithril');

module.exports = function(scope) {

	//	Remove any unrequired model data, and get actual values
	var getModelData = function(model){
		var i, result = {};
		for(i in model) {if(model.hasOwnProperty(i)) {
			if(i !== "isValid") {
				result[i] = (typeof model[i] == "function")? model[i](): model[i];
			}
		}}
		return result;
	};

	return {
		load: function load(type, id) {
			if (!type) {
				throw new Error('no type provided to load model');
			}
			if (!id) {
				throw new Error('no id provided to load model');
			}
			//	TODO: Make this use the API!
			return m.request({
				method: 'GET',
				//url: 'api/' + type + '/' + id),
				url: '/user.json'
			});
		},
		save: function(type, model){
			var v = model.isValid(),
				data;
			//	Only try to save if model is valid
			if(v === true) {
				data = getModelData(model);
				console.log('Save', type, data);
				return m.request({
					method: 'POST',
					url: '/api/' + type,
					data: data
					//url: '/user.json'
				});
			} else {
				//	TODO: Show notification via notification framework
				console.log('Model invalid', v);
			}
		}
	};
};
},{"mithril":7}],3:[function(require,module,exports){
var m = require('mithril'),
	sugartags = require('../server/mithril.sugartags.node.js')(m);

//	Home page
module.exports.index = {
	controller: function(){
		this.installButton = "Install miso now";
		this.installButtonLink = "#install";
		//this.introText = "Create apps faster than ever before";
		this.introText = "Create tiny efficient isomorphic JS apps in a snap!";
		return this;
	},
	view: function(ctrl){
		with(sugartags) {
			return DIV([
				DIV({ class: "intro" }, [
					DIV({ class: "introText" }, ctrl.introText ),
					BUTTON({ class: "installButton" }, ctrl.installButton ),
				]),
				DIV({ class: "box" }, [
					H2(A({name: "installation", class: "heading"},"Installation") ),
					P("To install miso, use npm:"),
					PRE({ class: "javascript" },[
						CODE("npm install misojs -g")
					])
				]),
				DIV({ class: "box" }, [
					H2(A({name: "gettingstarted", class: "heading"},"Getting started") ),
					P("To create and run a new app in the current directory:"),
					PRE({ class: "javascript" },[
						CODE("miso -n myApp\ncd myApp\nmiso run")
					]),
					P("Congratulations, you are now running your very own miso app!")
				]),
				DIV({ class: "box" }, [
					UL([
						LI(A({ href: '/user/1', config: m.route}, "User edit example")),
						LI(A({ href: '/todos', config: m.route}, "Todos example"))
					])
				])
			]);
		}
	}
};
},{"../server/mithril.sugartags.node.js":11,"mithril":7}],4:[function(require,module,exports){
/* NOTE: This is a generated file, please do not modify it, your changes will be lost */
var m = require('mithril');
var sugartags = require('../server/mithril.sugartags.node.js')(m);
var bindings = require('../server/mithril.bindings.node.js')(m);<commit_msg>Fix install instructions<commit_after>(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
//	Various utilities that normalise usage between client and server
//	This is the client version
//	See /server/miso.util.js for server version
var m = require('mithril');

module.exports = {
	//	Are we on the server?
	isServer: function() {
		return false;
	},
	readyBinder: function(){
		var bindings = [];
		return {
			bind: function(cb) {
				bindings.push(cb);
			},
			ready: function(){
				for(var i = 0; i < bindings.length; i += 1) {
					bindings[i]();
				}
			}
		};
	},
	//	Get parameters for an action
	getParam: function(key, params){
		return m.route.param(key);
	}
};
},{"mithril":7}],2:[function(require,module,exports){
var m = require('mithril');

module.exports = function(scope) {

	//	Remove any unrequired model data, and get actual values
	var getModelData = function(model){
		var i, result = {};
		for(i in model) {if(model.hasOwnProperty(i)) {
			if(i !== "isValid") {
				result[i] = (typeof model[i] == "function")? model[i](): model[i];
			}
		}}
		return result;
	};

	return {
		load: function load(type, id) {
			if (!type) {
				throw new Error('no type provided to load model');
			}
			if (!id) {
				throw new Error('no id provided to load model');
			}
			//	TODO: Make this use the API!
			return m.request({
				method: 'GET',
				//url: 'api/' + type + '/' + id),
				url: '/user.json'
			});
		},
		save: function(type, model){
			var v = model.isValid(),
				data;
			//	Only try to save if model is valid
			if(v === true) {
				data = getModelData(model);
				console.log('Save', type, data);
				return m.request({
					method: 'POST',
					url: '/api/' + type,
					data: data
					//url: '/user.json'
				});
			} else {
				//	TODO: Show notification via notification framework
				console.log('Model invalid', v);
			}
		}
	};
};
},{"mithril":7}],3:[function(require,module,exports){
var m = require('mithril'),
	sugartags = require('../server/mithril.sugartags.node.js')(m);

//	Home page
module.exports.index = {
	controller: function(){
		this.installButton = "Install miso now";
		this.installButtonLink = "#install";
		//this.introText = "Create apps faster than ever before";
		this.introText = "Create tiny efficient isomorphic JS apps in a snap!";
		return this;
	},
	view: function(ctrl){
		with(sugartags) {
			return DIV([
				DIV({ class: "intro" }, [
					DIV({ class: "introText" }, ctrl.introText ),
					BUTTON({ class: "installButton" }, ctrl.installButton ),
				]),
				DIV({ class: "box" }, [
					H2(A({name: "installation", class: "heading"},"Installation") ),
					P("To install miso, use npm:"),
					PRE({ class: "javascript" },[
						CODE("npm install misojs -g")
					])
				]),
				DIV({ class: "box" }, [
					H2(A({name: "gettingstarted", class: "heading"},"Getting started") ),
					P("To create and run a new app in the current directory:"),
					PRE({ class: "javascript" },[
						CODE("miso -n myApp\ncd myApp && npm install\nmiso run")
					]),
					P("Congratulations, you are now running your very own miso app!")
				]),
				DIV({ class: "box" }, [
					UL([
						LI(A({ href: '/user/1', config: m.route}, "User edit example")),
						LI(A({ href: '/todos', config: m.route}, "Todos example"))
					])
				])
			]);
		}
	}
};
},{"../server/mithril.sugartags.node.js":11,"mithril":7}],4:[function(require,module,exports){
/* NOTE: This is a generated file, please do not modify it, your changes will be lost */
var m = require('mithril');
var sugartags = require('../server/mithril.sugartags.node.js')(m);
var bindings = require('../server/mithril.bindings.node.js')(m);
{'fraction_non_alphanumeric': 0.1968058968058968, 'fraction_numerical': 0.004668304668304668, 'mean_word_length': 3.5177580466148726, 'pattern_counts': {'":': 8, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2917626', 'n_tokens_mistral': 3387, 'n_tokens_neox': 2857, 'n_words': 709}