diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 57fa6c53e..000000000 --- a/.babelrc +++ /dev/null @@ -1,28 +0,0 @@ -{ - "presets": [ - ["env", { - "targets": { - "browsers": ["last 2 versions", "ie 11"] - } - }], - "babel-preset-react" - ], - "plugins": [ - "transform-object-rest-spread" - ], - "env": { - "test": { - "plugins": [ - "rewire" - ] - }, - "i18n": { - "plugins": [ - ["react-intl", { - "messagesDir": "./temp/babel-plugin-react-intl", - "moduleSourceName": "@edx/frontend-i18n" - }] - ] - } - } -} diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 4f5bcab24..000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "eslint-config-edx", - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "devDependencies": [ - "webpack.config.js", - "src/tests/setupTest.js", - "**/*.test.jsx", - "**/*.test.js" - ] - } - ] - }, - "env": { - "jest": true - } -} diff --git a/.gitignore b/.gitignore index 32a85901b..cc6369994 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.DS_Store coverage dist node_modules diff --git a/.travis.yml b/.travis.yml index 3dd90c1e3..d2b3bd62c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,5 @@ language: node_js -node_js: - - 8 -cache: - directories: - - "~/.npm" +node_js: 12 install: - npm install script: @@ -11,9 +7,8 @@ script: - npm run i18n_extract - npm run test - npm run build - - npm run is-es5 after_success: - - npm run travis-deploy-once "npm run semantic-release" + - npx semantic-release - npm run coveralls env: global: diff --git a/Makefile b/Makefile index 43a03ec78..0ebb4fc7c 100755 --- a/Makefile +++ b/Makefile @@ -10,6 +10,14 @@ tx_url2 = https://www.transifex.com/api/2/project/edx-platform/resource/$(transi # This directory must match .babelrc . transifex_temp = ./temp/babel-plugin-react-intl +build: + rm -rf ./dist + ./node_modules/.bin/fedx-scripts babel src --out-dir dist --source-maps --ignore **/*.test.jsx,**/__mocks__,**/__snapshots__,**/setupTest.js --copy-files + @# --copy-files will bring in everything else that wasn't processed by babel. Remove what we don't want. + @rm -rf dist/**/*.test.jsx + @rm -rf dist/**/__snapshots__ + @rm -rf dist/__mocks__ + requirements: npm install diff --git a/README.rst b/README.rst index f9c9fa601..80d4ab246 100644 --- a/README.rst +++ b/README.rst @@ -5,9 +5,7 @@ frontend-component-footer |semantic-release| frontend-component-footer is a library containing a site footer -component for use when building edX frontend applications. - -At this time, this component is hard-coded to match the legacy LMS site footer, including all of its links. As implemented, this component should probably be called the ``frontend-component-lms-footer``. +component for use when building Open edX frontend applications. Usage ----- @@ -16,9 +14,30 @@ To install frontend-component-footer into your project:: npm i --save @edx/frontend-component-footer -The component expects properties specifying the various URLs that are -linked in the footer. See the sample app in `src/index.jsx `__ for an example -of how the SiteFooter component can be specified. +Component Usage:: + + import Footer from '@edx/frontend-component-footer'; + import footerMessages from '@edx/frontend-component-footer/src/i18n/index'; + + ... + +