Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

Commit

Permalink
build: store version in package.json + release 1.0.0-beta.14
Browse files Browse the repository at this point in the history
  • Loading branch information
navix committed Sep 16, 2017
1 parent 6fc42d2 commit a7f36d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-kit-styler",
"version": "0.0.0",
"name": "styler-src",
"version": "1.0.0-beta.14",
"license": "MIT",
"scripts": {
"build": "npm run build:clean && npm run build:ngc && npm run build:rollup:es && npm run build:rollup:umd && npm run build:release",
Expand Down
3 changes: 2 additions & 1 deletion release.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
const path = require('path');
const fs = require('fs-extra');

const pkg = require('./package.json');
const config = require('./release.config.json');

// Copy sources
//fs.copySync(path.resolve('package'), path.resolve('dist/package'));
// Generate package.json
const blueprint = fs.readFileSync(path.resolve('package/package.json'), 'utf-8');
const result = blueprint
.replace(/0\.0\.0\-PLACEHOLDER/g, config.version)
.replace(/0\.0\.0\-PLACEHOLDER/g, pkg.version)
.replace(/0\.0\.0\-ANGULAR\-PLACEHOLDER/g, config.vendors.angular)
.replace(/0\.0\.0\-TYPESCRIPT\-PLACEHOLDER/g, config.vendors.typescript);
fs.writeFileSync(path.resolve('dist/release/package.json'), result);
Expand Down

0 comments on commit a7f36d9

Please sign in to comment.