We're excited to have you attend one of our workshops! Here's a JavaScript (re)fresher to help you get up-to-speed on some features of the language we'll be using.
JavaScript has always had var:
var name = 'Ryan'
'use strict'; | |
import React, { | |
AppRegistry, | |
Component, | |
StyleSheet, | |
Text, | |
View, | |
TouchableOpacity, | |
LayoutAnimation, | |
} from 'react-native'; |
module Sass::Script::Functions | |
def file_exists(path) | |
return bool(false) unless options[:filename] # not all sass has a file name (e.g. std input) | |
current_directory = File.dirname(options[:filename]) rescue nil # a sass filename from an importer may not be processable by File.dirname | |
return bool(false) unless current_directory && File.exist?(current_directory) # not all sass files are served from the filesystem | |
full_path = File.expand_path(path.value, current_directory) # a relative path will be expanded against the current_directory of the sass file, symlinks will be followed, absolute paths will be left alone. | |
return bool(File.exist?(full_path)) | |
end | |
end |