Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

refactor: add src folder #3171

Merged
merged 35 commits into from
Feb 2, 2017
Merged

refactor: add src folder #3171

merged 35 commits into from
Feb 2, 2017

Conversation

filipesilva
Copy link
Contributor

@filipesilva filipesilva commented Jan 31, 2017

  • Boilerplate files
  • Gulpfile tooling
  • Remove a2docs.css
  • TS examples
  • ES5/ES6 examples
  • AoT examples
  • Upgrade examples
  • Unit tests
  • Plunkers
  • JS prose and example paths
  • TS Setup/Quickstart prose
  • TS overall prose and example paths
  • AoT, i18n, Testing prose
  • Style guide rule
  • Changelog note and upgrade instructions
  • Ask someone to review quickstart, setup and ToH

Should be merged together with angular/quickstart#362.

@filipesilva filipesilva force-pushed the add-src-folder branch 2 times, most recently from 7a1ba4f to f7d6a62 Compare February 1, 2017 14:28
@filipesilva filipesilva changed the title [WIP] refactor: add src folder refactor: add src folder Feb 2, 2017
Copy link
Member

@Foxandxss Foxandxss left a comment

Choose a reason for hiding this comment

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

At least toh 1,2,3,7 have problems with the headers not showing the entire path. In the pt7 is on the tabs at the end and perhaps it is not a good idea to add them, will clutter the header like hell.

@@ -20,7 +20,7 @@ block qs-src-online-and-local
<span if-docs="ts">takes a _metadata_ object. The metadata object</span> describes how the HTML template and component class work together.

The `selector` property tells Angular to display the component inside a custom `<my-app>` tag in the `index.html`.
+makeExample('index.html','my-app','index.html (inside <body>)')(format='.')
+makeExample('src/index.html','my-app','index.html (inside <body>)')(format='.')
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this say src/index.html (inside <body>) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, because in the quickstart you are looking at the plunker.

@@ -110,25 +110,32 @@ block core-files
Focus on the following three TypeScript (`.ts`) files in the **`/app`** folder.
Copy link
Member

Choose a reason for hiding this comment

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

In the /src folder. You can also specify it more if you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Whenever a new Typescript, HTML or CSS file is created, it should go inside the `src/` directory (unless noted otherwise).
This is the folder containing your app itself.

Outside `src/` are files meant to support your app, like configuration files and external dependencies.
Copy link
Member

Choose a reason for hiding this comment

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

This is not wrong, but this sentence and then a table with files, I thought for a minute that the list of files were the ones meant to be outside src/. There needs to be another sentence or something to present the table.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed by changing the paragraph order.

.children
.file app.component.ts
.file app.module.ts
.file src
Copy link
Member

Choose a reason for hiding this comment

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

For some reason, the tree doesn't show as we expect to.

Copy link
Member

Choose a reason for hiding this comment

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

Well, not only src, is screwed up completely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@@ -69,13 +71,13 @@ code-example(language="sh" class="code-shell").
Create a `Hero` class with `id` and `name` properties.
For now put this near the top of the `app.component.ts` file, just below the import statement.

+makeExample('toh-1/ts/app/app.component.ts', 'hero-class-1', 'app.component.ts (Hero class)')(format=".")
+makeExample('toh-1/ts/src/app/app.component.ts', 'hero-class-1', 'app.component.ts (Hero class)')(format=".")
Copy link
Member

Choose a reason for hiding this comment

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

the header needs to be updated. Well, all of them in the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

You can read about moving your existing project to this structure in
[the QuickStart repo update instructions](https://github.com/angular/quickstart#updating-to-a-newer-version-of-the-quickstart-repo).
* `app/` has been moved to `src/app/`
* `src/app/main.ts` has been moved to `src/main.ts`
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't be better to say:

app/main.ts is not at src/main.ts or something like that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

* `src/app/main.ts` has been moved to `src/main.ts`
* `index.html`, `styles.css` and `tsconfig.json` have been moved inside `src/`
* `systemjs.config.js` now imports `main.js` instead of `app`.
* There is a new `bs-config.json` file at root to configure `lite-server` to serve `src/`
Copy link
Member

Choose a reason for hiding this comment

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

This sentence needs rewording, too many "to"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reworded

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

1 similar comment
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@googlebot googlebot added CLA: no and removed CLA: yes labels Feb 2, 2017
@Foxandxss Foxandxss merged commit 1101f07 into angular:master Feb 2, 2017
@Urigo Urigo mentioned this pull request Feb 3, 2017
9 tasks
@filipesilva filipesilva deleted the add-src-folder branch February 3, 2017 10:28
abdel-ships-it pushed a commit to abdel-ships-it/angular.io that referenced this pull request Feb 11, 2017
* boilerplate, gulpfile, quickstart

* move ts files up to cookbooks

* move rest of ts files

* fix tsconfig, default build task, json file

* fix js examples

* fix webpack example

* remove a2docs.css references

* fix aot examples

* fix webpack run task

* fix cb-i18n

* fix upgrade examples

* fix unit tests

* fix comment in deployment index

* removed unused typings.json

* fix plunkers

* fix js example paths

* fix ts quickstart/setup prose

* add src folder note to setup

* broadly replace app/ -> src/app/

* broadly replace main.ts

* broadly replaced index.html

* broadly replace tsconfig

* replace systemjs

* fix filetrees

* Minor prose fixes to aot, i18n cookbooks

* remove char harp was complaining about

* update new reactive forms example

* fix quickstart jade error

* fix mistakes uncovered by CI

* fix bad filename errors

* edit style guide 04-06 rule to use src

* add changelog

* Incorporate Jesus's feedback

* fix snippet headers in toh1/2

* chore: tweak changelog and setup text
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants