Skip to content

Commit

Permalink
Merge branch '1431-fix-host-bind'
Browse files Browse the repository at this point in the history
  • Loading branch information
shakyShane committed Oct 6, 2018
2 parents cf0febd + 5ba14b2 commit 92bf7d8
Show file tree
Hide file tree
Showing 735 changed files with 56,492 additions and 9,407 deletions.
3,903 changes: 0 additions & 3,903 deletions client/yarn.lock

This file was deleted.

55 changes: 3 additions & 52 deletions crossbow.yaml
@@ -1,51 +1,8 @@
tasks:

dev:
- '@npm cd client && ./node_modules/.bin/webpack --watch'

(example):
bootstrap: '@sh node dist/bin test/fixtures/bootstrap -w --no-open'

build-all:
- lint
- build-server
- build-client

test:
- build-all
- bs:*
- cli:*
- unit

unit: >
@npm mocha --recursive test/specs --timeout 10000 --bail
build-server:
- '@npm tsc'

build-client:
- '@npm cd client && yarn'
- '@npm cd client && ./node_modules/.bin/webpack'
- '@npm cd client && ./node_modules/.bin/webpack -p --output-filename index.min.js'

lint: >
@npm prettier
lib/**/*
examples/*
test/specs/**/*
test/specs/*.js
client/lib/*
client/lib/messages/*
client/lib/dom-effects/*
client/lib/effects/*
client/lib/listeners/*
--write --tab-width 4
cli: cypress/setup/bs-cli.js
bs: cypress/setup/bs.js
cy: cypress/setup/bs.js

options:
bs:
cy:
_default:
action: run
file-watching-ignore:
Expand All @@ -71,10 +28,4 @@ options:
spec: cypress/integration/logPrefix.js
ui-remote-debug:
config: cypress/configs/file-reloading.js
spec: cypress/integration/ui-remote-debug.js

cli:
file-watching-ignore:
method: 'run'
args: ['test/fixtures', '--files', 'test/fixtures', '--no-open', '--json']
spec: 'cypress/integration/file-watching-ignore.js'
spec: cypress/integration/ui-remote-debug.js
2 changes: 1 addition & 1 deletion cypress/configs/css-console-notify.js
@@ -1,5 +1,5 @@
module.exports = {
server: 'test/fixtures',
server: 'packages/browser-sync/test/fixtures',
open: false,
watch: true,
online: false,
Expand Down
2 changes: 1 addition & 1 deletion cypress/configs/css-overlay-notify.js
@@ -1,5 +1,5 @@
module.exports = {
server: 'test/fixtures',
server: 'packages/browser-sync/test/fixtures',
open: false,
watch: true,
online: false,
Expand Down
2 changes: 1 addition & 1 deletion cypress/configs/file-reloading.js
@@ -1,5 +1,5 @@
module.exports = {
server: 'test/fixtures',
server: 'packages/browser-sync/test/fixtures',
open: false,
watch: true,
online: false,
Expand Down
4 changes: 2 additions & 2 deletions cypress/configs/file-watching-ignore.js
@@ -1,7 +1,7 @@
module.exports = {
server: 'test/fixtures',
server: 'packages/browser-sync/test/fixtures',
open: false,
online: false,
minify: false,
files: 'test/fixtures',
files: 'packages/browser-sync/test/fixtures',
};
2 changes: 1 addition & 1 deletion cypress/configs/logPrefix.js
@@ -1,5 +1,5 @@
module.exports = {
server: 'test/fixtures',
server: 'packages/browser-sync/test/fixtures',
open: false,
watch: true,
online: false,
Expand Down
2 changes: 1 addition & 1 deletion cypress/configs/no-notify.js
@@ -1,5 +1,5 @@
module.exports = {
server: 'test/fixtures',
server: 'packages/browser-sync/test/fixtures',
open: false,
watch: true,
online: false,
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/css-console-notify.js
Expand Up @@ -5,7 +5,7 @@ describe('CSS console notification', function() {
it('should log message when css injected', function() {
cy.window().then((win) => {
const spy = cy.spy(win.console, "log");
cy.exec('touch test/fixtures/**/style.css');
cy.exec('touch packages/browser-sync/test/fixtures/**/style.css');
cy.wait(1000).then(() => {
expect(spy.getCall(0).args.slice(-1)[0]).to.equal('[LinkReplace] style.css');
})
Expand All @@ -14,7 +14,7 @@ describe('CSS console notification', function() {
it('should log 2 messages when 2 css files injected', function() {
cy.window().then((win) => {
const spy = cy.spy(win.console, "log");
cy.exec('touch test/fixtures/**/*.css');
cy.exec('touch packages/browser-sync/test/fixtures/**/*.css');
cy.wait(1000).then(() => {
expect(spy.callCount).to.equal(2);
const calls = new Set([spy.getCall(0).args.slice(-1)[0], spy.getCall(1).args.slice(-1)[0]]);
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/css-overlay-notify.js
Expand Up @@ -3,7 +3,7 @@ describe('CSS overlay notification', function() {
cy.visit(Cypress.env('BS_URL'));
});
it('should flash messages when css injected', function() {
cy.exec('touch test/fixtures/**/style.css');
cy.exec('touch packages/browser-sync/test/fixtures/**/style.css');
cy.wait(500);
cy.get('#__bs_notify__').should(function($elems) {
expect($elems.length).to.equal(1);
Expand Down
14 changes: 7 additions & 7 deletions cypress/integration/file-reloading.js
Expand Up @@ -4,14 +4,14 @@ describe('Reloading files', function() {
cy.visit(Cypress.env('BS_URL'));
});
it('should reload single <link>', function() {
cy.exec('touch test/fixtures/**/style.css');
cy.exec('touch packages/browser-sync/test/fixtures/**/style.css');
cy.get('[id="css-style"]').should($link => {
const url = new URL($link.attr('href'));
expect(url.search).to.contain('?browsersync=');
});
});
it('should reload 2 css files', function() {
cy.exec('touch test/fixtures/**/*.css');
cy.exec('touch packages/browser-sync/test/fixtures/**/*.css');
cy.get('link').should($links => {
$links.each((i, elem) => {
const url = new URL(elem.href);
Expand Down Expand Up @@ -57,7 +57,7 @@ describe('Reloading files', function() {
const href = firstStyle.sheet.cssRules[0].href;
expect(href).to.not.contain('?browsersync=');
});
cy.exec('touch test/fixtures/assets/import.css');
cy.exec('touch packages/browser-sync/test/fixtures/assets/import.css');
cy.get('style').eq(0).should((style) => {
const href = style[0].sheet.cssRules[0].href;
expect(href).to.contain('?browsersync=');
Expand All @@ -69,7 +69,7 @@ describe('Reloading files', function() {
const href = doc.styleSheets[0].cssRules[0].href;
expect(href).to.not.contain('?browsersync=');
});
cy.exec('touch test/fixtures/assets/import2.css');
cy.exec('touch packages/browser-sync/test/fixtures/assets/import2.css');
cy.get('link').eq(0).should((link) => {
const href = link[0].sheet.cssRules[0].href;
expect(href).to.contain('?browsersync=');
Expand All @@ -81,7 +81,7 @@ describe('Reloading files', function() {
cy.visit(Cypress.env('BS_URL') + '/images.html');
});
it('should reload single <img src>', function() {
cy.exec('touch test/fixtures/**/cam-secure.png');
cy.exec('touch packages/browser-sync/test/fixtures/**/cam-secure.png');
cy.get('[id="img-src-attr"]').should($link => {
const url = new URL($link.attr('src'));
expect(url.search).to.contain('?browsersync=');
Expand All @@ -93,7 +93,7 @@ describe('Reloading files', function() {
});
});
it('should reload single style backgroundImage style property', function() {
cy.exec('touch test/fixtures/**/cam-secure-02.png');
cy.exec('touch packages/browser-sync/test/fixtures/**/cam-secure-02.png');
cy.get('[id="img-src-attr"]').should($link => {
expect($link.attr('src')).not.to.contain('?browsersync=');
});
Expand All @@ -104,7 +104,7 @@ describe('Reloading files', function() {
});
});
it('should reload both images', function() {
cy.exec('touch test/fixtures/**/*.png');
cy.exec('touch packages/browser-sync/test/fixtures/**/*.png');
cy.get('[id="img-src-attr"]').should($link => {
const url = new URL($link.attr('src'));
expect(url.search).to.contain('?browsersync=');
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/file-watching-ignore.js
Expand Up @@ -4,7 +4,7 @@ describe('Watching folders', function() {
cy.visit(Cypress.env('BS_URL') + '/bower.html');
});
it('should reload single <link>', function () {
cy.exec('touch test/fixtures/bower_components/app.css');
cy.exec('touch packages/browser-sync/test/fixtures/bower_components/app.css');
cy.get('[id="css-style"]').should($link => {
const url = new URL($link.attr('href'));
expect(url.search).to.contain('?browsersync=');
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/logPrefix.js
Expand Up @@ -12,7 +12,7 @@ describe('Connection notification (with logPrefix)', function() {
it('should log prefixed message when css is injected', function() {
cy.window().then((win) => {
const spy = cy.spy(win.console, "log");
cy.exec('touch test/fixtures/**/style.css');
cy.exec('touch packages/browser-sync/test/fixtures/**/style.css');
cy.wait(1000).then(() => {
expect(spy.getCall(0).args.slice(-1)[0]).to.equal('[LinkReplace] style.css');
expect(spy.getCall(0).args.indexOf('WSK') > -1).to.be.true;
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/no-notify.js
Expand Up @@ -7,7 +7,7 @@ describe('disabled notification', function() {
cy.get('#__bs_notify__').should('have.length', 0);
});
it('should not flash messages when css injected', function() {
cy.exec('touch test/fixtures/**/style.css');
cy.exec('touch packages/browser-sync/test/fixtures/**/style.css');
cy.wait(500);
cy.get('#__bs_notify__').should('have.length', 0);
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/setup/bs.js
Expand Up @@ -13,7 +13,7 @@ module.exports = function(opts, ctx) {
const json = require(join(ctx.config.cwd, opts.config));

return Observable.create(obs => {
const bs = require('../../').create();
const bs = require('../../packages/browser-sync').create();
const instance = bs.init(json, function(err, bs) {
if (err) {
return obs.error(err);
Expand Down
6 changes: 6 additions & 0 deletions lerna.json
@@ -0,0 +1,6 @@
{
"packages": [
"packages/*"
],
"version": "2.25.0-alpha.0"
}
5 changes: 0 additions & 5 deletions lib/cli/transforms/addCwdToWatchOptions.ts

This file was deleted.

7 changes: 0 additions & 7 deletions lib/cli/transforms/appendServerDirectoryOption.ts

This file was deleted.

10 changes: 0 additions & 10 deletions lib/cli/transforms/appendServerIndexOption.ts

This file was deleted.

10 changes: 0 additions & 10 deletions lib/cli/transforms/copyCLIIgnoreToWatchOptions.ts

This file was deleted.

18 changes: 0 additions & 18 deletions lib/cli/transforms/handleExtensionsOption.ts

This file was deleted.

0 comments on commit 92bf7d8

Please sign in to comment.