{"name":"parasails","version":"0.3.2","description":"Lightweight structures for apps with more than one page.","author":{"name":"Mike McNeil"},"keywords":["parasails","vue.js-framework","component-framework","vue.js","ui","vue","browser","sails"],"license":"MIT","dependencies":{},"main":"dist/parasails.js","unpkg":"dist/parasails.js","jsdelivr":"dist/parasails.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/mikermcneil/parasails.git"},"gitHead":"752ba00b15b4c3b33efbedfd98b5411a1783f6b6","bugs":{"url":"https://github.com/mikermcneil/parasails/issues"},"homepage":"https://github.com/mikermcneil/parasails#readme","_id":"parasails@0.3.2","_npmVersion":"5.2.0","_nodeVersion":"8.1.2","_npmUser":{"name":"mikermcneil","email":"npm@sailsjs.com"},"dist":{"integrity":"sha512-QJsQmyiTJRUdKCytQUhFb92c5cnuJsEgHpI5zDWogLWu4CYPQ0Aakxz+1kLI4qqqo4S4yvzAu7ZKKzvyObF5tg==","shasum":"770afe7579894a5b54de89614687d6f88802fe72","tarball":"http://registry-npm.ywwl.com/parasails/download/parasails-0.3.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBYKXuqLnhHmcIvn0XZUo2+fb8l3LHcLRCI32NJhVt2AIgBTirE4dNgL9k+INRwRYNyz2kt/YBVHG4TxZcDW6X+sY="}],"size":10282,"noattachment":false,"key":"/parasails/-/parasails-0.3.2.tgz"},"maintainers":[{"name":"mikermcneil","email":"npm@sailsjs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parasails-0.3.2.tgz_1508458670450_0.9539658208377659"},"directories":{},"readme":"# parasails\n\nLightweight structures for apps with more than one page.  Built on top of [Vue.js](https://vuejs.org).\n\nWhile it can be used with any module system, this library does not rely on Webpack, Babel, Gulp, Grunt, Brunch, or any other build system or transpiler.  It is **2.96KB minified and gzipped** (or 27KB uncompressed).\n\n\n## Usage\n\nOut of the box, parasails supports:\n - pages\n - components\n - utilities\n - constants\n\nAs well as a few optional integrations:\n - Vue Router (for client-side routing / \"virtual pages\")\n - jQuery (for `this.$get()`, `this.$find()`, and `this.$focus()`)\n\n\n```html\n<div id=\"homepage\" v-cloak>\n  <h1>{{welcomeMessage}}</h1>\n  <button autofocus @click=\"clickButton()\">Click me</button>\n</div>\n```\n\n```js\nparasails.registerPage('homepage', {\n  data: {\n    welcomeMessage: ''\n  },\n  beforeMount: function(){\n    this.welcomeMessage = 'Hello world!';\n  },\n  mounted: function(){\n    this.$focus('[autofocus]');\n  },\n  methods: {\n    clickButton: function(){\n      this.welcomeMessage = 'Ow that hurt!';\n    }\n  }\n});\n```\n\n\n## Jumping off\n\nHave questions?  Need advice?  Want to contribute?  Come by and [say hello](https://sailsjs.com/support)!\n\n> Parasails is developed by Mike McNeil, with help from other [Sails.js](https://sailsjs.com) core team members in Austin, TX.  If you're working on a commercial project and are interested in ways we can work together, [drop us a line](https://sailsjs.com/studio).\n\n\n<!--\n## More examples\n\n#### Pages\n\nRegister a page:\n\n```html\n<div id=\"login\" v-cloak>\n  <div class=\"container\">\n    <h1 class=\"text-center\">Sign in</h1>\n    <div class=\"login-form-container\">\n      <hr/>\n      <ajax-form action=\"login\" :syncing.sync=\"syncing\" :cloud-error.sync=\"cloudError\" @after-submitting=\"afterSubmittingForm()\" :handle-parsing=\"handleParsingForm\">\n        <div class=\"form-group\">\n          <input type=\"email\" class=\"form-control\" autofocus placeholder=\"Email Address\" :class=\"[formErrors.emailAddress ? 'is-invalid' : '']\" v-model.trim=\"formData.emailAddress\">\n          <div class=\"invalid-feedback\" v-if=\"formErrors.emailAddress\">Please provide a valid email address.</div>\n        </div>\n        <div class=\"form-group\">\n          <input type=\"password\" class=\"form-control\" placeholder=\"Password\" :class=\"[formErrors.password ? 'is-invalid' : '']\" v-model.trim=\"formData.password\">\n          <div class=\"invalid-feedback\" v-if=\"formErrors.password\">Please enter your password.</div>\n        </div>\n        <p class=\"text-danger\" v-if=\"cloudError==='notFound'\"><small>The credentials you entered are not associated with an account in our system. Please check your email and/or password and try again.</small></p>\n        <p class=\"text-danger\" v-else-if=\"cloudError\"><small>An error occured while processing your request. Please check your information and try again, or <a href=\"/contact\">contact support</a> if the error persists.</small></p>\n        <div class=\"form-group\">\n          <ajax-button :syncing=\"syncing\" class=\"btn-dark btn-lg btn-block\">Sign in</ajax-button>\n        </div>\n      </ajax-form>\n      <p class=\"text-center\"><a href=\"/password/forgot\">Forgot your password?</a></p>\n    </div>\n  </div>\n</div>\n<%- /* Expose locals as `window.SAILS_LOCALS` :: */ exposeLocalsToBrowser() %>\n```\n\n\n```js\nparasails.registerPage('login', {\n\n  //  ╔═╗╔╦╗╔═╗╔╦╗╔═╗\n  //  ╚═╗ ║ ╠═╣ ║ ║╣\n  //  ╚═╝ ╩ ╩ ╩ ╩ ╚═╝\n  data: {\n\n    // Main syncing/loading state for this page.\n    syncing: false,\n\n    // Form data\n    formData: { /* … */ },\n\n    // For tracking client-side validation errors in our form.\n    // > Has property set to `true` for each invalid property in `formData`.\n    formErrors: { /* … */ },\n\n    // Server error state for the form\n    cloudError: '',\n\n  },\n\n\n  //  ╦  ╦╔═╗╔═╗╔═╗╦ ╦╔═╗╦  ╔═╗\n  //  ║  ║╠╣ ║╣ ║  ╚╦╝║  ║  ║╣\n  //  ╩═╝╩╚  ╚═╝╚═╝ ╩ ╚═╝╩═╝╚═╝\n  beforeMount: function(){\n    _.extend(this, window.SAILS_LOCALS);\n  },\n  mounted: function() {\n\n    this.$focus('[autofocus]');\n\n  },\n\n\n  //  ╔╦╗╔═╗╔╦╗╦ ╦╔═╗╔╦╗╔═╗\n  //  ║║║║╣  ║ ╠═╣║ ║ ║║╚═╗\n  //  ╩ ╩╚═╝ ╩ ╩ ╩╚═╝═╩╝╚═╝\n  methods: {\n    // …\n  }\n});\n```\n\n\n#### Components\n\nRegister a component:\n\n```js\nparasails.registerComponent('ajaxButton', {\n\n  //  ╦╔╗╔╔╦╗╔═╗╦═╗╔═╗╔═╗╔═╗╔═╗\n  //  ║║║║ ║ ║╣ ╠╦╝╠╣ ╠═╣║  ║╣\n  //  ╩╝╚╝ ╩ ╚═╝╩╚═╚  ╩ ╩╚═╝╚═╝\n  props: ['syncing'],\n\n  //  ╔╦╗╔═╗╦═╗╦╔═╦ ╦╔═╗\n  //  ║║║╠═╣╠╦╝╠╩╗║ ║╠═╝\n  //  ╩ ╩╩ ╩╩╚═╩ ╩╚═╝╩\n  template: `\n  <button type=\"submit\" class=\"btn ajax-button\" :class=\"[syncing ? 'syncing' : '']\">\n    <span class=\"button-text\" v-if=\"!syncing\"><slot name=\"default\">Submit</slot></span>\n    <span class=\"button-loader clearfix\" v-if=\"syncing\">\n      <slot name=\"syncing-state\">\n        <div class=\"loading-dot dot1\"></div>\n        <div class=\"loading-dot dot2\"></div>\n        <div class=\"loading-dot dot3\"></div>\n        <div class=\"loading-dot dot4\"></div>\n      </slot>\n    </span>\n  </button>\n  `,\n\n  //  ╔═╗╔╦╗╔═╗╔╦╗╔═╗\n  //  ╚═╗ ║ ╠═╣ ║ ║╣\n  //  ╚═╝ ╩ ╩ ╩ ╩ ╚═╝\n  data: function (){\n    return {\n    };\n  },\n\n  //  ╦  ╦╔═╗╔═╗╔═╗╦ ╦╔═╗╦  ╔═╗\n  //  ║  ║╠╣ ║╣ ║  ╚╦╝║  ║  ║╣\n  //  ╩═╝╩╚  ╚═╝╚═╝ ╩ ╚═╝╩═╝╚═╝\n  beforeMount: function() {\n\n  },\n\n  mounted: function (){\n\n    // Log a warning if we're not inside of an <ajax-form>\n    var $closestAncestralForm = this.$get().closest('form');\n    if($closestAncestralForm.length === 0) {\n      console.warn('Hmm... this <ajax-button> doesn\\'t seem to be part of an <ajax-form>...');\n    }\n\n  },\n\n  beforeDestroy: function() {\n\n  },\n\n  //  ╔╦╗╔═╗╔╦╗╦ ╦╔═╗╔╦╗╔═╗\n  //  ║║║║╣  ║ ╠═╣║ ║ ║║╚═╗\n  //  ╩ ╩╚═╝ ╩ ╩ ╩╚═╝═╩╝╚═╝\n  methods: {\n\n  }\n\n});\n```\n\n\n\n#### Constants and utilities\n\nRegister a constant:\n\n```js\n// assets/js/constants/HELLO_MESSAGE_PREFIX.js\nparasails.registerConstant('HELLO_MESSAGE_PREFIX', 'Oh hi, ');\n```\n\nOr an arbitrary utility function:\n\n```js\nparasails.registerUtility('getHelloMessage', function(firstName) {\n  return `Oh hi, ${firstName}!`;\n});\n```\n\nThen use them wherever you like:\n\n```js\nvar getHelloMessage = parasails.require('getHelloMessage');\n\n// …\n\nconsole.log(getHelloMessage('Joaquin'));\n```\n\n-->\n\n## License\n\nCopyright &copy; 2017-present [Mike McNeil](https://github.com/mikermcneil)\n","publish_time":1508458671531,"_cnpm_publish_time":1508458671531,"dist-tags":{"latest":"0.9.3"}}