Skip to content

Commit

Permalink
Merge pull request #3 from edx/djoy/modernize
Browse files Browse the repository at this point in the history
feat: handleAllTrackEvents is no longer used
  • Loading branch information
davidjoy authored Oct 2, 2019
2 parents 857be9c + 9e4adbd commit 15b4fec
Show file tree
Hide file tree
Showing 11 changed files with 1,150 additions and 2,885 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ temp

src/i18n/transifex_input.json
temp/babel-plugin-react-intl
/.vscode
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
language: node_js
node_js: 12
before_install:
- npm install -g npm@6
install:
- npm install
- npm install
script:
- npm run lint
- npm run i18n_extract
- npm run test
- npm run build
- make validate-no-uncommitted-package-lock-changes
- npm run lint
- npm run i18n_extract
- npm run test
- npm run build
after_success:
- npx semantic-release
- codecov
- npx semantic-release
- codecov
env:
global:
# GH_TOKEN
Expand Down
2 changes: 0 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ Component Usage::
...

<Footer
handleAllTrackEvents={(eventName, properties) => {/* track click event */}}
onLanguageSelected={(languageCode) => {/* set language */}}
supportedLanguages={[
{ label: 'English', value: 'en'},
{ label: 'Español', value: 'es' },
]}
/>

- handleAllTrackEvents (required)
- onLanguageSelected (optional)
- supportedLanguages (optional)

Expand Down
38 changes: 3 additions & 35 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
// These preset packages are included by frontend-build.
// TODO: Add to frontend-build and leverage that config.
module.exports = {
presets: [
[
'@babel/preset-env',
{
modules: false,
},
],
'@babel/preset-react',
],
plugins: [
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-proposal-class-properties',
],
env: {
i18n: {
plugins: [
[
'react-intl',
{
messagesDir: './temp/babel-plugin-react-intl',
moduleSourceName: '@edx/frontend-i18n',
},
],
],
},
test: {
presets: [
'@babel/preset-env',
],
},
},
};
const { createConfig } = require('@edx/frontend-build');

module.exports = createConfig('babel-preserve-modules');
3 changes: 0 additions & 3 deletions example/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ const App = () => (
<div>
<IntlProvider locale="en">
<Footer
/* eslint-disable-next-line no-unused-vars */
handleAllTrackEvents={(eventName, properties) => {}}
/* eslint-disable-next-line no-unused-vars */
onLanguageSelected={(languageCode) => {}}
supportedLanguages={[
{ label: 'English', value: 'en' },
Expand Down
Loading

0 comments on commit 15b4fec

Please sign in to comment.