pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/marcode04/fe-build/commit/eb5bdbdb036a7f1c1918af6cff8354824874fe68

0aeda.css" /> Reviewed main README.MD · marcode04/fe-build@eb5bdbd · GitHub
Skip to content

Commit eb5bdbd

Browse files
author
Raul Parralejo
committed
Reviewed main README.MD
1 parent e527f05 commit eb5bdbd

File tree

1 file changed

+66
-65
lines changed

1 file changed

+66
-65
lines changed

README.md

Lines changed: 66 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -8,55 +8,55 @@ Frontend build tools for AEM projects.
88
[![semver: semantic-release](https://img.shields.io/badge/semver-semantic--release-blue.svg)](https://github.com/semantic-release/semantic-release)
99
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
1010

11-
## Intro
12-
All in one solution for modern Frontend projects, with special focus on AEM (Adobe Experience Manager)
13-
14-
## Installation
11+
## Abstract
12+
All-in-one solution for modern Frontend projects, with special focus on [Adobe Experience Manager](https://business.adobe.com/products/experience-manager/adobe-experience-manager.html) development (AEM). It compiles your SCSS and JS source files and creates the appropriate [clientLibs](https://experienceleague.adobe.com/docs/experience-manager-65/developing/introduction/clientlibs.html?lang=en) to be included by AEM.
1513

14+
## Getting started
15+
Use [npm](https://docs.npmjs.com/about-npm/) to install fe-build:
1616
```
1717
npm i @netcentric/fe-build
1818
```
1919

2020
## Usage
21-
1.1. Add `nc-fe-build` task in package.json scripts
21+
Add `nc-fe-build` task in the scripts section of your package.json file:
2222
```
2323
"scripts": {
2424
"build": "nc-fe-build"
2525
},
2626
```
27-
1.2. Run npm task
27+
Run the npm task:
2828
```
29-
npm run build
29+
npm run build
3030
```
3131

32+
## Features
3233
### JavaScript
3334

34-
1. Lint sourcecode with Eslint
35-
2. Transpile with Babel
36-
3. Bundle and optimize with Webpack
37-
4. Analyze bundles with webpack-bundle-analyzer
35+
- Lint source code with [ESLint](https://eslint.org/).
36+
- Transpilation with [Babel](https://babeljs.io/).
37+
- Bundled and optimized with [Webpack](https://webpack.js.org/).
38+
- Analyze bundles with [Webpack Bundle Analyzer](https://www.npmjs.com/package/webpack-bundle-analyzer).
3839

3940
### CSS
4041

41-
1. Lint sourcecode with Stylelint
42-
2. Compile with sass (ex dart-sass)
43-
3. Transform with Autoprefixer
42+
- Lint source code with [Stylelint](https://stylelint.io/).
43+
- [SASS](https://sass-lang.com/) compilation.
44+
- Add vendor prefixes with [Autoprefixer](https://github.com/postcss/autoprefixer).
4445

4546
### ClientLibraries
4647

47-
1. Automatically create clientLibrary based on source file
48-
2. Include all bundled files
48+
1. Automatically create [clientLibrary resources](https://experienceleague.adobe.com/docs/experience-manager-65/developing/introduction/clientlibs.html?lang=en) based on the source files.
49+
2. Include all generated CSS and JS files in the css.txt and js.txt files.
4950

50-
## Configuration file
51+
## Configuration
5152

52-
Default configuration can be extended via `.febuild` file.
53-
Config file is loaded and executed as JavaScript module.
54-
Custom configuration is used for all files located in the same directory as `.febuild`
55-
and in subdirectory tree.
53+
The default configuration can be extended via a `.febuild` file.
54+
This configuration file is loaded and executed as a JavaScript module.
55+
It is used for all files located in the same directory as the `.febuild` file and in the subdirectory tree.
5656

57-
Add `.febuild` whenever you need group of files to use separate build options.
57+
You can add multiple `.febuild` whenever you need to run a separate build with other options.
5858

59-
Configuration that can be extended:
59+
These are the configurations that can be extended:
6060
- general
6161
- output
6262
- resolve
@@ -70,7 +70,7 @@ Configuration that can be extended:
7070
- templates
7171
- clientlibs
7272

73-
Eg, to override default babel config:
73+
E.g., to override the default Babel configuration:
7474
`.febuild`:
7575
```
7676
module.exports = {
@@ -85,85 +85,86 @@ module.exports = {
8585
};
8686
```
8787

88-
Configuration details: [CONFIG](./docs/configuration.md)
89-
90-
NPM tasks: [TASKS](./docs/tasks.md)
88+
Configuration details: [CONFIG](./docs/configuration.md).
89+
Available npm tasks: [TASKS](./docs/tasks.md).
9190

9291

9392
## Quick start
9493

95-
Check default settings for specific parts in: [CONFIG](./docs/configuration.md)
96-
97-
First config that you need to adapt are probably Source and Bundle paths.
98-
Default values are `src` and `dist` directories. I f you have different structure, override this values in `.febuild` file.
99-
Default source file suffix is `*.souorce.*`
94+
The first configurations that you need to adapt are probably the source and destination paths.
95+
The default paths are `src` for the source path and `dist` for the destination path. If you have a different structure, you can override these values in your `.febuild` file.
10096

101-
eg. Your project
97+
e.g. In your project:
10298

10399
```
104-
--package.json
105-
--projectSrcDir
100+
-- package.json
101+
-- projectSrcDir
106102
|-- component
107-
|--file.scss
103+
|-- file.scss
108104
```
109105

110-
On first run of NPM build task, no files will be processed, because there is no match with default settings.
106+
Note that on the first run of the npm build task, no files will be processed, because no file matches with default settings.
107+
108+
To start the build and update the default settings, add a `.febuild` file in your `projectSrcDir` directory with no configuration.
109+
```
110+
module.exports = {}
111+
```
111112

112-
To update default settings add `.febuild` file in your `projectSrcDir` dir.
113+
You can check the default settings for each specific section in [CONFIG](./docs/configuration.md).
113114

114-
### Custom source dir
115+
### Custom source path
115116

116-
Two updates are needed:
117-
1. Add `source` suffix to all files that needs to be processed
118-
- `file.scss` --> `file.source.scss`
119-
2. Change source dir to `projectSrcDir`, in `.febuild`
117+
In order to start processing your files, two updates are needed:
118+
1. Add the `source` suffix to all the files that needs to be processed. This suffix value is defined in `general.sourceKey`.
119+
`file.scss` --> `file.source.scss`
120+
2. Change the source directory to `projectSrcDir` in the `.febuild` file.
120121
```
121122
module.exports = {
122123
general: {
123-
sourcesPath: 'path/to/projectSrcDir',
124+
sourcesPath: './projectSrcDir',
124125
}
125126
}
126127
```
127-
- if sourcePath is not provided, path to `.febuild` will be used. For this simple example, this is enough.
128-
```
129-
module.exports = {}
130-
```
128+
if `sourcePath` is not provided, the path to `.febuild` file will be used instead. For this simple example, that is enough.
131129
132-
After running build task:
130+
After running again the npm build task, this will be the output the destination folder:
133131
```
134-
--package.json
135-
--projectSrcDir
132+
-- package.json
133+
-- .febuild
134+
-- projectSrcDir
136135
|-- component
137-
|--file.source.scss
138-
--dist
136+
|-- file.source.scss
137+
-- dist
139138
|-- component
140-
|--file.bundle.scss
139+
|-- file.bundle.scss
141140
```
142141
143-
### Custom dist dir
142+
### Custom destination path
144143
145-
Add custom `dist` dir path in `.febuild`
144+
To add a custom destination path, add to the `.febuild` file the property `general.destinationPath` with the desired path.
146145
147146
```
148147
module.exports = {
149148
general: {
149+
sourcesPath: './projectSrcDir',
150150
destinationPath: path.resolve(__dirname, '..', 'custom', 'dist', 'path')
151151
}
152152
}
153153
```
154154
155-
Results:
155+
Run the npm build task and check the results:
156156
157157
```
158-
--package.json
159-
--projectSrcDir
158+
-- package.json
159+
-- .febuild
160+
-- projectSrcDir
160161
|-- component
161-
|--file.source.scss
162-
--custom
163-
|--dist
164-
|--path
162+
|-- file.source.scss
163+
-- custom
164+
|-- dist
165+
|-- path
165166
|-- component
166-
|--file.bundle.scss
167+
|-- file.bundle.scss
167168
```
168169
169-
For more customizations, check Configuration details: [CONFIG](./docs/configuration.md)
170+
For more customizations, please check the [Configuration document](./docs/configuration.md).

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy