Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Updates to support Windows #185

Merged
merged 30 commits into from
Jul 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d76511e
Updates to support Windows
Jun 15, 2017
0bb6c7b
Update angular (#189)
Blackbaud-PatrickOFriel Jun 17, 2017
a7c3277
updates for rc.0 release (#190)
Blackbaud-PatrickOFriel Jun 17, 2017
189eb63
Omnibar config (#193)
Jun 20, 2017
314aefd
Fixed codelyzer path (#192)
Blackbaud-SteveBrush Jun 20, 2017
28830ba
Ignore public directory when generating components (#187)
Blackbaud-SteveBrush Jun 20, 2017
424672f
Plugin File Processor should not check directories (#186)
Blackbaud-SteveBrush Jun 20, 2017
1085d54
Updated CHANGELOG.md and package.json for 1.0.0-rc.1 (#194)
Jun 20, 2017
6de9f1f
Updated template branch, bug fix for component pattern (#195)
Blackbaud-SteveBrush Jun 20, 2017
ec53b11
Merge branch 'master' into windows-build
Blackbaud-SteveBrush Jun 21, 2017
9e52340
Release 1.0.0 rc.2 (#196)
Blackbaud-SteveBrush Jun 21, 2017
b9f8688
Remove extra s. (#197)
blackbaud-johnly Jun 22, 2017
256d4b8
Fixed type error, updated SKY UX (#199)
Blackbaud-SteveBrush Jun 23, 2017
db62d70
Release 1.0.0 rc.3 (#200)
Blackbaud-SteveBrush Jun 23, 2017
af9050a
More fixes to support Windows
Jun 27, 2017
806c69c
Merge branch 'windows-build' of github.com:blackbaud/skyux-builder in…
Jun 27, 2017
978813f
Param functionality (#201)
Jun 27, 2017
4272474
Fixed `skyux test/watch` performance (#202)
Blackbaud-SteveBrush Jun 29, 2017
3ed462a
Release 1.0.0-rc.4 (#207)
Blackbaud-SteveBrush Jun 29, 2017
7fcfe14
Added to skyux builder (#204)
Blackbaud-SandhyaRajasabeson Jun 30, 2017
5454e9a
Updated package dependencies (#208)
Blackbaud-SteveBrush Jul 1, 2017
9320118
Add hash routing option for easy mode. (#206)
Blackbaud-AdamHickey Jul 3, 2017
3846c64
Updates rc5 (#209)
Blackbaud-PatrickOFriel Jul 3, 2017
7c58a14
Capitalize Angular. (#211)
blackbaud-johnly Jul 3, 2017
f7c24e9
Wrote failing test. Then made config property public for template (#…
Jul 5, 2017
179f34d
Resolved merge conflicts
Jul 5, 2017
5283566
Merge branch 'master' into windows-build
Jul 5, 2017
2eb9ed7
Merge branch 'master' into windows-build
Jul 5, 2017
cc60be1
Merge branch 'master' into windows-build
Blackbaud-SteveBrush Jul 10, 2017
5759425
Merge branch 'master' into windows-build
Jul 12, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"requireLineFeedAtFileEnd": null,
"requireTrailingComma": null,
"requirePaddingNewLinesBeforeLineComments": null,
"validateLineBreaks": null,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule validates LF vs CRLF. Since we don't specify default line-endings via a .gitattributes file, this rule will fail when someone on Windows attempts to contribute code.

"excludeFiles": [
"coverage/**"
]
Expand Down
8 changes: 4 additions & 4 deletions config/protractor/protractor-dev.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const SpecReporter = require('jasmine-spec-reporter').SpecReporter;

const common = require('../../e2e/shared/common');
const commonConfig = require('./protractor.conf');

let config = {
specs: [
path.join(process.cwd(), 'e2e', '**', '*.e2e-spec.js')
Expand All @@ -20,8 +21,8 @@ let config = {
return new Promise((resolve, reject) => {
const url = 'https://github.com/blackbaud/skyux-template';
const branch = 'update-angular425';
common.exec(`rm`, [`-rf`, `${common.tmp}`])


common.rimrafPromise(common.tmp)
.then(() => common.exec(`git`, [
`clone`,
`-b`,
Expand All @@ -30,7 +31,6 @@ let config = {
url,
common.tmp
]))

.then(() => common.exec(`npm`, [`i`, '--only=prod'], common.cwdOpts))
.then(() => common.exec(`npm`, [`i`, `../`], common.cwdOpts))
.then(resolve)
Expand All @@ -44,7 +44,7 @@ let config = {
common.afterAll();

return new Promise((resolve, reject) => {
common.exec(`rm`, [`-rf`, `${common.tmp}`])
common.rimrafPromise(common.tmp)
.then(resolve)
.catch(reject);
});
Expand Down
21 changes: 19 additions & 2 deletions e2e/shared/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
const fs = require('fs');
const path = require('path');
const merge = require('merge');
const rimraf = require('rimraf');
const portfinder = require('portfinder');
const HttpServer = require('http-server');
const childProcessSpawn = require('child_process').spawn;
const childProcessSpawn = require('cross-spawn');

const tmp = './.e2e-tmp/';
const cwdOpts = { cwd: tmp };
Expand Down Expand Up @@ -130,7 +131,7 @@ function prepareBuild(config) {
writeConfig(config);

return new Promise((resolve, reject) => {
exec(`rm`, [`-rf`, `${tmp}/dist`])
rimrafPromise(path.join(tmp, 'dist'))
.then(() => exec(`node`, [cliPath, `build`], cwdOpts))
.then(serve)
.then(resolve)
Expand Down Expand Up @@ -163,6 +164,21 @@ function resetConfig() {
writeConfig(skyuxConfigOriginal);
}

/**
* Wraps the rimraf command in a promise.
*/
function rimrafPromise(dir) {
return new Promise((resolve, reject) => {
rimraf(dir, err => {
if (err) {
reject(err);
} else {
resolve();
}
});
});
}

/**
* Writes the specified json to the skyuxconfig.json file
*/
Expand Down Expand Up @@ -268,6 +284,7 @@ module.exports = {
getExitCode: getExitCode,
prepareBuild: prepareBuild,
prepareServe: prepareServe,
rimrafPromise: rimrafPromise,
tmp: tmp,
writeAppFile: writeAppFile,
removeAppFile: removeAppFile,
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"coverage": "npm run coverage:builder && npm run coverage:runtime && npm run coverage:src-app",
"coverage:builder": "istanbul cover --report=html --dir=./coverage/builder jasmine JASMINE_CONFIG_PATH=jasmine.json",
"coverage:builder": "istanbul cover --report=html --dir=./coverage/builder ./node_modules/jasmine/bin/jasmine.js JASMINE_CONFIG_PATH=jasmine.json",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"coverage:runtime": "node ./utils/cli-test.js dev-runtime",
"coverage:src-app": "node ./utils/cli-test.js dev-src-app",
"e2e": "webdriver-manager update && protractor ./config/protractor/protractor-dev.conf.js",
Expand Down Expand Up @@ -96,11 +96,13 @@
"zone.js": "0.8.10"
},
"devDependencies": {
"cross-spawn": "5.1.0",
"istanbul": "0.4.5",
"jasmine": "2.6.0",
"jscs": "3.0.7",
"jshint": "2.9.4",
"mock-require": "2.0.2",
"proxyquire": "1.8.0"
"proxyquire": "1.8.0",
"rimraf": "2.6.1"
}
}
4 changes: 2 additions & 2 deletions test/sky-pages-route-generator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('SKY UX Builder route generator', () => {
}
});

expect(suppliedPattern).toEqual('my-custom-src/my-custom-pattern');
expect(suppliedPattern).toEqual(path.join('my-custom-src', 'my-custom-pattern'));
});

it('should handle windows guard paths correctly', () => {
Expand Down Expand Up @@ -180,7 +180,7 @@ describe('SKY UX Builder route generator', () => {
@Injectable() export class Guard2 {}
`);

let file = 'my-custom-src/my-custom-route/index.guard.ts';
let file = path.join('my-custom-src', 'my-custom-route', 'index.guard.ts');
expect(() => generator.getRoutes({
runtime: {
srcPath: 'my-custom-src/',
Expand Down