Skip to content

Commit dc95fac

Browse files
committed
Release 0.0.2
Add gitignore as we are now a submodule Improve package.json Add script to copy LICENSE and CHANGELOG.md
1 parent a41a3b5 commit dc95fac

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea/
2+
*.iml
3+
node_modules/

package.json

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
{
22
"name": "ngx-image-blur",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
4+
"description": "Simple image blur loader component for Angular >= 2, inspired by image blur loading on Medium.",
5+
"repository": {
6+
"type": "git",
7+
"url": "https://github.com/hughjdavey/ngx-image-blur.git"
8+
},
9+
"homepage": "https://github.com/hughjdavey/ngx-image-blur/blob/master/README.md",
10+
"bugs": "https://github.com/hughjdavey/ngx-image-blur/issues",
11+
"keywords": [
12+
"angular", "image", "blur", "image loading", "image blur"
13+
],
14+
"author": "hughjd",
15+
"license": "CC0-1.0",
416
"peerDependencies": {
517
"@angular/common": ">=2.0.0 < 9.0.0",
618
"@angular/core": ">=2.0.0 < 9.0.0"
19+
},
20+
"scripts": {
21+
"build": "ng build ngx-image-blur",
22+
"postbuild": "node scripts/copy-artifacts.js"
723
}
824
}

scripts/copy-artifacts.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// inspired by https://medium.com/consonance/building-an-angular-library-with-the-angular-cli-version-6-384ee85933ad
2+
3+
const fs = require('fs');
4+
const path = require('path');
5+
const artifacts = ['README.md', 'CHANGELOG.md', 'LICENSE'];
6+
7+
artifacts.forEach(file => {
8+
let fromPath = path.resolve(__dirname, '..', '', file);
9+
let destPath = path.resolve(__dirname, '..', '', file);
10+
11+
fs.readFile(fromPath, 'utf-8', (err, data) => {
12+
if (err) {
13+
console.log(`Read error occurred: ${err}`);
14+
return;
15+
}
16+
17+
fs.writeFile(destPath, data, (err) => {
18+
if (err) {
19+
console.log(`Write error occurred: ${err}`);
20+
return;
21+
}
22+
console.log(`Copied ${file}:`);
23+
})
24+
})
25+
});

0 commit comments

Comments
 (0)