Skip to content
Snippets Groups Projects
Commit 03a71416 authored by jvanboxtel@wisc.edu's avatar jvanboxtel@wisc.edu
Browse files

ROENROLL-1215

parent 9ea5abda
No related branches found
No related tags found
No related merge requests found
# Course Search & Enroll - Front End # Course Search & Enroll - Front End
#### Run `npm install -g @angular/cli` then `npm install` to get started #### First time run `npm install -g @angular/cli` then `npm install`
#### Next run `npm start` to start server
## Required Reading! ## Required Reading!
......
This diff is collapsed.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e", "e2e": "ng e2e",
"postinstall": "npm start" "build-prod": "npm version patch && node ./update-version.js && ng build --prod"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
"karma-jasmine": "~1.1.1", "karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^1.3.1", "karma-jasmine-html-reporter": "^1.3.1",
"protractor": "^5.4.1", "protractor": "^5.4.1",
"replace-in-file": "^3.4.2",
"ts-node": "~7.0.1", "ts-node": "~7.0.1",
"tslint": "~5.11.0", "tslint": "~5.11.0",
"typescript": "~3.1.3" "typescript": "~3.1.3"
......
export const environment = { export const environment = {
production: true production: true,
version: '0.0.1'
}; };
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
// The list of file replacements can be found in `angular.json`. // The list of file replacements can be found in `angular.json`.
export const environment = { export const environment = {
production: false production: false,
version: 'DEV'
}; };
/* /*
......
var replace = require('replace-in-file');
var package = require("./package.json");
var buildVersion = package.version;
const options = {
files: 'src/environments/environment.prod.ts',
from: /version: '(.*)'/g,
to: "version: '"+ buildVersion + "'",
allowEmptyPaths: false,
};
try {
let changedFiles = replace.sync(options);
if (changedFiles == 0) {
throw "Please make sure that file '" + options.files + "' has \"version: ''\"";
}
console.log('Build version set: ' + buildVersion);
}
catch (error) {
console.error('Error occurred:', error);
throw error
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment