Add svg-icon to frontend-shared package
- Add babel presets for frontend-shared to transpile js/jsx - Add `build` script to transpile frontend-shared and output sourcemaps and transpiled js code to /lib - Add frontend-shared /src/index.js as a way to serve as a root import location for the frontend-shared lib - Fix up frontend-shared/package.json so publishing will work as expecting and include only intended files - Add a browserify config in the frontend-shared package.json file so that driving client will be able to bundle it and still import svg and html files that are nested inside /frontend-shared/src - Add svg-icon to serve as the first shared js component - Move several .svg files into the lib that are relaxant for testing svg-icon that also seem share-worthy - Make modifications to ensure that typechecking, linting, and testing all work as expected and ignore /lib folder - Change karma config so that tests will automatically run on /frontend-shared, driven from the client's gulp command - Added new gulp tasks to help with building and linking the frontend-shared package so that is it fully transparent with existing tooling - Add gulp-babel and gulp-sourcemaps packages to help with build tasks for /frontend-shared that are necessary for symlinking / building the package - Used new SvgIcon sidebar/index.js as a tester. This requires making two copies of registerIcons while we make the transition. Replacing all call sites of SvgIcon would be too large for an already overwhelming commit
Showing
frontend-shared/.eslintrc
0 → 100644
frontend-shared/.gitignore
0 → 100644
This diff is collapsed.
frontend-shared/src/index.js
0 → 100644
... | @@ -10,7 +10,6 @@ | ... | @@ -10,7 +10,6 @@ |
"@babel/core": "^7.1.6", | "@babel/core": "^7.1.6", | ||
"@babel/preset-env": "^7.1.6", | "@babel/preset-env": "^7.1.6", | ||
"@babel/preset-react": "^7.0.0", | "@babel/preset-react": "^7.0.0", | ||
"@hypothesis/frontend-shared": "./frontend-shared", | |||
"@octokit/rest": "^18.0.0", | "@octokit/rest": "^18.0.0", | ||
"@sentry/browser": "^5.6.2", | "@sentry/browser": "^5.6.2", | ||
"approx-string-match": "^1.1.0", | "approx-string-match": "^1.1.0", | ||
... | @@ -49,9 +48,11 @@ | ... | @@ -49,9 +48,11 @@ |
"fetch-mock": "9", | "fetch-mock": "9", | ||
"focus-visible": "^5.0.0", | "focus-visible": "^5.0.0", | ||
"gulp": "^4.0.0", | "gulp": "^4.0.0", | ||
"gulp-babel": "^8.0.0", | |||
"gulp-changed": "^4.0.0", | "gulp-changed": "^4.0.0", | ||
"gulp-rename": "^2.0.0", | "gulp-rename": "^2.0.0", | ||
"gulp-replace": "^1.0.0", | "gulp-replace": "^1.0.0", | ||
"gulp-sourcemaps": "^3.0.0", | |||
"hammerjs": "^2.0.4", | "hammerjs": "^2.0.4", | ||
"karma": "^6.0.1", | "karma": "^6.0.1", | ||
"karma-browserify": "^8.0.0", | "karma-browserify": "^8.0.0", | ||
... | ... |
Please register or sign in to comment