-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Breaking: Migrate Annotations UI into React (#251)
- Loading branch information
Showing
190 changed files
with
26,564 additions
and
14,773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ dist/* | |
docs/* | ||
lib/* | ||
index.js | ||
flow/** | ||
flow-typed/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[ignore] | ||
.*/build/.* | ||
.*/lib/.* | ||
.*/functional-tests/.* | ||
.*/test-utils/.* | ||
.*/reports/.* | ||
.*/node_modules/babel-plugin-flow-react-proptypes.* | ||
.*/node_modules/conventional-changelog* | ||
.*/node_modules/eslint* | ||
.*/node_modules/jest* | ||
.*/node_modules/npm-shrinkwrap.* | ||
.*/node_modules/stylelint.* | ||
.*/node_modules/webpack* | ||
.*/node_modules/draft-js* | ||
.*/node_modules/findup* | ||
.*/node_modules/rangy* | ||
|
||
[include] | ||
./src | ||
|
||
[libs] | ||
|
||
[options] | ||
module.name_mapper.extension='scss' -> '<PROJECT_ROOT>/flow/SCSSFlowStub.js.flow' | ||
module.name_mapper.extension='css' -> '<PROJECT_ROOT>/flow/SCSSFlowStub.js.flow' | ||
module.name_mapper='react-intl-locale-data' -> '<PROJECT_ROOT>/flow/WebpackI18N.js.flow' | ||
module.name_mapper='box-annotations-locale-data' -> '<PROJECT_ROOT>/flow/WebpackI18N.js.flow' | ||
module.name_mapper='box-react-ui-locale-data' -> '<PROJECT_ROOT>/flow/WebpackI18N.js.flow' | ||
module.name_mapper='draft-js' -> '<PROJECT_ROOT>/flow/DraftJSFlowStub.js.flow' | ||
module.name_mapper='draft-js/EditorState' -> '<PROJECT_ROOT>/flow/DraftJSFlowStub.js.flow' | ||
module.name_mapper='rangy' -> '<PROJECT_ROOT>/flow/Rangy.js.flow' | ||
module.name_mapper='rangy/lib/rangy-classapplier' -> '<PROJECT_ROOT>/flow/Rangy.js.flow' | ||
module.name_mapper='rangy/lib/rangy-highlighter' -> '<PROJECT_ROOT>/flow/Rangy.js.flow' | ||
module.name_mapper='rangy/lib/rangy-selectionsaverestore' -> '<PROJECT_ROOT>/flow/Rangy.js.flow' | ||
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"editor.rulers": [ | ||
120 | ||
], | ||
"flow.enabled": false, | ||
"typescript.validate.enable": false, | ||
"typescript.format.enable": false, | ||
"flow.pathToFlow": "${workspaceRoot}/node_modules/.bin/flow", | ||
"flow.useNPMPackagedFlow": true, | ||
"flow.enabled": true, | ||
"javascript.validate.enable": false, | ||
"prettier.eslintIntegration": true, | ||
"prettier.printWidth": 120, | ||
"prettier.singleQuote": true, | ||
"prettier.tabWidth": 4, | ||
"typescript.format.enable": false, | ||
"typescript.validate.enable": false | ||
"prettier.singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* eslint-disable strict */ | ||
|
||
'use strict'; | ||
|
||
const path = require('path'); | ||
const buildTranslations = require('box-react-ui/lib/build-utils/buildTranslations'); | ||
|
||
const i18n = path.resolve('i18n'); // Where the .properties files are dumped | ||
const jsonDir = path.join(i18n, 'json'); // Where the react-intl plugin dumps json | ||
|
||
function TranslationsPlugin() {} | ||
TranslationsPlugin.prototype.buildTranslations = () => { | ||
buildTranslations(i18n, jsonDir); | ||
}; | ||
TranslationsPlugin.prototype.apply = function apply(compiler) { | ||
compiler.plugin('done', this.buildTranslations); | ||
}; | ||
|
||
module.exports = TranslationsPlugin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const { execSync } = require('child_process'); | ||
|
||
/** | ||
* Build a single locale | ||
* | ||
* @param {string} locale - locale to build | ||
* @param {*} callback - callback from worker-farm master process | ||
* @return {void} | ||
*/ | ||
module.exports = (locale, callback) => { | ||
try { | ||
console.log(`Building ${locale}`); | ||
// build assets for a single locale | ||
execSync(`time LANGUAGE=${locale} yarn run build-prod`); | ||
callback(); | ||
} catch (error) { | ||
console.error(`Error: Failed to build ${locale}`); | ||
callback(true); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import 'core-js/es6/map'; | ||
import 'core-js/es6/set'; | ||
import 'raf/polyfill'; | ||
import Enzyme from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
|
||
Enzyme.configure({ adapter: new Adapter() }); |
Oops, something went wrong.