diff --git a/LICENSE b/node/LICENSE similarity index 100% rename from LICENSE rename to node/LICENSE diff --git a/README.md b/node/README.md similarity index 100% rename from README.md rename to node/README.md diff --git a/lib/greeter.d.ts b/node/lib/greeter.d.ts similarity index 100% rename from lib/greeter.d.ts rename to node/lib/greeter.d.ts diff --git a/lib/greeter.js b/node/lib/greeter.js similarity index 100% rename from lib/greeter.js rename to node/lib/greeter.js diff --git a/lib/index.d.ts b/node/lib/index.d.ts similarity index 100% rename from lib/index.d.ts rename to node/lib/index.d.ts diff --git a/lib/index.js b/node/lib/index.js similarity index 100% rename from lib/index.js rename to node/lib/index.js diff --git a/package.json b/node/package.json similarity index 100% rename from package.json rename to node/package.json diff --git a/src/greeter.ts b/node/src/greeter.ts similarity index 100% rename from src/greeter.ts rename to node/src/greeter.ts diff --git a/node/src/index.ts b/node/src/index.ts new file mode 100644 index 0000000..98d9f28 --- /dev/null +++ b/node/src/index.ts @@ -0,0 +1,4 @@ +import { json5 } from "@types/json5"; + + +JSON.stringify diff --git a/node/src/scafdoc.json5 b/node/src/scafdoc.json5 new file mode 100644 index 0000000..5c33cc2 --- /dev/null +++ b/node/src/scafdoc.json5 @@ -0,0 +1,58 @@ +{ + /* + Application object is the root object that defines to the UI Application. + All the components, its uni-directional bindings and hierachial structure forms the whole application. + */ + "application": { + name: "website", + bootstrap: true, + /* + Component object is the just another component definition which holds rest of the components + a component holds bindings which dictates the input and output of it. + a component holds properties & methods which can be mere placeholder or can be for the binding above. + a component holds child components. + */ + rootComponent: { + name: "viewport", + bindings: { + input: { + + }, + output: { + + } + }, + properties: [ + { + name: "enableSideBar", + type: "boolean", + defaultValue: true + }, { + name: "miniFooter", + type: "boolean", + defaultValue: true + }, { + name: "minHeader", + type: "boolean", + defaultValue: false + } + ], + methods: [ + { + name: "headerCallback", + params: [], + return: { + type: "void" + }, + getter: false, + setter: false + } + ], + components: [ + + ] + }, + bindings: { + } + } +} \ No newline at end of file diff --git a/test/greeter-spec.ts b/node/test/greeter-spec.ts similarity index 100% rename from test/greeter-spec.ts rename to node/test/greeter-spec.ts diff --git a/tsconfig.json b/node/tsconfig.json similarity index 100% rename from tsconfig.json rename to node/tsconfig.json diff --git a/tslint.json b/node/tslint.json similarity index 100% rename from tslint.json rename to node/tslint.json diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index ca2e150..0000000 --- a/src/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { json5 } from "json5"; -import { Greeter } from "./greeter"; - -export { Greeter }; diff --git a/web/.editorconfig b/web/.editorconfig new file mode 100644 index 0000000..6e87a00 --- /dev/null +++ b/web/.editorconfig @@ -0,0 +1,13 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/web/.gitignore b/web/.gitignore new file mode 100644 index 0000000..fe6f8a7 --- /dev/null +++ b/web/.gitignore @@ -0,0 +1,40 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/tmp + +# dependencies +/node_modules + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# misc +/.sass-cache +/connect.lock +/coverage/* +/libpeerconnection.log +npm-debug.log +testem.log +/typings + +# e2e +/e2e/*.js +/e2e/*.map + +#System Files +.DS_Store +Thumbs.db diff --git a/web/README.md b/web/README.md new file mode 100644 index 0000000..49abb12 --- /dev/null +++ b/web/README.md @@ -0,0 +1,31 @@ +# ScaffoldingAll + +This project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.24. + +## Development server +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). +Before running the tests make sure you are serving the app via `ng serve`. + +## Deploying to Github Pages + +Run `ng github-pages:deploy` to deploy to Github Pages. + +## Further help + +To get more help on the `angular-cli` use `ng help` or go check out the [Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/web/angular-cli.json b/web/angular-cli.json new file mode 100644 index 0000000..9062958 --- /dev/null +++ b/web/angular-cli.json @@ -0,0 +1,59 @@ +{ + "project": { + "version": "1.0.0-beta.24", + "name": "scaffolding-all" + }, + "apps": [ + { + "root": "src", + "outDir": "dist", + "assets": [ + "assets", + "favicon.ico" + ], + "index": "index.html", + "main": "main.ts", + "test": "test.ts", + "tsconfig": "tsconfig.json", + "prefix": "app", + "mobile": false, + "styles": [ + "styles.css" + ], + "scripts": [], + "environments": { + "source": "environments/environment.ts", + "dev": "environments/environment.ts", + "prod": "environments/environment.prod.ts" + } + } + ], + "addons": [], + "packages": [], + "e2e": { + "protractor": { + "config": "./protractor.conf.js" + } + }, + "test": { + "karma": { + "config": "./karma.conf.js" + } + }, + "defaults": { + "styleExt": "css", + "prefixInterfaces": false, + "inline": { + "style": false, + "template": false + }, + "spec": { + "class": false, + "component": true, + "directive": true, + "module": false, + "pipe": true, + "service": true + } + } +} diff --git a/web/e2e/app.e2e-spec.ts b/web/e2e/app.e2e-spec.ts new file mode 100644 index 0000000..a628be2 --- /dev/null +++ b/web/e2e/app.e2e-spec.ts @@ -0,0 +1,14 @@ +import { ScaffoldingAllPage } from './app.po'; + +describe('scaffolding-all App', function() { + let page: ScaffoldingAllPage; + + beforeEach(() => { + page = new ScaffoldingAllPage(); + }); + + it('should display message saying app works', () => { + page.navigateTo(); + expect(page.getParagraphText()).toEqual('app works!'); + }); +}); diff --git a/web/e2e/app.po.ts b/web/e2e/app.po.ts new file mode 100644 index 0000000..94643fb --- /dev/null +++ b/web/e2e/app.po.ts @@ -0,0 +1,11 @@ +import { browser, element, by } from 'protractor'; + +export class ScaffoldingAllPage { + navigateTo() { + return browser.get('/'); + } + + getParagraphText() { + return element(by.css('app-root h1')).getText(); + } +} diff --git a/web/e2e/tsconfig.json b/web/e2e/tsconfig.json new file mode 100644 index 0000000..656bdb1 --- /dev/null +++ b/web/e2e/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "declaration": false, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "module": "commonjs", + "moduleResolution": "node", + "outDir": "../dist/out-tsc-e2e", + "sourceMap": true, + "target": "es5", + "typeRoots": [ + "../node_modules/@types" + ] + } +} diff --git a/web/karma.conf.js b/web/karma.conf.js new file mode 100644 index 0000000..1f2613a --- /dev/null +++ b/web/karma.conf.js @@ -0,0 +1,43 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/0.13/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', 'angular-cli'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-remap-istanbul'), + require('angular-cli/plugins/karma') + ], + files: [ + { pattern: './src/test.ts', watched: false } + ], + preprocessors: { + './src/test.ts': ['angular-cli'] + }, + mime: { + 'text/x-typescript': ['ts','tsx'] + }, + remapIstanbulReporter: { + reports: { + html: 'coverage', + lcovonly: './coverage/coverage.lcov' + } + }, + angularCli: { + config: './angular-cli.json', + environment: 'dev' + }, + reporters: config.angularCli && config.angularCli.codeCoverage + ? ['progress', 'karma-remap-istanbul'] + : ['progress'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }); +}; diff --git a/web/package.json b/web/package.json new file mode 100644 index 0000000..4f0bc7e --- /dev/null +++ b/web/package.json @@ -0,0 +1,47 @@ +{ + "name": "scaffolding-all", + "version": "0.0.0", + "license": "MIT", + "angular-cli": {}, + "scripts": { + "ng": "ng", + "start": "ng serve", + "lint": "tslint \"src/**/*.ts\"", + "test": "ng test", + "pree2e": "webdriver-manager update --standalone false --gecko false", + "e2e": "protractor" + }, + "private": true, + "dependencies": { + "@angular/common": "^2.3.1", + "@angular/compiler": "^2.3.1", + "@angular/core": "^2.3.1", + "@angular/forms": "^2.3.1", + "@angular/http": "^2.3.1", + "@angular/platform-browser": "^2.3.1", + "@angular/platform-browser-dynamic": "^2.3.1", + "@angular/router": "^3.3.1", + "core-js": "^2.4.1", + "rxjs": "^5.0.1", + "ts-helpers": "^1.1.1", + "zone.js": "^0.7.2" + }, + "devDependencies": { + "@angular/compiler-cli": "^2.3.1", + "@types/jasmine": "2.5.38", + "@types/node": "^6.0.42", + "angular-cli": "1.0.0-beta.24", + "codelyzer": "~2.0.0-beta.1", + "jasmine-core": "2.5.2", + "jasmine-spec-reporter": "2.5.0", + "karma": "1.2.0", + "karma-chrome-launcher": "^2.0.0", + "karma-cli": "^1.0.1", + "karma-jasmine": "^1.0.2", + "karma-remap-istanbul": "^0.2.1", + "protractor": "~4.0.13", + "ts-node": "1.2.1", + "tslint": "^4.0.2", + "typescript": "~2.0.3" + } +} diff --git a/web/protractor.conf.js b/web/protractor.conf.js new file mode 100644 index 0000000..ffded70 --- /dev/null +++ b/web/protractor.conf.js @@ -0,0 +1,32 @@ +// Protractor configuration file, see link for more information +// https://github.com/angular/protractor/blob/master/lib/config.ts + +/*global jasmine */ +var SpecReporter = require('jasmine-spec-reporter'); + +exports.config = { + allScriptsTimeout: 11000, + specs: [ + './e2e/**/*.e2e-spec.ts' + ], + capabilities: { + 'browserName': 'chrome' + }, + directConnect: true, + baseUrl: 'http://localhost:4200/', + framework: 'jasmine', + jasmineNodeOpts: { + showColors: true, + defaultTimeoutInterval: 30000, + print: function() {} + }, + useAllAngular2AppRoots: true, + beforeLaunch: function() { + require('ts-node').register({ + project: 'e2e' + }); + }, + onPrepare: function() { + jasmine.getEnv().addReporter(new SpecReporter()); + } +}; diff --git a/web/src/app/app.component.css b/web/src/app/app.component.css new file mode 100644 index 0000000..e69de29 diff --git a/web/src/app/app.component.html b/web/src/app/app.component.html new file mode 100644 index 0000000..b6931b5 --- /dev/null +++ b/web/src/app/app.component.html @@ -0,0 +1,3 @@ +