1.0.2 • Published 5 years ago
@xlayers/version-stamp v1.0.2
What is xLayers version-stamp?
With xLayers version-stamp we've started a new initiative of providing a community-driven way of version stamping that will help on a daily base for everybody! The xLayers projects are driven by community contributions. Please send us your Pull Requests and feedback!
Quick start
Add
@xlayers/version-stampto your projectng add @xlayers/version-stampThe package will make some small changes to the
angular.jsonAdd the following snippet (only the version property) to your environment files.
export const environment = {
production: false,
version: '_BUILD_HASH_',
};- Use the version that the packages has provided in your
environmentproperties.
import { environment } from '../environment'
```
```ts
@Component({
selector: 'xlayers-builders-root',
})
export class AppComponent {
version = environment.version;
}
```
5. Now you can stamp your build
```bash
ng run <your-app>:stampUsage
You can adjust some options to your needs. The available options are:
--version- You can put in here your own version.
Example:
ng run <your-app>:stamp --version="1.0.0"--files- You can put in here the list of file patterns containing_BUILD_HASH_
Example:
ng run <your-app>:stamp --files=*.js,*.jsonYou can also set the configuration in angular.json
"stamp": {
"builder": "@xlayers/version-stamp:stamp",
"options": {
"outputPath": "dist/packages/demo",
"files": ["*.js", "*.json"]
}
}