Code Monkey home page Code Monkey logo

builder-react-component's People

Contributors

eastridge avatar exogen avatar hartmamt avatar knowbody avatar ryan-roemer avatar zachhale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

builder-react-component's Issues

BUG: .babelrc is not explicitly pointed to everywhere, sometimes doesn't get used

As @boygirl found in FormidableLabs/victory-component-boilerplate#11, using the @Radium syntax in the new Builder-based victory-component-boilerplate doesn't work, because Babel isn't always getting its config from our .babelrc and thus uses the default settings.

With decorator syntax, this uses the correct .babelrc and works: builder run build-lib

These do NOT work: builder run build-dist and builder run test-frontend

Addng .babelrc to ROOT makes it work, but we don't want to have to do that.

We need a way to pass along our .babelrc path to Webpack (for building dist and testing) and isparta (for coverage) – the latter probably being the most difficult as I don't think an option is exposed.

/cc @ryan-roemer @boygirl

Extract `util/dev.js` / prod/dev dependencies Archetype publishing

From @chaseadamsio

If you decide to go either route, it might make sense to abstract util/dev.js into its own package so that anyone who wanted to create builder archetypes could just use it without having to know how to use the script or update it whenever you decide to update it...it might even make sense to make it a part of builder as a task, something like: builder publish archetype inside of a repository that would publish your archetype and the -dev version for you.

`builder-init`: Init project and run CI.

script:
  # Check archetype.
  - npm --version
  - npm run builder:check

  # Check init templates
  - "npm install -g FormidableLabs/builder-init#chore-init-install" # TODO: Update to npm version
  - mkdir .builder-init-tmp
  - cd .builder-init-tmp
  - >-
    builder-init $PWD/.. --prompts='{
    "packageName":"whiz-bang",
    "packageGitHubOrg":"Acme",
    "licenseDate":"2016",
    "licenseOrg":"Acme",
    "destination":"whiz-bang"}'
  - cd whiz-bang
  - npm install

  # Run initialized project's own CI
  - npm --version
  - node_modules/.bin/builder run check-ci
  - npm prune --production
  - node_modules/.bin/builder run build

Feature: Karma dev watchers.

  • First, see if we don't need to implement this ticket but can instead document how to do easy watching using the new builder <action> <task(s)> -- ARBITRARY COMMAND LINE FLAGS functionality to just pass -- --watch or something meaningful to karma on the command line. Might still need at least a separate task to watch known directories, etc. (Talk to Ryan if this doesn't make sense).
  • If so, just document how to watch in DEVELOPMENT.md
  • If not, implement new tasks as follows:

Need a karma config something like:

module.exports = function (config) {
  config.set({
    frameworks: ["mocha", "phantomjs-shim"],
    reporters: ["spec"],
    browsers: ["PhantomJS"],
    basePath: process.cwd(), // repository root.
    files: [
      // Test bundle (must be created via `npm run dev|hot|server-test`)
      "http://127.0.0.1:3001/assets/bundle.js",

      // Watch files for re-running tests.
    ].concat([
      "demo/**",
      "src/**",
      "test/**"
    ].map(function (pattern) {
      return { pattern: pattern, included: false, served: false, watched: true };
    })),
    port: 9999,
    singleRun: true,
    client: {
      mocha: {
        ui: "bdd"
      }
    }
  });
};

and archetype task of:

"test-frontend-dev-watch": "karma start node_modules/@walmart/electrode-archetype-react-component/config/karma/karma.conf.dev.js --colors --browsers Chrome --no-single-run --auto-watch",

CI: Greenkeeper

  • Hook up greenkeeper
  • Relies on builder-init being part of CI to test / verify.
  • Hook to / harmonize with semantic versioned releases.

Switch from global `sinon` to imported `sinon`

Sinon currently does not play well with Webpack due to non-standard UMD configuration. We currently globally include it.

TASK:

References:

Build on windows...

I have issues when trying to run the build scripts of the package.json.
When running builder run build (for example), it complains

undefined:1
'{BABEL_ENV:commonjs}'
^

SyntaxError: Unexpected token ' in JSON at position 0
    at JSON.parse (<anonymous>)
    at parse (C:\somepath\node_modules\builder\lib\utils\json.js:36:19)
    at module.exports.Environment.updateEnvFlag (C:\somepath\node_modules\builder\lib\environment.js:153:17)
    at new module.exports (C:\somepath\node_modules\builder\lib\environment.js:64:8)
    at module.exports (C:\somepath\node_modules\builder\bin\builder-core.js:32:13)
    at Object.<anonymous> (C:\somepath\node_modules\builder\bin\builder.js:43:1)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)

It's most certainly a problem with my windows dev box... In fact, it complains because the string given as argument through --env is not escaped properly.

I've manage to fix it by changing these lines:

"build-es": "builder run --env '{\"BABEL_ENV\":\"es\"}' build-babel -- -d es"
"build-lib": "builder run --env '{\"BABEL_ENV\":\"commonjs\"}' build-babel -- -d lib",

into:

"build-es": "builder run --env \"{\\\"BABEL_ENV\\\":\\\"es\\\"}\" build-babel -- -d es"
"build-lib": "builder run --env \"{\\\"BABEL_ENV\\\":\\\"commonjs\\\"}\" build-babel -- -d lib",

What is wrong ? is it my setup ? my node ?

webpack-dev-server parameter --host

How can I run webpack-dev-server bind in host 0.0.0.0, I need to develop on the remote machine.

builder run server-dev --host 0.0.0.0

It's not work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.