$ ember install ember-cli-postcss # Install ember-cli-postcss
$ npm install --save-dev tailwindcss # Install tailwindcss
$ npx tailwind init app/styles/tailwind.config.js # Optional: Generate a Tailwind config file for your project
$ npm install -save-dev postcss-import # Optional: If you want to use the @import statement
import Adapter from "ember-data/adapters/rest"; | |
export default Adapter.extend(); |
import Ember from 'ember'; | |
const DATA_URL = 'https://api.github.com/orgs/emberjs/repo'; | |
export default Ember.Route.extend({ | |
// Values returned from async function are Promises | |
model: async function() { | |
// Get the data, AND WAIT FOR IT TO RETURN (type: Object) | |
var data = await $.getJSON(DATA_URL); |
// app/instance-initializers/application.js | |
import appInst from 'appName/utils/application' | |
export function initialize( appInstance ) { | |
appInst.instance = appInstance | |
} | |
export default { | |
name: 'application', | |
initialize | |
}; |
// app/controllers/sign-in.js | |
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
actions: { | |
signIn(){ | |
this.set('errors', null); | |
var params = { identification: this.get('email'), password: this.get('password') }; | |
// Redirects to index route on success (configurable in config/environment.js) | |
this.get('session').authenticate('simple-auth-authenticator:oauth2-password-grant', params); |
//helpers/newline-br.js | |
import Ember from 'ember'; | |
export function newlineBr(text) { | |
var breakTag = '<br />'; | |
return new Ember.Handlebars.SafeString((text + '') | |
.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2')); | |
} | |
export default Ember.Handlebars.helper('newLineBr',newlineBr); |
.form-group | |
label | |
| Time Zone | |
time-zone value=model.timezone |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |