Skip to content

Commit

Permalink
Starter project - a beginner's playground for exploring how to setup …
Browse files Browse the repository at this point in the history
…one simple deck
  • Loading branch information
Matt committed May 12, 2019
1 parent c0775b1 commit f460dbb
Show file tree
Hide file tree
Showing 103 changed files with 5,657 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/target
/tmp
/out-tsc

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# library
/src/app/modules/dashboard/.ng-pkg-build/*
/src/app/modules/dashboard/dist.tgz
/src/app/modules/dashboard/dist

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

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
Thumbs.db
53 changes: 51 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,51 @@
# ngx-card-deck-basic
Basic sample of configuration and setup of a card deck
# ngx card deck starter example


[![ngx card deck](http://i.postimg.cc/kGm8vJWs/card-deck.png)](http://i.postimg.cc/kGm8vJWs/card-deck.png)

[//]: # (remove https://postimg.cc/delete/fGwX2thh/d73f604c )


## Summary
[![downloads](https://img.shields.io/github/downloads/mattmutt/ngx-card-deck-starter/total.svg)]()

### Introduction

Welcome to the card deck component! Want to start out with a working sample card deck project?
This is the tldr; version for those ready to jumpstart!

[![ngx card deck](http://i.postimg.cc/Bv5ht6pr/ngx-card-deck-starter-sample.png)](http://i.postimg.cc/Bv5ht6pr/ngx-card-deck-starter-sample.png)

[//]: # (remove C97v8DMd/d585d5d1 )

This repo should allow beginners to play around with the foundations of the card deck without too much knowledge of how things are wired.
A lot of excess files have been trimmed out to reveal a minimal installation.


## Quick start

* Clone repo with `git clone [email protected]:mattmutt/ngx-card-deck-starter.git`
* Install [Angular CLI](https://angular.io/cli) if necessary, with `npm install -g @angular/cli`
* Grab all tooling and library dependencies `npm install`
* Start the development server with `npm start`, then visit _[http://localhost:4200](http://localhost:4200)_ in browser
* _Hungry for more samples_? Graduate to an intermediate [_ngx-card-deck_ seed](https://github.com/mattmutt/ngx-card-deck-seed).


## Platform dependencies versions
* Angular 7 (version 8 would require refactoring as this component uses some internal Angular APIs)
* Clarity 1
* RxJS 6
* Node.js 10+ ( Angular CLI requirements)
* ES2015 ( no need to support IE11 going forward? )

## Server local startup

Run `npm start` *or* for a local development server. Navigate to `http://localhost:4200`. The app will automatically reload if you change
any of the source code files. One sample project is included



## End-to-end tests

Run `npm run e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org). One test will verify card deck engine instantiates the sample deck correctly.

195 changes: 195 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ngx-card-deck-starter": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "target/dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"showCircularDependencies": true,
"polyfills": "src/polyfills.ts",
"assets": [
{
"glob": "**/*",
"input": "mock/network",
"output": "/network"
},
"src/assets",
"src/favicon.ico"
],
"styles": [
{
"input": "node_modules/@clr/ui/clr-ui-dark.min.css",
"bundleName": "clr-ui-dark.min",
"lazy": true
},
{
"input": "node_modules/@clr/ui/clr-ui.min.css",
"bundleName": "clr-ui.min",
"lazy": true
},
"node_modules/@clr/icons/clr-icons.min.css",
"src/styles.css"
],
"scripts": [
"node_modules/@clr/icons/clr-icons.min.js"
]
},
"configurations": {
"test": {
"extractCss": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.e2e.ts"
}
]
},

"local": {
"extractCss": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.local.ts"
}
]
},
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ngx-card-deck-starter:build"
},
"configurations": {
"e2e": {
"browserTarget": "ngx-card-deck-starter:build:e2e"
},
"local": {
"browserTarget": "ngx-card-deck-starter:build:local"
},
"production": {
"browserTarget": "ngx-card-deck-starter:build:production"
}
}
},

"serve-e2e": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ngx-card-deck-starter:build"
},
"configurations": {
"test": {
"browserTarget": "ngx-card-deck-starter:build:test"
}
}
},

"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ngx-card-deck-starter:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [
"node_modules/@clr/icons/clr-icons.min.js"
],
"styles": [
"node_modules/@clr/icons/clr-icons.min.css",
"node_modules/@clr/ui/clr-ui.min.css",
"src/styles.css"
],
"assets": [
{
"glob": "**/*",
"input": "mock/network",
"output": "/network"
},
"src/assets",
"src/favicon.ico"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"ngx-card-deck-e2e": {
"root": "e2e",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "ngx-card-deck-starter:serve-e2e:test"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "ngx-card-deck-starter",
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
},
"@schematics/angular:directive": {}
}
}
78 changes: 78 additions & 0 deletions config/deployments/local/environment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"deployment": {
"page": {
"embedded": false,
"sandboxed": false
}
},
"services": {
"dashboardMetadata": {
"mocked": false,
"transport": "network",
"publicPath": null,
"route": {
"protocol": null,
"host": null,
"port": null,
"path": "/network/vendors/extension/{{ dashboardOrganizerPath }}/metadata/dashboard",
"extension": ".json",
"authentication": null
}
},
"session": {
"transport": "service",
"mocked": true,
"publicPath": null,
"route": {
"protocol": null,
"host": null,
"port": null,
"path": "/network/vendors/extension/{{ dashboardOrganizerPath }}/acme/session/usersession",
"extension": ".json",
"authentication": null
}
},
"remote-served-service": {
"transport": "service",
"mocked": false,
"publicPath": null,
"route": {
"protocol": null,
"host": null,
"port": null,
"path": "",
"authentication": {
"sameOriginPolicyEnabled": true
},
"extension": null
}
},
"rest": {
"transport": "service",
"mocked": true,
"publicPath": null,
"route": {
"protocol": null,
"host": null,
"port": null,
"path": "",
"extension": null,
"authentication": null
}
},
"network": {
"transport": "network",
"mocked": false,
"publicPath": null,
"route": {
"protocol": null,
"host": null,
"port": null,
"path": "",
"extension": null,
"authentication": null
}
}
}
}

Loading

0 comments on commit f460dbb

Please sign in to comment.