Skip to content

Instantly share code, notes, and snippets.

@didi0613
Last active February 15, 2018 20:13
Show Gist options
  • Select an option

  • Save didi0613/9fa73d37f62aa0533b00c68dabf09c47 to your computer and use it in GitHub Desktop.

Select an option

Save didi0613/9fa73d37f62aa0533b00c68dabf09c47 to your computer and use it in GitHub Desktop.
Switch to OSS component archetype

Switch to OSS component archetype

  • update @walmart/electrode-archetype-react-component to electrode-archetype-react-component
"@walmart/electrode-archetype-react-component": "^15.0.0",
"@walmart/electrode-archetype-react-component-dev": "^15.0.0",

to

"electrode-archetype-react-component": "^5.0.0",
 "electrode-archetype-react-component-dev": "^5.0.0",
  • update scripts with builder into clap. For example, builder run in package.json script into clap. Dont forget to remove run as long with builder.
add "xclap": "^0.2.0" to devDependency
add xclap.js to the root directory and copy the tasks content
"prepublish": "clap prepublish",
remove demo script
remove builderrc

Error #1:

[BABEL] src/backplane/analytics-provider.jsx: Couldn't resolve extends clause of ./node_modules/@walmart/electrode-archetype-react-component/config/babel/.babelrc in /Users/s0d00px/analytics/.babelrc

Solution: update your babelrc file to

{
  "extends": "./node_modules/electrode-archetype-react-component-dev/config/babel/.babelrc"
}

Change the structure into

- demo-app
 - archetype/config
   - webpack
     - webpack.config.js
     - webpack.config.dev.js
   - index.js
- packages/component

Remove node_modules and re-run npm install. Errors should be gone.

Error #2 Update script "test" into

"test": "clap check",

And run npm run test Fix tests.

  • Fill in demo-app content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment