Переглянути джерело

:tada: setup preview repo

outline
Garrick Aden-Buie 6 роки тому
коміт
3afaa88f3e
4 змінених файлів з 124 додано та 0 видалено
  1. +2
    -0
      .gitignore
  2. +31
    -0
      README.md
  3. BIN
      img/js4shiny-pkg-lint-standard.png
  4. +91
    -0
      setup.md

+ 2
- 0
.gitignore Переглянути файл

@@ -0,0 +1,2 @@
.DS_Store
.history/

+ 31
- 0
README.md Переглянути файл

@@ -0,0 +1,31 @@
# JavaScript and Web Development for R Users

## Information

**Time:** 10:00am - 4:00pm
**Date:** Saturday, December 28, 2019
**Place:** [Mathnasium, 1536 S. Dale Mabry, Tampa, FL](https://goo.gl/maps/agTycDKzk47tPbP19)

> This workshop will cover and preview the web development materials I'm developing for a larger two-day workshop. We'll learn basic JavaScript, HTML and CSS to create interactive web sites. You don't have to have Shiny experience, but we'll use tools that are familiar to R users, like RStudio.


## Setup

Please follow the [setup instructions here](setup.md) before the workshop. If you run into any issues, we can work through them together at the workshop.

## Schedule

**Saturday, December 28, 2019** from **10:00am to 4:00pm**

| Time | Activity |
| ------------- | ------------------------------------- |
| **10:00 - 10:30** | 🤝 Welcome and Setup |
| **10:30 - 12:00** | ⚡ JavaScript |
| 12:00 - 12:30 | 🍕 Lunch |
| **12:30 - 2:00** | 🎨 HTML & CSS |
| 2:00 - 2:30 | ☕ Break |
| **2:30 - 4:00** | 👩‍💻 Interactive Apps with JS, HTML, & CSS |

## Outline

_TBA_

BIN
img/js4shiny-pkg-lint-standard.png Переглянути файл

Before After
Width: 804  |  Height: 314  |  Size: 75KB

+ 91
- 0
setup.md Переглянути файл

@@ -0,0 +1,91 @@
## Getting Setup

### RStudio

We're going to primarily use [RStudio](https://rstudio.com/products/rstudio/#rstudio-desktop) in this workshop. Please make sure you have a recent version of RStudio installed. Version 1.2 or later will work.

### R Setup

There is a companion R package for this workshop called `js4shiny`. To install it, you need to the [devtools](https://devtools.r-lib.org) package installed on your system.

```r
install.packages("devtools")
```

Then, you can install the `js4shiny` package with the following code. If you run into any issues, don't worry: we can diagnose them together at the workshop.

```r
devtools::install_git("https://git.garrickadenbuie.com/js4shiny/js4shiny.git")
```

### Node and npm

The recommended way to install [node][nodejs] and [npm]
is to use a [Node Version Manager][nvm].
[`nvm`][nvm] is a bash script for macOS or Linux systems
and [`nvm-windows`][nvm-windows] is a similar program for Windows users.
The node version manager is used to manage the installation and activation
of multiple versions of `node` on the same system.
Follow [the instructions on the `npm` webpage][npm-install]
to install `node` and `npm` (they come together)
and confirm that your installation is working.

Alternatively,
you can also use a Node.js installer
to install the latest LTS version of Node.js from
<https://nodejs.org/en/download/>.

Check that the installation worked by running

<pre class="bash"><code>node -v</code></pre>

```
## v13.2.0
```

<pre class="bash"><code>npm -v </code></pre>

```
## 6.13.1
```

These are the versions currently installed on my system
and the version on your system may not perfectly match the version you see above.
If you already have a previous,
older version of Node installed,
it's probably a good idea to take this opportunity to upgrade.

[nodejs-download]: https://nodejs.org/en/download/
[nodejs]: https://nodejs.org/
[nvm]: https://github.com/nvm-sh/nvm
[nvm-windows]: https://github.com/coreybutler/nvm-windows
[npm]: https://www.npmjs.com/
[npm-install]: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm#using-a-node-version-manager-to-install-nodejs-and-npm


### JavaScript Standard Style

[standardjs] is a style guide, code linter and beautifier in one.
**standard** is a commandline tool
for the [JavaScript Standard Style][standardjs]
that automatically formats JavaScript code in a consistent manner
and points out common style and programmer errors.

There are a number of JavaScript tools for this task ---
and standard is built on ESLint and Prettier ---
but standard is easier to install and configure
and uses a code style that will be familiar to R developers.

Once you've [installed node and npm](#node-and-npm),
you can install standard by running

```bash
npm install standard --global
```

Once installed,
you can use the _Lint File or Selection_ RStudio addin
provided by the [js4shiny](#r-setup) package
to automatically format your JavaScript.

![The _Lint File or Selection_ RStudio adding provided by the _js4shiny_ package.](img/js4shiny-pkg-lint-standard.png)

Завантаження…
Відмінити
Зберегти