Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 16 2019 21:10

    miblanchard on master

    Upgraded webpack to version 4 (… (compare)

  • Apr 16 2019 21:10
    miblanchard closed #250
  • Apr 16 2019 21:09
    miblanchard closed #252
  • Apr 16 2019 20:53
    codecov[bot] commented #250
  • Apr 16 2019 20:51
    codecov[bot] commented #252
  • Apr 16 2019 20:49
    codecov[bot] commented #252
  • Apr 16 2019 20:45

    miblanchard on update-codecov

    (compare)

  • Apr 16 2019 20:42
    miblanchard synchronize #250
  • Apr 16 2019 20:38
    miblanchard synchronize #252
  • Apr 16 2019 20:38

    miblanchard on remove-codevoc

    Added wildcat-jest-runner no-op change Merge pull request #247 from ba… and 3 more (compare)

  • Apr 16 2019 20:38

    miblanchard on remove-codevoc

    Update Makefile testing codecov (compare)

  • Apr 16 2019 20:38
    miblanchard synchronize #252
  • Apr 16 2019 20:37

    miblanchard on master

    Chore: update codecov package Merge pull request #254 from nf… (compare)

  • Apr 16 2019 20:37
    miblanchard closed #254
  • Apr 16 2019 20:11
    miblanchard opened #254
  • Apr 16 2019 20:11

    miblanchard on update-codecov

    Chore: update codecov package (compare)

  • Apr 16 2019 20:09
    miblanchard closed #253
  • Apr 16 2019 20:08
    CLAassistant commented #253
  • Apr 16 2019 20:08
    miblanchard synchronize #253
  • Apr 16 2019 20:08

    miblanchard on remove-codecov

    Added wildcat-jest-runner no-op change Merge pull request #247 from ba… and 1 more (compare)

Yan
@jericho2
const wildcatConfig = {
    generalSettings: {
        // Grab the config file from package.json
        jspmConfigFile: pkg.configFile || (pkg.jspm || {}).configFile || "config.js",

        seleniumAddress: process.env.HOST === "localhost" || !process.env.HOST ? null : "http://selenium:4444/wd/hub",

        staticUrl: process.env.STATIC_URL || "http://localhost:4000",

        // Project name
        name: pkg.name,
...
staticUrl in general settings
The wildcat default html template uses staticUrl
(function(process) {
  "use strict";
  const NOW = Date.now();
  const __PROD__ = process.env.NODE_ENV === "production";
  module.exports = function defaultTemplate(cfg) {
    const data = cfg.data;
    const head = cfg.head;
    const html = cfg.html;
    const wildcatConfig = cfg.wildcatConfig;
....
    const generalSettings = wildcatConfig.generalSettings;
...
    const staticUrl = generalSettings.staticUrl;
   ...
    return `
<!doctype html>
<html ${head.htmlAttributes.toString()}>
    <head>
        <link rel="dns-prefetch" href="${staticUrl}" />
        <link rel="preconnect" href="${staticUrl}" />
Yan
@jericho2
James Hush
@jamsea
woah! Thanks @jericho2 I didn't realize that was in the template but not in the settings
Yan
@jericho2
Sure thing
Yan
@jericho2
@jamsea @doctyper can you guys please look at why http://localhost:4000/system.config.js is working and http://127.0.0.1:4000/system.config.jsnot? We're investigating on our end as well
Julien Rottenberg
@jrottenberg
127.0.0.1 == localhost, so it's serving ok as well
The problem is when you use your machine IP
James Hush
@jamsea
@jericho2 it's because the router is looking at the domain name to determine what content to send back
e.g. amp.nfl.com is setup to have different routes then www.nfl.com
Julien Rottenberg
@jrottenberg
can we configure it to look at the port being used ?
James Hush
@jamsea
You can set up an alias for an IP address
We had to do that for Chromecast, let me see if I can pull up the snippet of code that lets it work... Usually we use domain names though but it sounds like that's not ideal for your setup
Yan
@jericho2
right, thank you very much !
Yan
@jericho2
I think I figured it out.
staticServer: {
    // An array of domains to allow for cross-origin requests
    corsOrigins: [
        process.env.STATIC_HOST,
        "localhost",
        "www.mydomain.dev",
        "mydomain.dev"
    ],
Now if we pass ip as STATIC_HOST. It'll work on that ip
James Hush
@jamsea
That's part of it @jericho2
You should be able to add something that looks like:
domainAliases: {
  "localhost": [
          "10.0.0.1",
          "10.0.0.2",
      ]
}
We're using this on chromecast, I forgot to document this. I'm going to make a PR with some documentation for this feature at the end of the day
But like I said if you had a domain name instead of an ip address you don't need this
Yan
@jericho2
domainAliases is used by appServer or staticServer?
James Hush
@jamsea
It's used by the appServer in main.js (file I linked)
it allows you to alias domains/ip's to another domain
Yan
@jericho2
We just ran STATIC_URL=http://my_ip:4000 STATIC_HOST=my_ip npm run prod-local and it looks like it finally worked
James Hush
@jamsea
:thumbsup:
I forgot about that feature yesterday
Julien Rottenberg
@jrottenberg
Yep thanks a lot for your help @jamsea !
Yan
@jericho2
Cool. Thanks James!
James Hush
@jamsea
I made it for Shailesh on the chromecast project forever ago, no problemo guys
Yan
@jericho2
@jamsea Just so you have a checklist, this is what I found that needs to be documented:
- github access token for Docker
- staticUrl in generalSettings in wildcat config
- domainAliases we just discussed
James Hush
@jamsea
:+1:
Yan
@jericho2
Also, remembder to fix serviceWorker check in defaultHtmlTemplate. For now I am using custom one
James Hush
@jamsea
That's fixed in master :thumbsup:
Yan
@jericho2
Oh cool
James Hush
@jamsea
hasn't been published to npm yet
Julien Rottenberg
@jrottenberg
speaking of assets, what npm task generate/prepare the assets with random suffix, like https://static-wildcat.nfl.com/bundles/app-bar-d5d3af9d.js <--- -d5d3af9d.
James Hush
@jamsea
@jrottenberg We use jspm to create the bundles then we wrote our own javascript code to generate a hash suffix for each one
Julien Rottenberg
@jrottenberg
ah, ok
James Hush
@jamsea
Creating the bundles with jspm is pretty intuitive though
I think by default just running jspm bundle will bundle everything together which is a good starting point
Julien Rottenberg
@jrottenberg
gotcha
Yan
@jericho2
@jamsea have you guys experienced npm run lint not working recently?
Renato Marinho
@renatomarinho
This message was deleted
Renato Marinho
@renatomarinho
This message was deleted