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
Some examples of **good practises**, **tips**, and **boilerplates** that I like to follow. You will find the different technologies on the branches and we will add more examples in the future.
3
+
4
+
Feel free to give feedback and improvements to the repo.
[<imgsrc="https://raw.githubusercontent.com/CKGrafico/Frontend-Boilerplates/gh-pages/resources/techs/nodets.png"width="150"title="Nodejs with TypeScript">](https://github.com/CKGrafico/Frontend-Boilerplates/tree/node-ts-master)
13
10
14
11
## Quickstart
15
-
On this repo you can find some boilerplates based on Gulp, each branch has a different example.
16
-
We try not only to use Gulp, also to use best practises and real examples that we can use on real projects.
17
-
-**[master](https://github.com/CKGrafico/Gulp-Boilerplates/tree/master):** Stable version of a basic and generic example.
18
-
-**[dev](https://github.com/CKGrafico/Gulp-Boilerplates/tree/dev):** Dev version of a TypeScript example.
19
-
-**[ts-master](https://github.com/CKGrafico/Gulp-Boilerplates/tree/ts-master):** Stable version of a TypeScript example.
20
-
-**[ts-dev](https://github.com/CKGrafico/Gulp-Boilerplates/tree/ts-dev):** Dev version of a basic and generic example.
21
-
-**[node-ts-master](https://github.com/CKGrafico/Gulp-Boilerplates/tree/node-ts-master):** Stable version of node-based with TypeScript example.
22
-
-**[node-ts-dev](https://github.com/CKGrafico/Gulp-Boilerplates/tree/node-ts-dev):** Dev version of node-based with TypeScript example.
23
-
-**[vue-master](https://github.com/CKGrafico/Gulp-Boilerplates/tree/vue-master):** Stable version of vue-based example.
24
-
-**[vue-dev](https://github.com/CKGrafico/Gulp-Boilerplates/tree/vue-dev):** Dev version of vue-based example.
25
-
-**ng2-master:** Stable version of angular2-based example. [To do]
26
-
-**ng2-dev:** Dev version of angular2-based example.
**[vue-master:](https://github.com/CKGrafico/Frontend-Boilerplates/tree/vue-master)** Stable version of a **Vuejs** example with SCSS and TypeScript.
25
+
<br>**[vue-dev:](https://github.com/CKGrafico/Frontend-Boilerplates/tree/vue-dev)** Dev version of a **Vuejs** example with SCSS and TypeScript.
26
+
27
+
<imgsrc="https://raw.githubusercontent.com/CKGrafico/Frontend-Boilerplates/gh-pages/resources/techs/nodets.png"align="left"width="50"title="Node with TypeScript">
28
+
29
+
**[node-ts-master:](https://github.com/CKGrafico/Frontend-Boilerplates/tree/node-ts-master)** Stable version of a **Nodejs with TypeScript** example with SCSS and Nodejs.
30
+
<br>**[node-ts-dev:](https://github.com/CKGrafico/Frontend-Boilerplates/tree/node-ts-dev)** Dev version of a **Nodejs with TypeScript** example with SCSS and Nodejs.
31
+
32
+
## 🍩 App Features
41
33
On this branch _(Basic)_ we use:
42
34
-**BEM + BEMIT + etc:** A mix of BEM and related-BEM technologies to create conventions for CSS classes.
43
35
-**TypeScript:** This project uses TypeScript instead of JavaScript.
44
36
-**Linting:** Linting for JavaScript and SASS.
45
37
-**Normalize:** Normalize our css, you can extend it easily.
46
38
-**SASS:** Scss structure with good practises.
47
39
48
-
**[ back to top](#table-of-contents)**
40
+
**[⬆️ back to top](#quickstart)**
49
41
50
-
## Tasks Technologies
42
+
## ⚙️ Automated Tasks
51
43
On this branch _(Basic)_ we use:
44
+
-**Concurrently:** Execute two tasks in parallel.
52
45
-**Gulp Autoprefixer:** Add browser prefixes for last two versions of the browsers.
53
46
-**Gulp Clean CSS:** To minify CSS.
54
47
-**Gulp Environment:** Call to different tasks depending of the environment.
@@ -58,7 +51,6 @@ On this branch _(Basic)_ we use:
58
51
-**Gulp Newer:** On some tasks we want to do something only with the newer files.
59
52
-**Gulp Nodemon:** To launch the NodeJS application.
60
53
-**Gulp Noop:** Basic Noop but on stream.
61
-
-**Gulp Rollup:** To transpile out code.
62
54
-**Gulp Sass:** Compile Scss to CSS.
63
55
-**Gulp Sasslint:** Linting for SASS.
64
56
-**Gulp Sourcemaps:** Generate Sourcemaps when is necessary.
@@ -68,30 +60,34 @@ On this branch _(Basic)_ we use:
68
60
-**Require all:** Load all gulp tasks once.
69
61
-**Yarn:** Instead of NPM.
70
62
71
-
**[ back to top](#table-of-contents)**
63
+
**[⬆️ back to top](#quickstart)**
72
64
73
-
## Running tasks
65
+
## ⏰ Running tasks
74
66
To run the tasks we have these three commands:
75
67
- Install dependencies:
76
-
> yarn install
68
+
> npm install
69
+
70
+
- Running tasks on production mode:
71
+
> npm run prod
77
72
78
73
- Running tasks on development mode:
79
-
> yarn run dev
74
+
> npm run dev
80
75
81
-
- Running tasks on production mode:
82
-
> yarn run prod
76
+
- Running tasks on local mode:
77
+
> npm run local
83
78
84
-
- Running tasks on watch mode:
85
-
> yarn run watch
79
+
- Running tasks on watch mode and serve the app:
80
+
> npm start
86
81
87
-
**[ back to top](#table-of-contents)**
82
+
**[⬆️ back to top](#quickstart)**
88
83
89
-
## Environments
84
+
## 🔮 Environments
90
85
On this project we have two environments:
91
-
-**Development:** To use with dev and watch tasks
92
-
-**Production:** To minify the code and use on production
86
+
-**Local:** Use this on your computer
87
+
-**Development:** Use this on your dev server
88
+
-**Production:** Use this on your production server
93
89
94
-
## Project structure
90
+
## ⛩️ Project structure
95
91
On this branch _(Basic)_ the structure is:`
96
92
```
97
93
./
@@ -138,6 +134,12 @@ On this branch _(Basic)_ the structure is:`
138
134
├── dist/ # Distribution folder
139
135
│
140
136
├── tasks/ # Gulp tasks
137
+
│ ├── config/
138
+
│ │ ├── helpers.js # Helpers that useful for tasks
139
+
│ │ └── options.js # Internal operation to use with tasks
140
+
│ ├── rules/
141
+
│ │ ├── scripts.js # Create a bundle for JavaScript files
142
+
│ │ └── scripts-lint.js # Check linting of JavaScript files
141
143
│ ├── assets.js # Minify images and generate fonts
142
144
│ ├── clean.js # Clean distribution folder
143
145
│ ├── copy.js # Copy index.html to dist
@@ -149,18 +151,20 @@ On this branch _(Basic)_ the structure is:`
0 commit comments