You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
improvement(cofig.ts): throw an error when ./dist is used as outputpath in angular.json (#188)
We will run into trouble when an user uses './dist` without subfolder. This PR does docuent that,
and also make scully check, and throw en error when this is detected
re #56
Copy file name to clipboardExpand all lines: docs/getting-started.md
+30-27Lines changed: 30 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,37 +1,38 @@
1
1
# Scully - Getting Started
2
2
3
-
## Prerequisites
4
-
The first thing you need to get started with Scully is a working Angular app using **Angular 9.x.x** and **Node 12.x.x**
3
+
## Prerequisites
4
+
5
+
The first thing you need to get started with Scully is a working Angular app using **Angular 9.x.x** and **Node 12.x.x**
5
6
6
7
You can create a new Angular 9 app using the following command:
7
8
8
-
```
9
+
```bash
9
10
npx -p @angular/cli@next ng new my-scully-app
10
11
```
11
-
12
+
12
13
If that fails, you can install the `next` version of Angular CLI globally and create a new app with that version.
13
-
14
+
14
15
**Note**: doing this means that any new apps you will create after this will use version 9.
15
-
16
+
16
17
```
17
18
npm install -g @angular/cli@next
18
19
ng new my-scully-app
19
20
```
20
21
21
-
22
22
Find more info here [👉 angular.io/cli](https://angular.io/cli)
23
23
24
-
__NOTE:__Scully will use Chromium. Make sure your Operating System (and its restrictions by your administrator) allow installing and executing Chromium.
24
+
**NOTE:**Scully will use Chromium. Make sure your Operating System (and its restrictions by your administrator) allow installing and executing Chromium.
25
25
26
26
This getting started doc covers the three steps to adding Scully into your project.
27
27
28
28
1.[Installation](#installation)
29
29
2.[Build](#build)
30
30
3.[Test](#test)
31
31
32
-
33
32
## Installation
33
+
34
34
To install Scully, execute the following command from the root directory of your Angular project (in a terminal window):
#### IMPORTANT: *Scully requires the router to be present in your application, don't forget to add it.*
58
+
#### IMPORTANT: _Scully requires the router to be present in your application, don't forget to add it._
59
+
60
+
#### IMPORTANT: _Scully requires the distrubution files to be in a subfolder of `./dist`_
61
+
62
+
If you have an angular app, that outputs the distribution files directly into to root of `./dist` Scully can't copy all of the dist files. This is an OS file-system issue. We can't copy recursively into a subfolder of dist. The solution is set the option `architect->build->options->outputPath` to a subfolder.
58
63
59
64
## ng g @scullyio/init:blog
65
+
60
66
This command will generate a blog module. [more info here](https://github.com/scullyio/scully/blob/master/docs/blog.md)
61
67
62
68
Once it's generated you can open the default `app.component.html` created by angular-cli and remove the whole placeholder leaving only the router outlet tag `<router-outlet></router-outlet>`
@@ -79,9 +85,9 @@ Open `app-routing.module.ts` and let the path attribute empty for the home route
@@ -120,7 +123,6 @@ and then loop inside `home.component.html`
120
123
<ul>
121
124
<li*ngFor="let page of links$ | async">{{ page.route }}</li>
122
125
</ul>
123
-
124
126
```
125
127
126
128
## Build
@@ -138,10 +140,10 @@ npm run scully
138
140
That's it, you're done! In your project directory, you should now have a `/dist/static` folder containing the built version
139
141
of your app.
140
142
141
-
__NOTE:__ If you had any errors or warnings during the build phase, please follow the instructions in the errors/warnings
143
+
**NOTE:** If you had any errors or warnings during the build phase, please follow the instructions in the errors/warnings
142
144
(if applicable) or [submit an issue](https://github.com/scullyio/scully/issues/new/choose).
143
145
144
-
__NOTE:__ If you don't add any route, scully will pre-render 0 pages.
146
+
**NOTE:** If you don't add any route, scully will pre-render 0 pages.
145
147
146
148
## Test
147
149
@@ -153,9 +155,9 @@ By utilizing something like [http-server](https://www.npmjs.com/package/http-ser
153
155
`dist/static` folder. All of the routes in your non-pre-rendered Angular app should still work. Not all apps are
154
156
capable of running without
155
157
156
-
[//]: #(Missing text for the line above)
158
+
[//]: #'Missing text for the line above'
157
159
158
-
__Extra Credit__: While serving your app, [disable JavaScript](https://developers.google.com/web/tools/chrome-devtools/javascript/disable)
160
+
**Extra Credit**: While serving your app, [disable JavaScript](https://developers.google.com/web/tools/chrome-devtools/javascript/disable)
159
161
and make sure that it still works. This is the goal for your app, to run with JavaScript disabled. Most parts of your app should still work without JS enabled.
160
162
161
163
#### Browsing the contents
@@ -164,4 +166,5 @@ Browse the contents of your `dist/static` directory and make sure that all of yo
0 commit comments