As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
configdocs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public - Sep 07, 2020 update docs for
npm version
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/ | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| gotoStateFromFirstSiblingCurrentState: function(destinationState, commonParentState, defaultSourceState) { | |
| var sourceState = this.get('currentStates').find(function(s) { | |
| var isSibling = s.getPath('parentState.stateName') === commonParentState; | |
| return isSibling; | |
| }); | |
| sourceState = sourceState || defaultSourceState; | |
| this.gotoState(destinationState, sourceState); | |
| } |
| (function() { | |
| // Essentially function(name = "SC.View", options = {data: {}, hash: {}}) | |
| var parseHelperArguments = function(viewClassNameOrOptions, options) { | |
| var viewClass; | |
| if (_.isString(viewClassNameOrOptions)) { | |
| viewClass = SC.getPath(viewClassNameOrOptions); | |
| sc_assert( "Could not find view class %@".fmt(viewClassNameOrOptions), viewClass != null ); | |
| options = options || {}; | |
| } else { |
| # Note: | |
| # Place this file within the config directory of your Rails 3.1 Application | |
| ########################################################################################## | |
| # This configuration file works with both the Compass command line tool and within Rails. | |
| # Require any additional compass plugins here. | |
| project_type = :rails | |
| # Set this to the root of your project when deployed: | |
| http_path = "/" |
| require 'sproutcore' | |
| require 'sproutcore-statechart' | |
| require 'sproutcore-routing' | |
| App = SC.Application.create() | |
| App.GlobalNavController = SC.Object.create( | |
| home: -> App.statechart.gotoState 'home' | |
| about: -> App.statechart.gotoState 'about' | |
| ) |
| var State = Ember.State.extend({}); | |
| var ViewState = Ember.ViewState.extend({}); | |
| // existing | |
| App.statechart = Ember.StateManager.create({ | |
| loggedOut: ViewState.create({}), | |
| loggingIn: ViewState.create({}), | |
| loggedIn: Ember.StateManager.create({ | |
| appLoadFailed: ViewState.create({}), | |
| appLoading: ViewState.create({}), |
| <script type="text/x-handlebars" data-template-name="list-view"> | |
| <ul> | |
| {{#each posts}} | |
| {{#view MyApp.PostView contentBinding="this"}} | |
| {{#with content}} | |
| <li class="post"> | |
| <a href="#"> | |
| <img data-id="{{unbound id}}" src="{{unbound embed_url}}"> | |
| <span class="meta">{{unbound short_text}}</span> | |
| </a> |
Created by Christopher Manning