autofront 1.5.6 → 1.6.1

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 +12 -5
  2. package/index.js +10 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -35,7 +35,14 @@ The main supported packages/languages/libraries are:
35
35
  `gulpfile.js` simply would look like:
36
36
 
37
37
  ```js
38
- require('proa-gulp');
38
+ require('autofront');
39
+ ```
40
+
41
+ Optionally, to work with [HTML5 mode](https://docs.angularjs.org/api/ng/provider/$locationProvider#html5Mode), invoke `html5Mode` to prefix path of assets.
42
+
43
+ ```js
44
+ var autofront = require('autofront');
45
+ autofront.html5Mode();
39
46
  ```
40
47
 
41
48
  ### Folder structure
@@ -63,10 +70,10 @@ Running Gulp command, an additional parameter can be included (e.g.: `gulp --dev
63
70
 
64
71
  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
72
 
66
- And, to capture the selected URL, put `{{PROA_DOMAIN}}` where it would be located in your source code.
73
+ And, to capture the selected URL, put `{{AUTOFRONT_DOMAIN}}` where it would be located in your source code.
67
74
 
68
75
  ## Pending
69
76
 
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.
77
+ - Once the server waits for changes, synchronize also the deletion of files (from `src`).
78
+ - Sass errors must not break the Gulp process (like Less).
79
+ - 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
@@ -1,3 +1,5 @@
1
+ this.html5Mode = html5Mode;
2
+
1
3
  const gulp = require('gulp'),
2
4
  args = require('get-gulp-args')(),
3
5
  mergeStream = require('merge-stream'),
@@ -12,9 +14,9 @@ var domain = undefined;
12
14
 
13
15
  const allFiles = getFiles(),
14
16
  indexHtmlFile = 'index.html',
15
- stylesFolder = 'styles/',
16
17
  cssFilename = 'index',
17
- cssFullFilename = cssFilename+'.css',
18
+ cssFullFilename = cssFilename+'.css';
19
+ var stylesFolder = 'styles/',
18
20
  jsTemplatesFile = 'scripts/templates.js';
19
21
 
20
22
  const paths = {
@@ -118,6 +120,12 @@ gulp.task('serve:dist', ['build'], () => browserSyncInit(paths.dist));
118
120
 
119
121
  gulp.task('default', ['serve']);
120
122
 
123
+ function html5Mode() {
124
+ const pathPrefix = '/';
125
+ stylesFolder = pathPrefix + stylesFolder;
126
+ jsTemplatesFile = pathPrefix + jsTemplatesFile;
127
+ }
128
+
121
129
  function getFiles(ext) {
122
130
  ext = ext || '*';
123
131
  const isArray = typeof ext != 'string';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autofront",
3
- "version": "1.5.6",
3
+ "version": "1.6.1",
4
4
  "description": "Gulp settings for front-end projects.",
5
5
  "main": "index.js",
6
6
  "scripts": {