Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Vifernandez/create frontend structure #12

Merged
merged 9 commits into from
Nov 11, 2017

Conversation

vicmator
Copy link
Owner

@vicmator vicmator commented Nov 6, 2017

First structure frontend

{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "frontend"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about somethiing more meaningful? ;)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean with "more meaningful"? Really is the name of root frontend code

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean "horologium-frontend" or something similar

Copy link
Owner Author

@vicmator vicmator Nov 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, I have confused that with:

"root": "frontend"

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"apps": [
{
"root": "frontend",
"outDir": "dist",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be changed to backed/public

Copy link
Owner Author

@vicmator vicmator Nov 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you wanted to say "backend/public"...(typo). It is a joke!! xDD

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😒

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it is necessary to put the path "backend/public" in .gitignore?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the outDir

.gitignore Outdated
@@ -30,6 +30,7 @@
npm-debug.log
testem.log
/typings
yarn-error.log
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you using yarn?

Copy link
Owner Author

@vicmator vicmator Nov 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to remove, I don't know why this are here. (I was using yarn in another project...)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,20 @@
<!--The content below is only a placeholder and can be replaced.-->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about changing this to something not tight to angular?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've only changed the title (taitel), and I've put our directory github

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we agreed yesterday, use this PR to include angular material and add a dummy page with a toolbar or something like this ;)

<html lang="en">
<head>
<meta charset="utf-8">
<title>Frontend</title>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Horologium

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know about the angular build process, so just a question... how does this relate to outDir in .angular-cli.json ?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is not necessary, I removed it

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

package.json Outdated
},
"devDependencies": {
"eslint": "^4.9.0",
"eslint-config-airbnb-base": "^12.1.0",
"gulp-watch": "^4.3.11",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

normally dependencies are listed in alphabetical order, this was moved to the wrong place I think

Copy link
Owner Author

@vicmator vicmator Nov 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was in a conflict merge. I change it

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

package.json Outdated
"eslint-plugin-import": "^2.8.0",
"gulp": "github:gulpjs/gulp#4.0",
"gulp-clean": "^0.3.2",
"gulp-develop-server": "^0.5.2",
"gulp-eslint": "^4.0.0",
"gulp-util": "^3.0.8",
"gulp-watch": "^4.3.11"
"@angular/cli": "1.5.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was also placed wrong I believe. I think that if you do npm install it will fix these automatically ;)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have used this package to sort all dependencies https://github.com/kilianc/npm-sort

Copy link
Collaborator

@danilupion danilupion Nov 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try with what I said? (just wondering if I was right)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it, but didn't work

package.json Outdated
"@angular/router": "^5.0.0",
"core-js": "^2.4.1",
"rxjs": "^5.4.1",
"tslint-config-airbnb": "^5.3.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least tslint-config-airbnb should be devDependencies (probably all @angular/* too

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In npm's tslint-config-airbnb web say that we should use "npm install tslint-config-airbnb --save" (https://www.npmjs.com/package/tslint-config-airbnb).

Related to @angular/* dependencies, angular-cli installed it on this way.

What do you think about that?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they just gave a dumb example. In my opinion the whole frontend directory is only for development (thus dependencies it might have should be in dev-dependencies) because I think as port of the npm module "compiled" sources should be generated so that when you install the module you are ready to just run the software

tsconfig.json Outdated
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again in doubt regarding output directories... should this be changed too or is it just for temporal artifacts?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Victor Manuel Fernandez Lopez added 2 commits November 8, 2017 22:48
@vicmator
Copy link
Owner Author

Firstly, I added Material-Angular (https://material.angular.io/guide/getting-started) with all step that are necessary to make it work.

Then, I created a simple components (header) to test the material-angular.

On the other hand, I have created a new module only to import all material components that we are going to use. I did that because the principal ngModule will be dirty with all these imports. If you want, I could to explain you how attributes modules works in Angular. Maybe you just know how works.

Finally, I tried to remove "polyfills" file, but was imposible because Angular need that to run Zone.js (I tried to delete all dependencies to this file to works). Because of this, I just left the reference to Zone dependency in the polyfills.js

@danilupion danilupion closed this Nov 11, 2017
@danilupion danilupion reopened this Nov 11, 2017
@danilupion danilupion merged commit d74e4b1 into master Nov 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants