forked from electrode-io/electrode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# This is a combination of 3 commits.
# This is the 1st commit message: update travis # The commit message electrode-io#2 will be skipped: # add traivs env # The commit message electrode-io#3 will be skipped: # add traivs env
- Loading branch information
Showing
7 changed files
with
77 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
packages/electrode-archetype-react-app-dev/config/karma/browser-settings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
"use strict"; | ||
|
||
const archetype = require("electrode-archetype-react-app/config/archetype"); | ||
const logger = require("electrode-archetype-react-app/lib/logger"); | ||
|
||
module.exports = function(settings) { | ||
const browser = archetype.karma.browser.toLowerCase(); | ||
if (browser === "chrome") { | ||
settings.browsers = ["Chrome", "Chrome_without_security"]; | ||
settings.customLaunchers = { | ||
Chrome_without_security: { | ||
base: "Chrome", | ||
flags: ["--disable-web-security"] | ||
}, | ||
Chrome_travis_ci: { | ||
base: "Chrome", | ||
flags: ["--no-sandbox"] | ||
} | ||
}; | ||
logger.info("Using Chrome Headless to run Karma test"); | ||
|
||
if (process.env.TRAVIS) { | ||
settings.browsers = ["Chrome_travis_ci"]; | ||
} | ||
} else if (browser === "phantomjs") { | ||
settings.frameworks.push("phantomjs-shim"); | ||
settings.browser = ["PhantomJS"]; | ||
logger.warn( | ||
"Using PhantomJS to run Karma test. It's been deprecated and may be removed in the future." | ||
); | ||
} else { | ||
logger.error(`Unknown browser ${browser} set for Karma test. Failed.`); | ||
return process.exit(1); | ||
} | ||
|
||
return settings; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 23 additions & 13 deletions
36
packages/generator-electrode/generators/app/templates/clap.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,34 @@ | ||
// Tell Electrode app archetype that you want to use ES6 syntax in your server code | ||
/* | ||
* Tell Electrode app archetype that you want to use ES6 syntax in your server code | ||
*/ | ||
|
||
process.env.SERVER_ES6 = true; | ||
|
||
/* | ||
* Enable the following flags for optional features in the Electrode app archetype | ||
* Use PhantomJS to run your Karma Unit tests. Default is "chrome" (Chrome Headless) | ||
*/ | ||
|
||
// Use Chrome Headless instead of PhantomJS to run your Karma Unit tests | ||
// process.env.ENABLE_CHROME_HEADLESS = true; | ||
// process.env.KARMA_BROWSER = "phantomjs"; | ||
|
||
// Turn off using electrode-webpack-reporter to show visual report of your webpack | ||
// compile results when running in dev mode with `clap dev` | ||
// process.env.HTML_WEBPACK_REPORTER_OFF = true | ||
/* | ||
* Turn off using electrode-webpack-reporter to show visual report of your webpack | ||
* compile results when running in dev mode with `clap dev` | ||
*/ | ||
|
||
// Use a custom host name instead of localhost, and a diff port instead of 2992 | ||
// for webpack dev server when running in dev mode with `clap dev` | ||
// process.env.WEBPACK_DEV_HOST = "dev.mymachine.net" | ||
// process.env.WEBPACK_DEV_PORT = 8100 | ||
// process.env.HTML_WEBPACK_REPORTER_OFF = true; | ||
|
||
// Enable HTTPS for webpack dev server when running in dev mode with `clap dev` | ||
// process.env.WEBPACK_DEV_HTTPS = true; | ||
/* | ||
* Use a custom host name instead of localhost, and a diff port instead of 2992 | ||
* for webpack dev server when running in dev mode with `clap dev` | ||
*/ | ||
|
||
// process.env.WEBPACK_DEV_HOST = "dev.mymachine.net"; | ||
// process.env.WEBPACK_DEV_PORT = 8100; | ||
|
||
/* | ||
* Enable HTTPS for webpack dev server when running in dev mode with `clap dev` | ||
*/ | ||
|
||
// process.env.WEBPACK_DEV_HTTPS = true; | ||
|
||
require("electrode-archetype-react-app")(); |