autofront 1.5.4 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +41 -12
  2. package/index.js +0 -1
  3. package/package.json +8 -3
package/README.md CHANGED
@@ -1,26 +1,48 @@
1
1
  # Autofront
2
2
 
3
- Gulp settings for projects.
3
+ [Gulp](https://gulpjs.com) settings for front-end projects.
4
4
 
5
- ### Requirements
5
+ ## Requirements
6
6
 
7
7
  It is compatible with version [8.17.0](https://nodejs.org/dist/v8.17.0/) of [Node.js](https://nodejs.org).
8
8
 
9
- ## Tasks
9
+ ## Behaviour
10
+
11
+ ### Tasks
12
+
13
+ The Gulp ones are the following:
10
14
 
11
15
  - `gulp` or `gulp serve` are for running a test server and develop with live reload.
12
16
  - `gulp build` only builds the distributable version.
13
17
  - With `gulp serve:dist`, a combination of the above is achieved: Specifically, the server runs this version but without reload.
14
18
 
15
- Additionally, a parameter can be included (e.g.: `gulp --dev` o `gulp build --pro`) to indicate the domain of connection path. Defaults to local. And these domain URLs must to appear listed in `package.json` with the property `domains` (optionally also `domainsAliases`).
19
+ ### Support
20
+
21
+ The main supported packages/languages/libraries are:
22
+
23
+ - [Bower](https://bower.io).
24
+ - Preprocessors:
25
+ - HTML: [Pug](https://pugjs.org).
26
+ - CSS:
27
+ - [Less](https://lesscss.org).
28
+ - [Sass](https://sass-lang.com).
29
+ - [AngularJS](https://angularjs.org).
16
30
 
17
- ## Folder structure
31
+ ## Usage
32
+
33
+ ### Gulp file
34
+
35
+ `gulpfile.js` simply would look like:
36
+
37
+ ```js
38
+ require('autofront');
39
+ ```
40
+
41
+ ### Folder structure
18
42
 
19
43
  Here is the essential basic organization you must to put in your project:
20
44
 
21
45
  ```text
22
- ├─ bower_components/
23
- ├─ nodes_modules/
24
46
  ├─ src/
25
47
  │ ├─ fonts/
26
48
  │ ├─ styles/
@@ -28,16 +50,23 @@ Here is the essential basic organization you must to put in your project:
28
50
  │ │ ├─ index.less
29
51
  │ │ └─ index.scss
30
52
  │ └─ index.html
31
- ├─ .gitignore
32
53
  ├─ bower.json
33
54
  ├─ gulpfile.js
34
- ├─ package-lock.json
35
55
  └─ package.json
36
56
  ```
37
57
 
38
- The disposition of the other files present in `src` is merely indicative; and its content, adjustable and optional.
58
+ In `src`, only `index.html` is required. However, if Sass is used, both files must to exist.
59
+
60
+ ### Domains
61
+
62
+ Running Gulp command, an additional parameter can be included (e.g.: `gulp --dev` o `gulp build --pro`) to indicate the domain of connection path. Defaults to local.
63
+
64
+ These domain URLs must to appear listed in `package.json` with the property `domains` (optionally also `domainsAliases`, to assign domain name for each alias).
65
+
66
+ And, to capture the selected URL, put `{{AUTOFRONT_DOMAIN}}` where it would be located in your source code.
39
67
 
40
68
  ## Pending
41
69
 
42
- - Once the server waits for changes, synchronize also the deletion of files (from `src`).
43
- - Bower should be replaced as a dependency manager. It is currently [under maintenance](https://bower.io/blog/2017/how-to-migrate-away-from-bower/) and, therefore, its use is not recommended.
70
+ - [ ] Once the server waits for changes, synchronize also the deletion of files (from `src`).
71
+ - [ ] Sass errors must not break the Gulp process (like Less).
72
+ - [ ] Bower should be replaced as a dependency manager. It is currently [under maintenance](https://bower.io/blog/2017/how-to-migrate-away-from-bower/) and, therefore, its use is not recommended.
package/index.js CHANGED
@@ -61,7 +61,6 @@ gulp.task('styles', () => {
61
61
  return gulp.src(paths.src+stylesFolder+cssFilename+'.'+ext).pipe(injStr.prepend((extraCode?extraCode+nl:'')+'// bower:'+ext+nl+'// endbower'+nl)).pipe($.wiredep()).pipe(process()).on('error', notifyError);
62
62
  }
63
63
  });
64
-
65
64
  gulp.task('fonts', () => gulp.src(mainBowerFiles()).pipe(filter(['eot','otf','svg','ttf','woff','woff2'], true)).pipe(gulp.dest(paths.tmp+'fonts/')));
66
65
  gulp.task('others', () => {
67
66
  const pugFilter = filter('pug');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "autofront",
3
- "version": "1.5.4",
4
- "description": "Gulp settings for projects.",
3
+ "version": "1.5.7",
4
+ "description": "Gulp settings for front-end projects.",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -11,7 +11,12 @@
11
11
  "url": "git+https://github.com/mvicens/autofront.git"
12
12
  },
13
13
  "keywords": [
14
- "gulp"
14
+ "gulp",
15
+ "bower",
16
+ "pug",
17
+ "less",
18
+ "sass",
19
+ "angularjs"
15
20
  ],
16
21
  "author": "Miquel Alejandro Vicens Dalmau",
17
22
  "license": "ISC",