Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to NPM and Typescript #15

Merged
merged 21 commits into from
Jul 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
app/js/
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/gts/"
}
15 changes: 15 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

name: Test
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
run: npm i
run: npm run test
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
bower_components
node_modules
*.pyc

.vscode
.DS_Store

app/js/*.js
config.js
config.yaml

6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"bracketSpacing": false,
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "avoid"
}
22 changes: 9 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Direct

[![Code Style: Google](https://img.shields.io/badge/code%20style-google-blueviolet.svg)](https://github.com/google/gts)

Direct is a tool that helps motion designers provide clear, precise motion direction for engineers.

As motion design becomes more and more prominent in apps, it’s becoming increasingly important to develop a standard for communicating direction from motion designers. Once an animation is finalized, simply handing off a video file to engineers makes it very difficult for them to recreate. Animations take a lot of engineering time to implement and there are a lot of subtleties that could get lost in translation. As designers, it’s our responsibility to make sure that engineers have everything they need to quickly recreate this motion.
Expand All @@ -12,33 +14,27 @@ Disclaimer: This is not an officially supported Google product.

2. Install [node.js and npm](https://nodejs.org/)

3. Install bower

``` shell
npm install -g bower
```

4. Install dependencies
3. Install dependencies

``` shell
bower install
npm i
```

5. Populate config files
4. Populate config files

Rename `config_sample.yaml` to `config.yaml`

(this file can be left blank for most users)


Rename `app/js/config_sample.js` to `app/js/config.js`
Rename `app/ts/config_sample.ts` to `app/ts/config.ts`

Fill in values for `window.__directConfig.stagingDomain` and `window.__directConfig.productionDomain` if you intend to use staging and production environments. Otherwise, they can be left as empty strings.


6. Run a local instance
5. Run a local instance
``` shell
dev_appserver.py .
npm run start
```

7. View the server at http://localhost:8080/
6. View the server at http://localhost:8080/
77 changes: 40 additions & 37 deletions app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,59 +17,62 @@ api_version: 1
threadsafe: yes

handlers:
# Testing
- url: /test
static_files: test/index.html
upload: test/index.html
# Testing
- url: /test
static_files: test/index.html
upload: test/index.html

# Tutorial
- url: /tutorial
static_dir: tutorial
# Tutorial
- url: /tutorial
static_dir: tutorial

- url: /tutorial
static_files: tutorial/index.html
upload: tutorial/index.html
- url: /tutorial
static_files: tutorial/index.html
upload: tutorial/index.html

# App Routing
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
# App Routing
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico

- url: /robots.txt
static_files: robots.txt
upload: robots.txt
- url: /robots.txt
static_files: robots.txt
upload: robots.txt

- url: /app
static_dir: app
- url: /app
static_dir: app

- url: /bower_components
static_dir: bower_components
- url: /node_modules
static_dir: node_modules

- url: /css
static_dir: app/css
- url: /third_party
static_dir: third_party

- url: /img
static_dir: app/img
- url: /css
static_dir: app/css

- url: /js
static_dir: app/js
- url: /img
static_dir: app/img

- url: /partials
static_dir: app/partials
- url: /js
static_dir: app/js

- url: .*
script: main.app
- url: /partials
static_dir: app/partials

- url: .*
script: main.app

# Libraries
libraries:
- name: webapp2
version: "2.5.2"
- name: webapp2
version: "2.5.2"

- name: jinja2
version: latest
- name: jinja2
version: latest

- name: pycrypto
version: "2.6"
- name: pycrypto
version: "2.6"

# Don't Upload
skip_files: |
Expand Down
96 changes: 0 additions & 96 deletions app/js/app.js

This file was deleted.

94 changes: 0 additions & 94 deletions app/js/baseCtrl.js

This file was deleted.

Loading