Skip to content

Commit

Permalink
Add ember app
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-altom committed Oct 22, 2019
1 parent 27ca14a commit 6cdb5fa
Show file tree
Hide file tree
Showing 137 changed files with 17,487 additions and 863 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true


[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false

[*.{diff,md}]
trim_trailing_whitespace = false
10 changes: 10 additions & 0 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
{

"disableAnalytics": false
}
20 changes: 20 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
56 changes: 56 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: [
'ember'
],
globals: {
"ModelVisualizer": true,
"CodeMirror": true,
"FileSaver": true,
"saveAs": true
},
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/*/index.js',
'server/**/*.js'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here

// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off'
})
}
]
};
30 changes: 28 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,28 @@
# MacOS
.DS_Store
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try

# mac os
.DS_Store
45 changes: 43 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
image: alpine:latest
stages:
- dependencies
- lint
- test
- build
- deploy

image: danlynn/ember-cli

cache:
paths:
- node_modules
- bower_components

install_dependencies:
stage: dependencies
script:
- npm install -g ember-cli
- npm install

lint:
stage: lint
allow_failure: true
script:
- npm run lint:hbs
- npm run lint:js

test:
stage: test
allow_failure: true
script:
- ember test

buid:
stage: build
artifacts:
paths:
- dist/
script:
- ember build --environment production

pages:
stage: deploy
script:
- echo 'Nothing to do...'
- rm -rf public
- mv dist public
- ls -alt public
artifacts:
paths:
- public
Expand Down
5 changes: 5 additions & 0 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended'
};
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
language: node_js
node_js:
- "8"

sudo: false
dist: trusty

addons:
chrome: stable

cache:
directories:
- $HOME/.npm

env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1

script:
- npm run lint:hbs
- npm run lint:js
- npm test
3 changes: 3 additions & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
}
61 changes: 52 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,58 @@
# Model Editor
# ModelEditor

A web based editor and visualizer for models written using the GraphWalker JSON format.
A web based editor for AltWalker and GraphWalker models.

## Further Reading / Useful Links:
![Screenshot](/public/screenshots/screenshot.png)

* [GraphWalker JSON Format](http://graphwalker.github.io/json-overview/)
* [D3](https://d3js.org/)
* [DagreD3](https://github.com/dagrejs/dagre-d3)
* [CodeMirror](https://codemirror.net/)
## Prerequisites

You will need the following things properly installed on your computer.

## Screenshot
* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/) (with npm)
* [Ember CLI](https://ember-cli.com/)
* [Google Chrome](https://google.com/chrome/)

![Screenshot](/public/img/screenshot.png)
## Installation

* `git clone <repository-url>` this repository
* `cd model-editor`
* `npm install`

## Running / Development

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).

### Code Generators

Make use of the many generators for code, try `ember help generate` for more details

### Running Tests

* `ember test`
* `ember test --server`

### Linting

* `npm run lint:hbs`
* `npm run lint:js`
* `npm run lint:js -- --fix`

### Building

* `ember build` (development)
* `ember build --environment production` (production)

### Deploying

Specify what it takes to deploy your app.

## Further Reading / Useful Links

* [ember.js](https://emberjs.com/)
* [ember-cli](https://ember-cli.com/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
14 changes: 14 additions & 0 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Application from '@ember/application';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

const App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
});

loadInitializers(App, config.modulePrefix);

export default App;
Empty file added app/components/.gitkeep
Empty file.
7 changes: 7 additions & 0 deletions app/components/close-icon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Component from '@ember/component';

export default Component.extend({
size: 24,
strokeWidth: 2,
color: "black"
});
7 changes: 7 additions & 0 deletions app/components/edit-icon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Component from '@ember/component';

export default Component.extend({
size: 24,
strokeWidth: 2,
color: "black"
});
4 changes: 4 additions & 0 deletions app/components/error-alert.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Component from '@ember/component';

export default Component.extend({
});
9 changes: 9 additions & 0 deletions app/components/header-bar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Component from '@ember/component';

export default Component.extend({
actions: {
showSideBar() {
this.showSideBar();
}
}
});
Loading

0 comments on commit 6cdb5fa

Please sign in to comment.